forked from cabo/cn-cbor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Simple-Makefile
25 lines (18 loc) · 1 KB
/
Simple-Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# enable this for armv7 builds, lazily using iPhone SDK
#CFLAGS = -I /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include -arch armv7 -Os
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
all: cntest
test: cntest
(cd test; env MallocStackLogging=true ../cntest) >new.out
-diff new.out test/expected.out
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
clang $(CFLAGS) src/cn-cbor.c src/cn-error.c src/cn-get.c test/test.c -o cntest
size: cn-cbor.o
size cn-cbor.o
size -m cn-cbor.o
cn-cbor.o: src/cn-cbor.c include/cn-cbor/cn-cbor.h src/cbor.h
clang $(CFLAGS) -c src/cn-cbor.c
cn-cbor-play.zip: Makefile src/cbor.h src/cn-cbor.c include/cn-cbor/cn-cbor.h test/expected.out test/test.c
zip $@ $^
clean:
$(RM) cntest *.o new.out cn-cbor-play.zip