summaryrefslogtreecommitdiff
path: root/Makefile
blob: b0f38aba12668d15f993a2d5e5266abdba7b3977 (plain) (blame)
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
26
27
28
29
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)