diff options
| author | Joshua Bakita <jbakita@cs.unc.edu> | 2020-10-19 01:09:53 -0400 |
|---|---|---|
| committer | Joshua Bakita <jbakita@cs.unc.edu> | 2020-10-19 01:09:53 -0400 |
| commit | a71fc97fd262e1b5770f827047ea60bbaf38d9a2 (patch) | |
| tree | b45ef48c63a35817f2db93dd2fec718778f58b99 /baseline/Makefile | |
| parent | 41358857592f1908d0c0f9898b6c9acabc1ad161 (diff) | |
Unify all the versions of extra.h into a single multipurpose header
There was previously a huge amount of shared code that had to be
copied back and forth. This should reduce the maintenance burden
by containing all future changes to a single file.
New unified library is fully backwards-compatible but also
introduces and the easy-to-use `for_each_job` macro which
replaces the specific `for(...) START_LOOP ... STOP_LOOP`
format requirement and is generally much harder to abuse.
New unified library also automatically cleans up its shared memory
and semaphores, so this commit also removes the separate
`cleanupSemaphores` binary.
I also found a precursor of `extra.h` written by Sims in
`litmusStuff.h`. This code is only interesting for historical
purposes, so it is also removed in this commit.
This commit also adds debug options to all the Makefiles and
silences rm's complaints about non-existent files in make clean.
Diffstat (limited to 'baseline/Makefile')
| -rw-r--r-- | baseline/Makefile | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/baseline/Makefile b/baseline/Makefile index ef39b7d..40b57f4 100644 --- a/baseline/Makefile +++ b/baseline/Makefile | |||
| @@ -1,25 +1,28 @@ | |||
| 1 | LIBLITMUS ?= /media/speedy/litmus/liblitmus | 1 | LIBLITMUS ?= /media/speedy/litmus/liblitmus |
| 2 | CC ?= gcc | 2 | CC ?= gcc |
| 3 | CFLAGS = -pthread -O2 | 3 | CFLAGS = -pthread -O2 -I.. |
| 4 | LDFLAGS = -lrt | 4 | LDFLAGS = -lrt |
| 5 | COMMON = ./source/extra.h | 5 | COMMON = ../extra.h |
| 6 | 6 | ||
| 7 | # Handle cases where we're also profiling with the MMDC on the i.MX6Q | 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),) | 8 | ifneq ($(shell grep "define MMDC 1" ../extra.h),) |
| 9 | COMMON += /media/speedy/litmus/tools/mmdc/mmdc.c | 9 | COMMON += /media/speedy/litmus/tools/mmdc/mmdc.c |
| 10 | endif | 10 | endif |
| 11 | 11 | ||
| 12 | # Include all the LITMUS^RT headers if we're using it | 12 | # Include all the LITMUS^RT headers if we're using it |
| 13 | ifneq ($(shell grep "define LITMUS 1" source/extra.h),) | 13 | ifneq ($(shell grep "define LITMUS 1" ../extra.h),) |
| 14 | CFLAGS += -I${LIBLITMUS}/include -I${LIBLITMUS}/arch/arm/include | 14 | CFLAGS += -I${LIBLITMUS}/include -I${LIBLITMUS}/arch/arm/include |
| 15 | LDFLAGS += -L${LIBLITMUS} -llitmus | 15 | LDFLAGS += -L${LIBLITMUS} -llitmus |
| 16 | endif | 16 | endif |
| 17 | 17 | ||
| 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 | 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 |
| 19 | 19 | ||
| 20 | debug: all | ||
| 21 | debug: CFLAGS += -ggdb3 | ||
| 22 | |||
| 20 | .PHONY: clean | 23 | .PHONY: clean |
| 21 | clean: | 24 | clean: |
| 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 | 25 | rm -f 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 |
| 23 | 26 | ||
| 24 | bin/cjpeg_wrbmp: ${COMMON} ./source/cjpeg_wrbmp/cjpeg_wrbmp.c ./source/cjpeg_wrbmp/input.c | 27 | bin/cjpeg_wrbmp: ${COMMON} ./source/cjpeg_wrbmp/cjpeg_wrbmp.c ./source/cjpeg_wrbmp/input.c |
| 25 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) | 28 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) |
