diff options
| author | Joshua Bakita <bakitajoshua@gmail.com> | 2020-05-26 21:38:52 -0400 |
|---|---|---|
| committer | Joshua Bakita <bakitajoshua@gmail.com> | 2020-05-26 21:51:16 -0400 |
| commit | b0a383d5bd705e9e38b38e6a3ec00eb53166f1b6 (patch) | |
| tree | c6a574719690eb62d5a85d5db72d10d3d047dd16 /baseline/Makefile | |
| parent | 4f1aa00f177646b5129304a7d587658aad949946 (diff) | |
Code cleanup and bugfixes for infrastructure code
- Remove unused parameters to extra.h
- Use floats to avoid integer overflow when timing long loops
- Only include litmus headers and/or MMDC headers if the appropriate
define is set in extra.h
- Update job parameters to match those used in my PRP experiments
Diffstat (limited to 'baseline/Makefile')
| -rw-r--r-- | baseline/Makefile | 63 |
1 files changed, 39 insertions, 24 deletions
diff --git a/baseline/Makefile b/baseline/Makefile index 53f53f4..ef39b7d 100644 --- a/baseline/Makefile +++ b/baseline/Makefile | |||
| @@ -1,55 +1,70 @@ | |||
| 1 | CC = gcc | 1 | LIBLITMUS ?= /media/speedy/litmus/liblitmus |
| 2 | CC ?= gcc | ||
| 2 | CFLAGS = -pthread -O2 | 3 | CFLAGS = -pthread -O2 |
| 3 | LDFLAGS = -lrt | 4 | LDFLAGS = -lrt |
| 5 | COMMON = ./source/extra.h | ||
| 6 | |||
| 7 | # Handle cases where we're also profiling with the MMDC on the i.MX6Q | ||
| 8 | ifneq ($(shell grep "define MMDC 1" source/extra.h),) | ||
| 9 | COMMON += /media/speedy/litmus/tools/mmdc/mmdc.c | ||
| 10 | endif | ||
| 11 | |||
| 12 | # Include all the LITMUS^RT headers if we're using it | ||
| 13 | ifneq ($(shell grep "define LITMUS 1" source/extra.h),) | ||
| 14 | CFLAGS += -I${LIBLITMUS}/include -I${LIBLITMUS}/arch/arm/include | ||
| 15 | LDFLAGS += -L${LIBLITMUS} -llitmus | ||
| 16 | endif | ||
| 17 | |||
| 4 | all: bin/cjpeg_wrbmp bin/huff_enc bin/gsm_enc bin/dijkstra bin/h264_dec bin/susan bin/adpcm_enc bin/rijndael_dec bin/huff_dec bin/rijndael_enc bin/gsm_dec bin/anagram bin/epic bin/ammunition bin/g723_enc bin/ndes bin/petrinet bin/statemate bin/cjpeg_transupp bin/mpeg2 bin/fmref bin/audiobeam bin/adpcm_dec | 18 | all: bin/cjpeg_wrbmp bin/huff_enc bin/gsm_enc bin/dijkstra bin/h264_dec bin/susan bin/adpcm_enc bin/rijndael_dec bin/huff_dec bin/rijndael_enc bin/gsm_dec bin/anagram bin/epic bin/ammunition bin/g723_enc bin/ndes bin/petrinet bin/statemate bin/cjpeg_transupp bin/mpeg2 bin/fmref bin/audiobeam bin/adpcm_dec |
| 5 | 19 | ||
| 6 | .PHONY: clean | 20 | .PHONY: clean |
| 7 | clean: | 21 | clean: |
| 8 | rm bin/cjpeg_wrbmp bin/huff_enc bin/gsm_enc bin/dijkstra bin/h264_dec bin/susan bin/adpcm_enc bin/rijndael_dec bin/huff_dec bin/rijndael_enc bin/gsm_dec bin/anagram bin/epic bin/ammunition bin/g723_enc bin/ndes bin/petrinet bin/statemate bin/cjpeg_transupp bin/mpeg2 bin/fmref bin/audiobeam bin/adpcm_dec | 22 | rm bin/cjpeg_wrbmp bin/huff_enc bin/gsm_enc bin/dijkstra bin/h264_dec bin/susan bin/adpcm_enc bin/rijndael_dec bin/huff_dec bin/rijndael_enc bin/gsm_dec bin/anagram bin/epic bin/ammunition bin/g723_enc bin/ndes bin/petrinet bin/statemate bin/cjpeg_transupp bin/mpeg2 bin/fmref bin/audiobeam bin/adpcm_dec |
| 9 | 23 | ||
| 10 | bin/cjpeg_wrbmp: ./source/extra.h ./source/cjpeg_wrbmp/cjpeg_wrbmp.c ./source/cjpeg_wrbmp/input.c | 24 | bin/cjpeg_wrbmp: ${COMMON} ./source/cjpeg_wrbmp/cjpeg_wrbmp.c ./source/cjpeg_wrbmp/input.c |
| 11 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) | 25 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) |
| 12 | bin/huff_enc: ./source/extra.h ./source/huff_enc/huff_enc.c | 26 | bin/huff_enc: ${COMMON} ./source/huff_enc/huff_enc.c |
| 13 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) | 27 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) |
| 14 | bin/gsm_enc: ./source/extra.h ./source/gsm_enc/gsm_enc.c | 28 | bin/gsm_enc: ${COMMON} ./source/gsm_enc/gsm_enc.c |
| 15 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) | 29 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) |
| 16 | bin/dijkstra: ./source/extra.h ./source/dijkstra/dijkstra.c ./source/dijkstra/input.c | 30 | bin/dijkstra: ${COMMON} ./source/dijkstra/dijkstra.c ./source/dijkstra/input.c |
| 17 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) | 31 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) |
| 18 | bin/h264_dec: ./source/extra.h ./source/h264_dec/h264_dec.c ./source/h264_dec/h264_decinput.c | 32 | bin/h264_dec: ${COMMON} ./source/h264_dec/h264_dec.c ./source/h264_dec/h264_decinput.c |
| 19 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) | 33 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) |
| 20 | bin/susan: ./source/extra.h ./source/susan/input.c ./source/susan/susan.c ./source/susan/wccfile.c ./source/susan/wcclibm.c ./source/susan/wccmalloc.c | 34 | bin/susan: ${COMMON} ./source/susan/input.c ./source/susan/susan.c ./source/susan/wccfile.c ./source/susan/wcclibm.c ./source/susan/wccmalloc.c |
| 21 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) | 35 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) |
| 22 | bin/adpcm_enc: ./source/extra.h ./source/adpcm_enc/adpcm_enc.c | 36 | bin/adpcm_enc: ${COMMON} ./source/adpcm_enc/adpcm_enc.c |
| 23 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) | 37 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) |
| 24 | bin/rijndael_dec: ./source/extra.h ./source/rijndael_dec/aes.c ./source/rijndael_dec/input_small_enc.c ./source/rijndael_dec/rijndael_dec.c ./source/rijndael_dec/rijndael_dec_libc.c | 38 | bin/rijndael_dec: ${COMMON} ./source/rijndael_dec/aes.c ./source/rijndael_dec/input_small_enc.c ./source/rijndael_dec/rijndael_dec.c ./source/rijndael_dec/rijndael_dec_libc.c |
| 25 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) | 39 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) |
| 26 | bin/huff_dec: ./source/extra.h ./source/huff_dec/huff_dec.c | 40 | bin/huff_dec: ${COMMON} ./source/huff_dec/huff_dec.c |
| 27 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) | 41 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) |
| 28 | bin/rijndael_enc: ./source/extra.h ./source/rijndael_enc/aes.c ./source/rijndael_enc/input_small.c ./source/rijndael_enc/rijndael_enc.c ./source/rijndael_enc/rijndael_enc_libc.c | 42 | bin/rijndael_enc: ${COMMON} ./source/rijndael_enc/aes.c ./source/rijndael_enc/input_small.c ./source/rijndael_enc/rijndael_enc.c ./source/rijndael_enc/rijndael_enc_libc.c |
| 29 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) | 43 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) |
| 30 | bin/gsm_dec: ./source/extra.h ./source/gsm_dec/gsm_dec.c | 44 | bin/gsm_dec: ${COMMON} ./source/gsm_dec/gsm_dec.c |
| 31 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) | 45 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) |
| 32 | bin/anagram: ./source/extra.h ./source/anagram/anagram.c ./source/anagram/anagram_input.c ./source/anagram/anagram_stdlib.c | 46 | bin/anagram: ${COMMON} ./source/anagram/anagram.c ./source/anagram/anagram_input.c ./source/anagram/anagram_stdlib.c |
| 33 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) | 47 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) |
| 34 | bin/epic: ./source/extra.h ./source/epic/epic.c | 48 | bin/epic: ${COMMON} ./source/epic/epic.c |
| 35 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) | 49 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) |
| 36 | bin/ammunition: ./source/extra.h ./source/ammunition/ammunition.c ./source/ammunition/ammunition_libc.c ./source/ammunition/arithm.c ./source/ammunition/bits.c | 50 | bin/ammunition: ${COMMON} ./source/ammunition/ammunition.c ./source/ammunition/ammunition_libc.c ./source/ammunition/arithm.c ./source/ammunition/bits.c |
| 37 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) | 51 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) |
| 38 | bin/g723_enc: ./source/extra.h ./source/g723_enc/g723_enc.c | 52 | bin/g723_enc: ${COMMON} ./source/g723_enc/g723_enc.c |
| 39 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) | 53 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) |
| 40 | bin/ndes: ./source/extra.h ./source/ndes/ndes.c | 54 | bin/ndes: ${COMMON} ./source/ndes/ndes.c |
| 41 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) | 55 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) |
| 42 | bin/petrinet: ./source/extra.h ./source/petrinet/petrinet.c | 56 | bin/petrinet: ${COMMON} ./source/petrinet/petrinet.c |
| 43 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) | 57 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) |
| 44 | bin/statemate: ./source/extra.h ./source/statemate/statemate.c | 58 | bin/statemate: ${COMMON} ./source/statemate/statemate.c |
| 45 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) | 59 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) |
| 46 | bin/cjpeg_transupp: ./source/extra.h ./source/cjpeg_transupp/cjpeg_transupp.c | 60 | bin/cjpeg_transupp: ${COMMON} ./source/cjpeg_transupp/cjpeg_transupp.c |
| 47 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) | 61 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) |
| 48 | bin/mpeg2: ./source/extra.h ./source/mpeg2/mpeg2.c | 62 | bin/mpeg2: ${COMMON} ./source/mpeg2/mpeg2.c |
| 49 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) | 63 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) |
| 50 | bin/fmref: ./source/extra.h ./source/fmref/fmref.c ./source/fmref/wcclibm.c | 64 | bin/fmref: ${COMMON} ./source/fmref/fmref.c ./source/fmref/wcclibm.c |
| 51 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) | 65 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) |
| 52 | bin/audiobeam: ./source/extra.h ./source/audiobeam/audiobeam.c ./source/audiobeam/audiobeaminput.c ./source/audiobeam/audiobeamlibmalloc.c ./source/audiobeam/audiobeamlibm.c | 66 | bin/audiobeam: ${COMMON} ./source/audiobeam/audiobeam.c ./source/audiobeam/audiobeaminput.c ./source/audiobeam/audiobeamlibmalloc.c ./source/audiobeam/audiobeamlibm.c |
| 53 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) | 67 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) |
| 54 | bin/adpcm_dec: ./source/extra.h ./source/adpcm_dec/adpcm_dec.c | 68 | bin/adpcm_dec: ${COMMON} ./source/adpcm_dec/adpcm_dec.c |
| 55 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) | 69 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) |
| 70 | |||
