1 | # |
---|
2 | # $Id: Makefile 138 2010-05-12 17:34:01Z rosiere $ |
---|
3 | # |
---|
4 | # [ Description ] |
---|
5 | # |
---|
6 | # Makefile |
---|
7 | # |
---|
8 | |
---|
9 | include Makefile.defs |
---|
10 | |
---|
11 | #-----[ Specint variable ]-------------------------------------------------------- |
---|
12 | |
---|
13 | SPECINT2000_PATH = /users/cao/kane/Project/SPEC_CPU2000/benchspec/CINT2000 |
---|
14 | SPECINT2000_PATHS = $(addprefix $(SPECINT2000_PATH)/, $(BENCHS)) |
---|
15 | |
---|
16 | SPECINT2000_PATH_INC = $(addprefix -I, $(addsuffix /src, $(SPECINT2000_PATHS))) |
---|
17 | SPECINT2000_PATH_SRC = $(wildcard $(addsuffix /src , $(SPECINT2000_PATHS))) |
---|
18 | SPECINT2000_OBJECTS = $(foreach bench,$(BENCHS),$(addprefix $(DIR_OBJ)/$(bench)_, $(addsuffix .o, $(basename $(notdir $(wildcard $(SPECINT2000_PATH)/$(bench)/src/*.c)))))) |
---|
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 | ))))))))))) |
---|
31 | |
---|
32 | #-----[ Directory ]--------------------------------------------------------------- |
---|
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 |
---|
41 | DIR_LDSCRIPT = $($(OS)_DIR_LDSCRIPT) |
---|
42 | |
---|
43 | INCDIR = $($(OS)_INCDIR) -I$(DIR_INC) |
---|
44 | LIBDIR = $($(OS)_LIBDIR) |
---|
45 | LIBNAME = $($(OS)_LIBNAME) |
---|
46 | |
---|
47 | #-----[ Flags ]------------------------------------------------------------------- |
---|
48 | |
---|
49 | FLAGS = -DSPECINT2000_PATH=\"$(SPECINT2000_PATH)\" -DNB_THREAD_MAX=$(NB_THREAD_MAX) $(SPECINT2000_FLAGS) $(BENCHS_TYPE) |
---|
50 | |
---|
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 | |
---|
64 | #-----[ Files ]------------------------------------------------------------------- |
---|
65 | OBJECTS = $($(OS)_OBJECTS) \ |
---|
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 |
---|
75 | include $(DIR_SOFT)/Makefile.Workload |
---|
76 | |
---|
77 | $(DIR_OBJ)/164.gzip_%.o : $(SPECINT2000_PATH)/164.gzip/src/%.c |
---|
78 | @\ |
---|
79 | $(ECHO) "Compilation : $*.c"; \ |
---|
80 | $($(TARGET)_CC) $($(TARGET)_CC_OPT) $(FLAGS_164.gzip) -o $@ -c $^ ; |
---|
81 | |
---|
82 | $(DIR_OBJ)/175.vpr_%.o : $(SPECINT2000_PATH)/175.vpr/src/%.c |
---|
83 | @\ |
---|
84 | $(ECHO) "Compilation : $*.c"; \ |
---|
85 | $($(TARGET)_CC) $($(TARGET)_CC_OPT) $(FLAGS_175.vpr) -o $@ -c $^ ; |
---|
86 | |
---|
87 | $(DIR_OBJ)/176.gcc_%.o : $(SPECINT2000_PATH)/176.gcc/src/%.c |
---|
88 | @\ |
---|
89 | $(ECHO) "Compilation : $*.c"; \ |
---|
90 | $($(TARGET)_CC) $($(TARGET)_CC_OPT) $(FLAGS_176.gcc) -o $@ -c $^ ; |
---|
91 | |
---|
92 | $(DIR_OBJ)/181.mcf_%.o : $(SPECINT2000_PATH)/181.mcf/src/%.c |
---|
93 | @\ |
---|
94 | $(ECHO) "Compilation : $*.c"; \ |
---|
95 | $($(TARGET)_CC) $($(TARGET)_CC_OPT) $(FLAGS_181.mcf) -o $@ -c $^ ; |
---|
96 | |
---|
97 | $(DIR_OBJ)/186.crafty_%.o : $(SPECINT2000_PATH)/186.crafty/src/%.c |
---|
98 | @\ |
---|
99 | $(ECHO) "Compilation : $*.c"; \ |
---|
100 | $($(TARGET)_CC) $($(TARGET)_CC_OPT) $(FLAGS_186.crafty) -o $@ -c $^ ; |
---|
101 | |
---|
102 | $(DIR_OBJ)/255.vortex_%.o : $(SPECINT2000_PATH)/255.vortex/src/%.c |
---|
103 | @\ |
---|
104 | $(ECHO) "Compilation : $*.c"; \ |
---|
105 | $($(TARGET)_CC) $($(TARGET)_CC_OPT) $(FLAGS_255.vortex) -o $@ -c $^ ; |
---|
106 | |
---|
107 | $(DIR_OBJ)/197.parser_%.o : $(SPECINT2000_PATH)/197.parser/src/%.c |
---|
108 | @\ |
---|
109 | $(ECHO) "Compilation : $*.c"; \ |
---|
110 | $($(TARGET)_CC) $($(TARGET)_CC_OPT) $(FLAGS_197.parser) -o $@ -c $^ ; |
---|
111 | |
---|
112 | $(DIR_OBJ)/252.eon_%.o : $(SPECINT2000_PATH)/252.eon/src/%.c |
---|
113 | @\ |
---|
114 | $(ECHO) "Compilation : $*.c"; \ |
---|
115 | $($(TARGET)_CC) $($(TARGET)_CC_OPT) $(FLAGS_252.eon) -o $@ -c $^ ; |
---|
116 | |
---|
117 | $(DIR_OBJ)/253.perlbmk_%.o : $(SPECINT2000_PATH)/253.perlbmk/src/%.c |
---|
118 | @\ |
---|
119 | $(ECHO) "Compilation : $*.c"; \ |
---|
120 | $($(TARGET)_CC) $($(TARGET)_CC_OPT) $(FLAGS_253.perlbmk) -o $@ -c $^ ; |
---|
121 | |
---|
122 | $(DIR_OBJ)/254.gap_%.o : $(SPECINT2000_PATH)/254.gap/src/%.c |
---|
123 | @\ |
---|
124 | $(ECHO) "Compilation : $*.c"; \ |
---|
125 | $($(TARGET)_CC) $($(TARGET)_CC_OPT) $(FLAGS_254.gap) -o $@ -c $^ ; |
---|
126 | |
---|
127 | $(DIR_OBJ)/256.bzip2_%.o : $(SPECINT2000_PATH)/256.bzip2/src/%.c |
---|
128 | @\ |
---|
129 | $(ECHO) "Compilation : $*.c"; \ |
---|
130 | $($(TARGET)_CC) $($(TARGET)_CC_OPT) $(FLAGS_256.bzip2) -o $@ -c $^ ; |
---|
131 | |
---|
132 | $(DIR_OBJ)/300.twolf_%.o : $(SPECINT2000_PATH)/300.twolf/src/%.c |
---|
133 | @\ |
---|
134 | $(ECHO) "Compilation : $*.c"; \ |
---|
135 | $($(TARGET)_CC) $($(TARGET)_CC_OPT) $(FLAGS_300.twolf) -o $@ -c $^ ; |
---|