#File: core_portme.mak # Flag: OUTFLAG # Use this flag to define how to to get an executable (e.g -o) OUTFLAG= -o # Flag: CC # Use this flag to define compiler to use #CC = gcc CC = mipsel-buildroot-linux-uclibc-gcc # Flag: CFLAGS # Use this flag to define compiler options. Note, you can add compiler options from the command line using XCFLAGS="other flags" PORT_CFLAGS = -O3 -static -falign-jumps=8 -falign-functions=8 -fno-caller-saves -fsched-spec-load -fgcse-las -fgcse-sm -funroll-loops FLAGS_STR = "$(PORT_CFLAGS) $(XCFLAGS) $(XLFLAGS) $(LFLAGS_END)" CFLAGS = $(PORT_CFLAGS) -I$(PORT_DIR) -I. -DFLAGS_STR=\"$(FLAGS_STR)\" #CFLAGS += -fno-delayed-branch -Wa,-O0 #Flag: LFLAGS_END # Define any libraries needed for linking or other flags that should come at the end of the link line (e.g. linker scripts). # Note: On certain platforms, the default clock_gettime implementation is supported but requires linking of librt. LFLAGS_END += -lrt # Flag: PORT_SRCS # Port specific source files can be added here PORT_SRCS = $(PORT_DIR)/core_portme.c # Flag: LOAD # Define this flag if you need to load to a target, as in a cross compile environment. # Flag: RUN # Define this flag if running does not consist of simple invocation of the binary. # In a cross compile environment, you need to define this. #For flashing and using a tera term macro, you could use #LOAD = flash ADDR #RUN = ttpmacro coremark.ttl #For copying to target and executing via SSH connection, you could use #LOAD = scp $(OUTFILE) user@target:~ #RUN = ssh user@target -c #For native compilation and execution LOAD = echo Loading done RUN = OEXT = .o EXE = # Flag: SEPARATE_COMPILE # Define if you need to separate compilation from link stage. # In this case, you also need to define below how to create an object file, and how to link. ifdef SEPARATE_COMPILE #LD = gcc LD = CC OBJOUT = -o LFLAGS = OFLAG = -o COUT = -c # Flag: PORT_OBJS # Port specific object files can be added here PORT_OBJS = $(PORT_DIR)/core_portme$(OEXT) PORT_CLEAN = *$(OEXT) $(OPATH)%$(OEXT) : %.c $(CC) $(CFLAGS) $(XCFLAGS) $(COUT) $< $(OBJOUT) $@ endif ifdef PGO ifeq (,$(findstring $(PGO),gen)) PGO_STAGE=build_pgo_gcc CFLAGS+=-fprofile-use endif PORT_CLEAN+=*.gcda *.gcno gmon.out endif