Ignore:
Timestamp:
Jan 14, 2016, 10:13:09 AM (9 years ago)
Author:
cfuguet
Message:

Improving the configuration infrastructure of the coremark application

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/applications/coremark/Makefile

    r753 r756  
    11
    22APP_NAME = coremark
     3TARGET   = appli.elf
    34
    45OBJS= core_main.o \
     
    1011
    1112LIBS= -L../../build/libs -luser
     13INCLUDES = -I. -I./mach  -I../..  -I../../giet_libs  -I../../giet_xml
    1214
    13 INCLUDES = -I. -I./mach  -I../..  -I../../giet_libs  -I../../giet_xml 
    14 
    15 DEFS := -DFLAGS_STR="\"${CFLAGS}\"" -DTOTAL_DATA_SIZE=2000
     15LIBS   := $(LIBS) $(XLIBS)
     16CFLAGS := $(CFLAGS) $(XCFLAGS)
    1617
    1718COREMARK ?= RUN1
    18 ifeq (${COREMARK},RUN1)
     19ifeq ($(COREMARK),RUN1)
    1920  $(info Coremark Performance Run)
    20   DEFS := ${DEFS} -DPERFORMANCE_RUN=1
     21  CFLAGS := $(CFLAGS) -DPERFORMANCE_RUN=1
    2122endif
    22 ifeq (${COREMARK},RUN2)
     23ifeq ($(COREMARK),RUN2)
    2324  $(info Coremark Validation Run)
    24   DEFS := ${DEFS} -DVALIDATION_RUN=1
     25  CFLAGS := $(CFLAGS) -DVALIDATION_RUN=1
    2526endif
    26 ifeq (${COREMARK},RUN3)
     27ifeq ($(COREMARK),RUN3)
    2728  $(info Coremark Profile Run)
    28   DEFS := ${DEFS} -DPROFILE_RUN=1
     29  CFLAGS := $(CFLAGS) -DPROFILE_RUN=1
    2930endif
    3031
    31 #DEFS := ${DEFS} -DCORE_DEBUG=1
     32CFLAGS := $(CFLAGS) -DFLAGS_STR="\"$(CFLAGS)\""
     33LDFLAGS := -Wl,-T $(APP_NAME).ld $(CFLAGS)
    3234
    3335LIB_DEPS = ../../build/libs/libuser.a
    3436
    35 appli.elf: $(OBJS) $(APP_NAME).ld $(LIBS_DEPS)
    36         $(LD) -o $@ -T $(APP_NAME).ld $(OBJS) $(LIBS)
     37$(TARGET): $(OBJS) $(APP_NAME).ld $(LIBS_DEPS)
     38        $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
    3739        $(DU) -D $@ > $@.txt
    3840
    3941check_coremark: coremark.md5
    40         md5sum -c $< 
     42        md5sum -c $<
    4143
    42 %.o: %.c 
    43         $(CC)  $(INCLUDES) $(CFLAGS) ${DEFS} -c -o  $@ $<
     44%.o: %.c
     45        $(CC) $(INCLUDES) $(CFLAGS) -c -o  $@ $<
    4446
    4547clean:
    46         rm -f *.o *.elf appli.elf.txt *.pyc core *~
     48        rm -f $(OBJS) $(TARGET) $(TARGET).txt $(APP_NAME).pyc
Note: See TracChangeset for help on using the changeset viewer.