Home | History | Annotate | Download | only in cn-cbor
      1 # enable this for armv7 builds, lazily using iPhone SDK
      2 #CFLAGS = -I /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include -arch armv7 -Os
      3 CFLAGS = -Os -Wall -Wextra -Wno-unknown-pragmas -Werror-implicit-function-declaration -Werror -Wno-unused-parameter -Wdeclaration-after-statement -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Iinclude
      4 
      5 all: cntest
      6 
      7 test: cntest
      8 	(cd test; env MallocStackLogging=true ../cntest) >new.out
      9 	-diff new.out test/expected.out
     10 
     11 cntest: src/cbor.h include/cn-cbor/cn-cbor.h src/cn-cbor.c src/cn-error.c src/cn-get.c test/test.c
     12 	clang $(CFLAGS) src/cn-cbor.c src/cn-error.c src/cn-get.c test/test.c -o cntest
     13 
     14 size: cn-cbor.o
     15 	size cn-cbor.o
     16 	size -m cn-cbor.o
     17 
     18 cn-cbor.o: src/cn-cbor.c include/cn-cbor/cn-cbor.h src/cbor.h
     19 	clang $(CFLAGS) -c src/cn-cbor.c
     20 
     21 cn-cbor-play.zip: Makefile src/cbor.h src/cn-cbor.c include/cn-cbor/cn-cbor.h test/expected.out test/test.c
     22 	zip $@ $^
     23 
     24 clean:
     25 	$(RM) cntest *.o new.out cn-cbor-play.zip
     26