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

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)

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

all: libyhy.so libyhy.debug.so yhy_test

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