diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b0f38ab --- /dev/null +++ b/Makefile @@ -0,0 +1,30 @@ +COMMON += -ggdb3 -O0 -Wpedantic -Wall -Werror -Wextra -std=c89 +TRGT = libparapat.a libparapat.so + +.PHONY: default all clean test + +default: all + +all: $(TRGT) + +%.o: %.c + $(CC) $(COMMON) -c -MMD -MP -o $@ $< + +%.pic.o: %.c + $(CC) $(COMMON) -c -fPIC -MMD -MP -o $@ $< + +libparapat.so: parapat.pic.o queue.pic.o + $(CC) $(COMMON) -shared -o $@ $^ + +.NOTPARALLEL: libparapat.a + +libparapat.a: libparapat.a(parapat.o) libparapat.a(queue.o) + +test: $(TRGT) + (cd test && $(MAKE)) + +clean: + $(RM) $(TRGT) *.o *.d + $(MAKE) -C test clean + +-include $(wildcard *.d) |
