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