summaryrefslogtreecommitdiff
path: root/Makefile
blob: 5c5268ac9fa2ab366931315138d9128aee9da5dd (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

CFLAGS = -g -Wall -Wpedantic

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

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

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

yhy_test: LDLIBS = -lyhy.debug
yhy_test: LDFLAGS = -L. -Wl,-rpath .

all: libyhy.so libyhy.debug.so yhy_test

clean:
	$(RM) libyhy.so
	$(RM) yhy_test