summaryrefslogtreecommitdiffstats
path: root/baseline/Makefile
diff options
context:
space:
mode:
authorJoshua Bakita <jbakita@cs.unc.edu>2020-10-19 01:09:53 -0400
committerJoshua Bakita <jbakita@cs.unc.edu>2020-10-19 01:09:53 -0400
commita71fc97fd262e1b5770f827047ea60bbaf38d9a2 (patch)
treeb45ef48c63a35817f2db93dd2fec718778f58b99 /baseline/Makefile
parent41358857592f1908d0c0f9898b6c9acabc1ad161 (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/Makefile13
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 @@
1LIBLITMUS ?= /media/speedy/litmus/liblitmus 1LIBLITMUS ?= /media/speedy/litmus/liblitmus
2CC ?= gcc 2CC ?= gcc
3CFLAGS = -pthread -O2 3CFLAGS = -pthread -O2 -I..
4LDFLAGS = -lrt 4LDFLAGS = -lrt
5COMMON = ./source/extra.h 5COMMON = ../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
8ifneq ($(shell grep "define MMDC 1" source/extra.h),) 8ifneq ($(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
10endif 10endif
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
13ifneq ($(shell grep "define LITMUS 1" source/extra.h),) 13ifneq ($(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
16endif 16endif
17 17
18all: 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 18all: 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
20debug: all
21debug: CFLAGS += -ggdb3
22
20.PHONY: clean 23.PHONY: clean
21clean: 24clean:
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
24bin/cjpeg_wrbmp: ${COMMON} ./source/cjpeg_wrbmp/cjpeg_wrbmp.c ./source/cjpeg_wrbmp/input.c 27bin/cjpeg_wrbmp: ${COMMON} ./source/cjpeg_wrbmp/cjpeg_wrbmp.c ./source/cjpeg_wrbmp/input.c
25 $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) 28 $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)