summaryrefslogblamecommitdiff
path: root/Makefile
blob: b0f38aba12668d15f993a2d5e5266abdba7b3977 (plain) (tree)





























                                                              
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)