summaryrefslogblamecommitdiffstats
path: root/baseline/Makefile
blob: a929bc677c2026eb95faa5968ca0a88e975bac31 (plain) (tree)
1
2
3
4
5
6
7
8
                                   
         
                                   
              
                   

                                                                     
                                                 



                                                        
                                                   

                                                                                 

     

                                                                                                                                                                                                                                                                                                                  


                       

             
                                                                                                                                                                                                                                                                                                                           
 
                                                                                          
                                           
                                                    
                                           
                                                 
                                           
                                                                              
                                           
                                                                                      
                                           
                                                                                                                                               
                                           
                                                       
                                           
                                                                                                                                                                              
                                           
                                                    
                                           
                                                                                                                                                                          
                                           
                                                 
                                           
                                                                                                                    
                                           
                                        
                                           
                                                                                                                                                        
                                           
                                                    
                                           
                                        
                                           
                                                    
                                           
                                                       
                                           
                                                                      
                                           
                                           
                                           
                                                                    
                                           
                                                                                                                                                                      
                                           
                                                       
                                           
 
LIBLITMUS ?= /playpen/mc2/liblitmus
CC ?= gcc
override CFLAGS = -pthread -O2 -I..
LDFLAGS = -lrt
COMMON = ../extra.h

# Handle cases where we're also profiling with the MMDC on the i.MX6Q
ifneq ($(shell grep "define MMDC 1" ../extra.h),)
	COMMON += /media/speedy/litmus/tools/mmdc/mmdc.c
endif

# Include all the LITMUS^RT headers if we're using it
ifneq ($(shell grep "define LITMUS 1" ../extra.h),)
	override CFLAGS += -I${LIBLITMUS}/include -I${LIBLITMUS}/arch/arm/include
	override LDFLAGS += -L${LIBLITMUS} -llitmus
endif

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

debug: all
debug: CFLAGS += -ggdb3

.PHONY: clean
clean:
	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

bin/cjpeg_wrbmp: ${COMMON} ./source/cjpeg_wrbmp/cjpeg_wrbmp.c ./source/cjpeg_wrbmp/input.c
	$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
bin/huff_enc: ${COMMON} ./source/huff_enc/huff_enc.c
	$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
bin/gsm_enc: ${COMMON} ./source/gsm_enc/gsm_enc.c
	$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
bin/dijkstra: ${COMMON} ./source/dijkstra/dijkstra.c ./source/dijkstra/input.c
	$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
bin/h264_dec: ${COMMON} ./source/h264_dec/h264_dec.c ./source/h264_dec/h264_decinput.c
	$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
bin/susan: ${COMMON} ./source/susan/input.c ./source/susan/susan.c ./source/susan/wccfile.c ./source/susan/wcclibm.c ./source/susan/wccmalloc.c
	$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
bin/adpcm_enc: ${COMMON} ./source/adpcm_enc/adpcm_enc.c
	$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
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
	$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
bin/huff_dec: ${COMMON} ./source/huff_dec/huff_dec.c
	$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
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
	$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
bin/gsm_dec: ${COMMON} ./source/gsm_dec/gsm_dec.c
	$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
bin/anagram: ${COMMON} ./source/anagram/anagram.c ./source/anagram/anagram_input.c ./source/anagram/anagram_stdlib.c
	$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
bin/epic: ${COMMON} ./source/epic/epic.c
	$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
bin/ammunition: ${COMMON} ./source/ammunition/ammunition.c ./source/ammunition/ammunition_libc.c ./source/ammunition/arithm.c ./source/ammunition/bits.c
	$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
bin/g723_enc: ${COMMON} ./source/g723_enc/g723_enc.c
	$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
bin/ndes: ${COMMON} ./source/ndes/ndes.c
	$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
bin/petrinet: ${COMMON} ./source/petrinet/petrinet.c
	$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
bin/statemate: ${COMMON} ./source/statemate/statemate.c
	$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
bin/cjpeg_transupp: ${COMMON} ./source/cjpeg_transupp/cjpeg_transupp.c
	$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
bin/mpeg2: ${COMMON} ./source/mpeg2/mpeg2.c
	$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
bin/fmref: ${COMMON} ./source/fmref/fmref.c ./source/fmref/wcclibm.c
	$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
bin/audiobeam: ${COMMON} ./source/audiobeam/audiobeam.c ./source/audiobeam/audiobeaminput.c ./source/audiobeam/audiobeamlibmalloc.c ./source/audiobeam/audiobeamlibm.c
	$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
bin/adpcm_dec: ${COMMON} ./source/adpcm_dec/adpcm_dec.c
	$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)