1 all : IID_to_MPH.c 2 3 install : IID_to_MPH.c 4 cp IID_to_MPH.c ../../src/autogen 5 6 CFLAGS = -I../../include -g -DNDEBUG 7 8 %.o : %.c 9 gcc -c -o $@ $(CFLAGS) $< 10 11 IID_to_MPH.c : part1.c part2.c part3.c part4.c part5.c part6.c part7.c part8.c 12 $(RM) $@ 13 cat part1.c part2.c part3.c part4.c part5.c part6.c part7.c part8.c >> $@ 14 15 # part1.c is human-generated 16 17 part2.c : part23in.c 18 $(RM) $@ 19 grep '#define MAX_HASH_VALUE' part23in.c > $@ 20 21 part3.c : part23in.c 22 $(RM) $@ 23 # was 26,54p 24 sed -n '/static const unsigned .* asso_values.. =/,/^ };/p' < part23in.c >> $@ 25 26 # part4.c is human-generated 27 28 part5.c : part5gen 29 ./part5gen > $@ 30 31 # part6.c is human-generated 32 33 part7.c : part23in.c hash.sed 34 # was 55p 35 sed -n '/return.*asso_values/p' < part23in.c | sed -f hash.sed >> $@ 36 37 # part8.c is human_generated 38 39 part23in.c : part23in.gperf 40 gperf --null-strings --readonly-tables --no-strlen part23in.gperf > part23in.c 41 42 part23in.gperf : frag1 43 ./frag1 > part23in.gperf 44 45 frag1 : frag1.o OpenSLES_IID.o 46 gcc -o $@ $(CFLAGS) frag1.o OpenSLES_IID.o 47 48 part5gen.c : frag2.c part23in.c frag3.c 49 $(RM) $@ 50 cp frag2.c $@ 51 grep '#define MAX_HASH_VALUE' part23in.c >> $@ 52 # was 81,156p 53 sed -n '/static const char . const wordlist.. =/,/^ };/p' < part23in.c >> $@ 54 cat frag3.c >> $@ 55 56 part5gen : part5gen.o OpenSLES_IID.o interfaces.o 57 gcc -o $@ $(CFLAGS) part5gen.o OpenSLES_IID.o interfaces.o 58 59 clean : 60 $(RM) part5gen frag1 *.o 61 $(RM) part23in.gperf part5gen.c part23in.c 62 $(RM) part2.c part3.c part5.c part7.c 63 64 distclean : clean 65 $(RM) IID_to_MPH.c 66