X-Git-Url: http://git.meshlink.io/?p=utcp;a=blobdiff_plain;f=Makefile;h=134ca516bf34d3605fa00cc5c1bb9dd67bc2f388;hp=c7232b9bbff76ddf78b27563c791ec22ae6fa38b;hb=HEAD;hpb=95d7d348316f1ed8d2ff3e37cb7f962abf4a7f84 diff --git a/Makefile b/Makefile index c7232b9..134ca51 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,23 @@ -CFLAGS ?= -O0 -Wall -g -CFLAGS += -std=c99 +CFLAGS ?= -Og -Wall -W -pedantic -g +CFLAGS += -std=c99 -DUTCP_DEBUG -test: utcp.c test.c +BIN = selftest test -selftest: utcp.c selftest.c +all: $(BIN) + +utcp.o: utcp.c utcp.h utcp_priv.h + +test: utcp.o test.c + +stream: stream.c + +selftest: utcp.o selftest.c clean: - rm -f *.o test selftest + rm -f *.o $(BIN) + +astyle: + @astyle --version | grep -q "Version 3" || (echo 'ERROR: astyle version 3 required!' 1>&2 && exit 1) + astyle --options=.astylerc -nQ *.c *.h -.PHONY: clean +.PHONY: clean astyle