summaryrefslogtreecommitdiff
path: root/Makefile
blob: 100896ba8cf3a492a3b583f3c3d472be8843dddb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
.PHONY: all clean

OBJS = libtwn3.so libtwn3.debug.so twn3_test
CFLAGS = -g -Wall -Wpedantic

%.so: CFLAGS += -shared -fPIC
%.debug.so: CFLAGS += -DDEBUG

%.so :: %.c %.h
	$(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) $(LDLIBS)

%.debug.so :: %.c %.h
	$(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) $(LDLIBS)

twn3_test: LDLIBS = -ltwn3.debug
twn3_test: LDFLAGS = -L. -Wl,-rpath .

all: $(OBJS)

clean:
	$(RM) $(OBJS)