[117] | 1 | # |
---|
| 2 | # $Id: Makefile 138 2010-05-12 17:34:01Z rosiere $ |
---|
| 3 | # |
---|
| 4 | # [ Description ] |
---|
| 5 | # |
---|
| 6 | # Makefile |
---|
| 7 | # |
---|
| 8 | |
---|
[123] | 9 | include Makefile.defs |
---|
| 10 | |
---|
| 11 | #-----[ Specint variable ]-------------------------------------------------------- |
---|
| 12 | |
---|
[117] | 13 | SPECINT2000_PATH = /users/cao/kane/Project/SPEC_CPU2000/benchspec/CINT2000 |
---|
[123] | 14 | SPECINT2000_PATHS = $(addprefix $(SPECINT2000_PATH)/, $(BENCHS)) |
---|
[117] | 15 | |
---|
| 16 | SPECINT2000_PATH_INC = $(addprefix -I, $(addsuffix /src, $(SPECINT2000_PATHS))) |
---|
| 17 | SPECINT2000_PATH_SRC = $(wildcard $(addsuffix /src , $(SPECINT2000_PATHS))) |
---|
[123] | 18 | SPECINT2000_OBJECTS = $(foreach bench,$(BENCHS),$(addprefix $(DIR_OBJ)/$(bench)_, $(addsuffix .o, $(basename $(notdir $(wildcard $(SPECINT2000_PATH)/$(bench)/src/*.c)))))) |
---|
[138] | 19 | SPECINT2000_FLAGS = $(addprefix -D, $(subst 0,,\ |
---|
| 20 | $(subst 1,,\ |
---|
| 21 | $(subst 2,,\ |
---|
| 22 | $(subst 3,,\ |
---|
| 23 | $(subst 4,,\ |
---|
| 24 | $(subst 5,,\ |
---|
| 25 | $(subst 6,,\ |
---|
| 26 | $(subst 7,,\ |
---|
| 27 | $(subst 8,,\ |
---|
| 28 | $(subst 9,,\ |
---|
| 29 | $(subst .,SPEC_,$(BENCHS))\ |
---|
| 30 | ))))))))))) |
---|
[117] | 31 | |
---|
[123] | 32 | #-----[ Directory ]--------------------------------------------------------------- |
---|
[117] | 33 | |
---|
| 34 | DIR_SOFT = .. |
---|
| 35 | |
---|
| 36 | DIR_SRC = ./src |
---|
| 37 | DIR_C = $(DIR_SRC)/c |
---|
| 38 | DIR_ASM = $(DIR_SRC)/asm |
---|
| 39 | DIR_SYS = $(DIR_SRC)/sys |
---|
| 40 | DIR_INC = $(DIR_SRC)/include |
---|
[137] | 41 | DIR_LDSCRIPT = $($(OS)_DIR_LDSCRIPT) |
---|
[117] | 42 | |
---|
[137] | 43 | INCDIR = $($(OS)_INCDIR) -I$(DIR_INC) |
---|
| 44 | LIBDIR = $($(OS)_LIBDIR) |
---|
| 45 | LIBNAME = $($(OS)_LIBNAME) |
---|
[117] | 46 | |
---|
[123] | 47 | #-----[ Flags ]------------------------------------------------------------------- |
---|
| 48 | |
---|
[138] | 49 | FLAGS = -DSPECINT2000_PATH=\"$(SPECINT2000_PATH)\" -DNB_THREAD_MAX=$(NB_THREAD_MAX) $(SPECINT2000_FLAGS) $(BENCHS_TYPE) |
---|
[117] | 50 | |
---|
[124] | 51 | FLAGS_164.gzip = -I$(SPECINT2000_PATH)/164.gzip/src |
---|
| 52 | FLAGS_175.vpr = -I$(SPECINT2000_PATH)/175.vpr/src -DSPEC_CPU2000 |
---|
| 53 | FLAGS_176.gcc = -I$(SPECINT2000_PATH)/176.gcc/src |
---|
| 54 | FLAGS_181.mcf = -I$(SPECINT2000_PATH)/181.mcf/src -DWANT_STDC_PROTO |
---|
| 55 | FLAGS_186.crafty = -I$(SPECINT2000_PATH)/186.crafty/src |
---|
| 56 | FLAGS_197.parser = -I$(SPECINT2000_PATH)/197.parser/src |
---|
| 57 | FLAGS_252.eon = -I$(SPECINT2000_PATH)/252.eon/src |
---|
| 58 | FLAGS_253.perlbmk = -I$(SPECINT2000_PATH)/253.perlbmk/src |
---|
| 59 | FLAGS_254.gap = -I$(SPECINT2000_PATH)/254.gap/src |
---|
| 60 | FLAGS_255.vortex = -I$(SPECINT2000_PATH)/255.vortex/src |
---|
| 61 | FLAGS_256.bzip2 = -I$(SPECINT2000_PATH)/256.bzip2/src -DWANT_STDC_PROTO |
---|
| 62 | FLAGS_300.twolf = -I$(SPECINT2000_PATH)/300.twolf/src -DSPEC_CPU2000 |
---|
| 63 | |
---|
[117] | 64 | #-----[ Files ]------------------------------------------------------------------- |
---|
[137] | 65 | OBJECTS = $($(OS)_OBJECTS) \ |
---|
[117] | 66 | $(patsubst $(DIR_ASM)/%.s,$(DIR_OBJ)/%.o,$(wildcard $(DIR_ASM)/*.s)) \ |
---|
| 67 | $(patsubst $(DIR_SYS)/%.s,$(DIR_OBJ)/%.o,$(wildcard $(DIR_SYS)/*.s)) \ |
---|
| 68 | $(patsubst $(DIR_C)/%.c,$(DIR_OBJ)/%.o,$(wildcard $(DIR_C)/*.c)) \ |
---|
| 69 | $(SPECINT2000_OBJECTS) |
---|
| 70 | |
---|
| 71 | vpath %.h $(SPECINT2000_PATH_INC) |
---|
| 72 | # vpath %.c $(SPECINT2000_PATH_SRC) |
---|
| 73 | |
---|
| 74 | include $(DIR_SOFT)/Makefile.Software |
---|
[124] | 75 | include $(DIR_SOFT)/Makefile.Workload |
---|
[117] | 76 | |
---|
| 77 | $(DIR_OBJ)/164.gzip_%.o : $(SPECINT2000_PATH)/164.gzip/src/%.c |
---|
| 78 | @\ |
---|
| 79 | $(ECHO) "Compilation : $*.c"; \ |
---|
[137] | 80 | $($(TARGET)_CC) $($(TARGET)_CC_OPT) $(FLAGS_164.gzip) -o $@ -c $^ ; |
---|
[117] | 81 | |
---|
[119] | 82 | $(DIR_OBJ)/175.vpr_%.o : $(SPECINT2000_PATH)/175.vpr/src/%.c |
---|
| 83 | @\ |
---|
| 84 | $(ECHO) "Compilation : $*.c"; \ |
---|
[137] | 85 | $($(TARGET)_CC) $($(TARGET)_CC_OPT) $(FLAGS_175.vpr) -o $@ -c $^ ; |
---|
[117] | 86 | |
---|
[119] | 87 | $(DIR_OBJ)/176.gcc_%.o : $(SPECINT2000_PATH)/176.gcc/src/%.c |
---|
| 88 | @\ |
---|
| 89 | $(ECHO) "Compilation : $*.c"; \ |
---|
[137] | 90 | $($(TARGET)_CC) $($(TARGET)_CC_OPT) $(FLAGS_176.gcc) -o $@ -c $^ ; |
---|
[117] | 91 | |
---|
[119] | 92 | $(DIR_OBJ)/181.mcf_%.o : $(SPECINT2000_PATH)/181.mcf/src/%.c |
---|
| 93 | @\ |
---|
| 94 | $(ECHO) "Compilation : $*.c"; \ |
---|
[137] | 95 | $($(TARGET)_CC) $($(TARGET)_CC_OPT) $(FLAGS_181.mcf) -o $@ -c $^ ; |
---|
[117] | 96 | |
---|
[123] | 97 | $(DIR_OBJ)/186.crafty_%.o : $(SPECINT2000_PATH)/186.crafty/src/%.c |
---|
| 98 | @\ |
---|
| 99 | $(ECHO) "Compilation : $*.c"; \ |
---|
[137] | 100 | $($(TARGET)_CC) $($(TARGET)_CC_OPT) $(FLAGS_186.crafty) -o $@ -c $^ ; |
---|
[123] | 101 | |
---|
[119] | 102 | $(DIR_OBJ)/255.vortex_%.o : $(SPECINT2000_PATH)/255.vortex/src/%.c |
---|
| 103 | @\ |
---|
| 104 | $(ECHO) "Compilation : $*.c"; \ |
---|
[137] | 105 | $($(TARGET)_CC) $($(TARGET)_CC_OPT) $(FLAGS_255.vortex) -o $@ -c $^ ; |
---|
[117] | 106 | |
---|
[123] | 107 | $(DIR_OBJ)/197.parser_%.o : $(SPECINT2000_PATH)/197.parser/src/%.c |
---|
| 108 | @\ |
---|
| 109 | $(ECHO) "Compilation : $*.c"; \ |
---|
[137] | 110 | $($(TARGET)_CC) $($(TARGET)_CC_OPT) $(FLAGS_197.parser) -o $@ -c $^ ; |
---|
[123] | 111 | |
---|
| 112 | $(DIR_OBJ)/252.eon_%.o : $(SPECINT2000_PATH)/252.eon/src/%.c |
---|
| 113 | @\ |
---|
| 114 | $(ECHO) "Compilation : $*.c"; \ |
---|
[137] | 115 | $($(TARGET)_CC) $($(TARGET)_CC_OPT) $(FLAGS_252.eon) -o $@ -c $^ ; |
---|
[123] | 116 | |
---|
| 117 | $(DIR_OBJ)/253.perlbmk_%.o : $(SPECINT2000_PATH)/253.perlbmk/src/%.c |
---|
| 118 | @\ |
---|
| 119 | $(ECHO) "Compilation : $*.c"; \ |
---|
[137] | 120 | $($(TARGET)_CC) $($(TARGET)_CC_OPT) $(FLAGS_253.perlbmk) -o $@ -c $^ ; |
---|
[123] | 121 | |
---|
| 122 | $(DIR_OBJ)/254.gap_%.o : $(SPECINT2000_PATH)/254.gap/src/%.c |
---|
| 123 | @\ |
---|
| 124 | $(ECHO) "Compilation : $*.c"; \ |
---|
[137] | 125 | $($(TARGET)_CC) $($(TARGET)_CC_OPT) $(FLAGS_254.gap) -o $@ -c $^ ; |
---|
[123] | 126 | |
---|
[119] | 127 | $(DIR_OBJ)/256.bzip2_%.o : $(SPECINT2000_PATH)/256.bzip2/src/%.c |
---|
| 128 | @\ |
---|
| 129 | $(ECHO) "Compilation : $*.c"; \ |
---|
[137] | 130 | $($(TARGET)_CC) $($(TARGET)_CC_OPT) $(FLAGS_256.bzip2) -o $@ -c $^ ; |
---|
[117] | 131 | |
---|
[119] | 132 | $(DIR_OBJ)/300.twolf_%.o : $(SPECINT2000_PATH)/300.twolf/src/%.c |
---|
| 133 | @\ |
---|
| 134 | $(ECHO) "Compilation : $*.c"; \ |
---|
[137] | 135 | $($(TARGET)_CC) $($(TARGET)_CC_OPT) $(FLAGS_300.twolf) -o $@ -c $^ ; |
---|