Skip to content

Commit

Permalink
Adding updated makefiles to create O0 O1 O2 O3 binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
jsdjayanga committed Jul 17, 2013
1 parent dcd44a8 commit 8416c1c
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 18 deletions.
24 changes: 21 additions & 3 deletions phoenix-2.0.0/phoenix-2.0.0/tests/histogram/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ HIST_OBJS = histogram.o
HIST_SEQ_OBJS = histogram-seq.o
HIST_PTHREAD_OBJS = histogram-pthread.o

PROGS = histogram histogram-seq histogram-pthread
PROGS = histogram histogram-seq_O0 histogram-pthread_O0 histogram-seq_O1 histogram-pthread_O1 histogram-seq_O2 histogram-pthread_O2 histogram-seq_O3 histogram-pthread_O3

.PHONY: default all clean

Expand All @@ -48,11 +48,29 @@ all: $(PROGS)
histogram: $(HIST_OBJS) $(LIB_DEP)
$(CC) $(CFLAGS) -o $@ $(HIST_OBJS) $(LIBS)

histogram-seq: $(HIST_SEQ_OBJS)
histogram-seq_O0: $(HIST_SEQ_OBJS)
$(CC) $(CFLAGS) -o $@ $(HIST_SEQ_OBJS) $(LIBS)

histogram-pthread: $(HIST_PTHREAD_OBJS)
histogram-pthread_O0: $(HIST_PTHREAD_OBJS)
$(CC) $(CFLAGS) -o $@ $(HIST_PTHREAD_OBJS) $(LIBS)

histogram-seq_O1: $(HIST_SEQ_OBJS)
$(CC) -O1 $(CFLAGS) -o $@ $(HIST_SEQ_OBJS) $(LIBS)

histogram-pthread_O1: $(HIST_PTHREAD_OBJS)
$(CC) -O1 $(CFLAGS) -o $@ $(HIST_PTHREAD_OBJS) $(LIBS)

histogram-seq_O2: $(HIST_SEQ_OBJS)
$(CC) -O2 $(CFLAGS) -o $@ $(HIST_SEQ_OBJS) $(LIBS)

histogram-pthread_O2: $(HIST_PTHREAD_OBJS)
$(CC) -O2 $(CFLAGS) -o $@ $(HIST_PTHREAD_OBJS) $(LIBS)

histogram-seq_O3: $(HIST_SEQ_OBJS)
$(CC) -O3 $(CFLAGS) -o $@ $(HIST_SEQ_OBJS) $(LIBS)

histogram-pthread_O3: $(HIST_PTHREAD_OBJS)
$(CC) -O3 $(CFLAGS) -o $@ $(HIST_PTHREAD_OBJS) $(LIBS)

%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@ -I$(HOME)/$(INC_DIR)
Expand Down
28 changes: 23 additions & 5 deletions phoenix-2.0.0/phoenix-2.0.0/tests/linear_regression/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ L_REG_OBJS = linear_regression.o
L_REG_SEQ_OBJS = linear_regression-seq.o
L_REG_PTHREAD_OBJS = linear_regression-pthread.o

PROGS = linear_regression linear_regression-seq linear_regression-pthread
PROGS = linear_regression linear_regression-seq_O0 linear_regression-pthread_O0 linear_regression-seq_O1 linear_regression-pthread_O1 linear_regression-seq_O2 linear_regression-pthread_O2 linear_regression-seq_O3 linear_regression-pthread_O3

.PHONY: default all clean

Expand All @@ -48,12 +48,30 @@ all: $(PROGS)
linear_regression: $(L_REG_OBJS) $(LIB_DEP)
$(CC) $(CFLAGS) -o $@ $(L_REG_OBJS) $(LIBS)

linear_regression-seq: $(L_REG_SEQ_OBJS)
$(CC) $(CFLAGS) -o $@ $(L_REG_SEQ_OBJS) $(LIBS)
linear_regression-seq_O0: $(L_REG_SEQ_OBJS)
$(CC) -O0 $(CFLAGS) -o $@ $(L_REG_SEQ_OBJS) $(LIBS)

linear_regression-pthread: $(L_REG_PTHREAD_OBJS)
$(CC) $(CFLAGS) -o $@ $(L_REG_PTHREAD_OBJS) $(LIBS)
linear_regression-pthread_O0: $(L_REG_PTHREAD_OBJS)
$(CC) -O0 $(CFLAGS) -o $@ $(L_REG_PTHREAD_OBJS) $(LIBS)

linear_regression-seq_O1: $(L_REG_SEQ_OBJS)
$(CC) -O1 $(CFLAGS) -o $@ $(L_REG_SEQ_OBJS) $(LIBS)

linear_regression-pthread_O1: $(L_REG_PTHREAD_OBJS)
$(CC) -O1 $(CFLAGS) -o $@ $(L_REG_PTHREAD_OBJS) $(LIBS)

linear_regression-seq_O2: $(L_REG_SEQ_OBJS)
$(CC) -O2 $(CFLAGS) -o $@ $(L_REG_SEQ_OBJS) $(LIBS)

linear_regression-pthread_O2: $(L_REG_PTHREAD_OBJS)
$(CC) -O2 $(CFLAGS) -o $@ $(L_REG_PTHREAD_OBJS) $(LIBS)

linear_regression-seq_O3: $(L_REG_SEQ_OBJS)
$(CC) -O3 $(CFLAGS) -o $@ $(L_REG_SEQ_OBJS) $(LIBS)

linear_regression-pthread_O3: $(L_REG_PTHREAD_OBJS)
$(CC) -O3 $(CFLAGS) -o $@ $(L_REG_PTHREAD_OBJS) $(LIBS)

%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@ -I$(HOME)/$(INC_DIR)

Expand Down
28 changes: 23 additions & 5 deletions phoenix-2.0.0/phoenix-2.0.0/tests/string_match/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ STR_MATCH_OBJS = string_match.o
STR_MATCH_SEQ_OBJS = string_match-seq.o
STR_MATCH_PTHREAD_OBJS = string_match-pthread.o

PROGS = string_match string_match-seq string_match-pthread
PROGS = string_match string_match-seq_O0 string_match-pthread_O0 string_match-seq_O1 string_match-pthread_O1 string_match-seq_O2 string_match-pthread_O2 string_match-seq_O3 string_match-pthread_O3

.PHONY: default all clean

Expand All @@ -48,11 +48,29 @@ all: $(PROGS)
string_match: $(STR_MATCH_OBJS) $(LIB_DEP)
$(CC) $(CFLAGS) -o $@ $(STR_MATCH_OBJS) $(LIBS)

string_match-seq: $(STR_MATCH_SEQ_OBJS)
$(CC) $(CFLAGS) -o $@ $(STR_MATCH_SEQ_OBJS) $(LIBS)
string_match-seq_O0: $(STR_MATCH_SEQ_OBJS)
$(CC) -O0 $(CFLAGS) -o $@ $(STR_MATCH_SEQ_OBJS) $(LIBS)

string_match-pthread: $(STR_MATCH_PTHREAD_OBJS)
$(CC) $(CFLAGS) -o $@ $(STR_MATCH_PTHREAD_OBJS) $(LIBS)
string_match-pthread_O0: $(STR_MATCH_PTHREAD_OBJS)
$(CC) -O0 $(CFLAGS) -o $@ $(STR_MATCH_PTHREAD_OBJS) $(LIBS)

string_match-seq_O1: $(STR_MATCH_SEQ_OBJS)
$(CC) -O1 $(CFLAGS) -o $@ $(STR_MATCH_SEQ_OBJS) $(LIBS)

string_match-pthread_O1: $(STR_MATCH_PTHREAD_OBJS)
$(CC) -O1 $(CFLAGS) -o $@ $(STR_MATCH_PTHREAD_OBJS) $(LIBS)

string_match-seq_O2: $(STR_MATCH_SEQ_OBJS)
$(CC) -O2 $(CFLAGS) -o $@ $(STR_MATCH_SEQ_OBJS) $(LIBS)

string_match-pthread_O2: $(STR_MATCH_PTHREAD_OBJS)
$(CC) -O2 $(CFLAGS) -o $@ $(STR_MATCH_PTHREAD_OBJS) $(LIBS)

string_match-seq_O3: $(STR_MATCH_SEQ_OBJS)
$(CC) -O3 $(CFLAGS) -o $@ $(STR_MATCH_SEQ_OBJS) $(LIBS)

string_match-pthread_O3: $(STR_MATCH_PTHREAD_OBJS)
$(CC) -O3 $(CFLAGS) -o $@ $(STR_MATCH_PTHREAD_OBJS) $(LIBS)

%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@ -I$(HOME)/$(INC_DIR)
Expand Down
28 changes: 23 additions & 5 deletions phoenix-2.0.0/phoenix-2.0.0/tests/word_count/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ WC_OBJS := word_count.o sort.o
WC_OBJS_PTHREAD := word_count-pthread.o sort-pthread.o
WC_OBJS_SEQ := word_count-seq.o

PROGS := word_count word_count-pthread word_count-seq
PROGS := word_count word_count-pthread_O0 word_count-seq_O0 word_count-pthread_O1 word_count-seq_O1 word_count-pthread_O2 word_count-seq_O2 word_count-pthread_O3 word_count-seq_O3

.PHONY: default all clean

Expand All @@ -48,11 +48,29 @@ all: $(PROGS)
word_count: $(WC_OBJS) $(LIB_DEP)
$(CC) $(CFLAGS) -o $@ $(WC_OBJS) $(LIBS)

word_count-pthread: $(WC_OBJS_PTHREAD)
$(CC) $(CFLAGS) -o $@ $(WC_OBJS_PTHREAD) $(LIBS)
word_count-pthread_O0: $(WC_OBJS_PTHREAD)
$(CC) -O0 $(CFLAGS) -o $@ $(WC_OBJS_PTHREAD) $(LIBS)

word_count-seq: $(WC_OBJS_SEQ)
$(CC) $(CFLAGS) -o $@ $(WC_OBJS_SEQ) $(LIBS)
word_count-seq_O0: $(WC_OBJS_SEQ)
$(CC) -O0 $(CFLAGS) -o $@ $(WC_OBJS_SEQ) $(LIBS)

word_count-pthread_O1: $(WC_OBJS_PTHREAD)
$(CC) -O1 $(CFLAGS) -o $@ $(WC_OBJS_PTHREAD) $(LIBS)

word_count-seq_O1: $(WC_OBJS_SEQ)
$(CC) -O1 $(CFLAGS) -o $@ $(WC_OBJS_SEQ) $(LIBS)

word_count-pthread_O2: $(WC_OBJS_PTHREAD)
$(CC) -O2 $(CFLAGS) -o $@ $(WC_OBJS_PTHREAD) $(LIBS)

word_count-seq_O2: $(WC_OBJS_SEQ)
$(CC) -O2 $(CFLAGS) -o $@ $(WC_OBJS_SEQ) $(LIBS)

word_count-pthread_O3: $(WC_OBJS_PTHREAD)
$(CC) -O3 $(CFLAGS) -o $@ $(WC_OBJS_PTHREAD) $(LIBS)

word_count-seq_O3: $(WC_OBJS_SEQ)
$(CC) -O3 $(CFLAGS) -o $@ $(WC_OBJS_SEQ) $(LIBS)

%.o: %.c *.h
$(CC) $(CFLAGS) -c $< -o $@ -I$(HOME)/$(INC_DIR)
Expand Down

0 comments on commit 8416c1c

Please sign in to comment.