From f0cb3e813a51034dd0d8051aa7165b926e0d8411 Mon Sep 17 00:00:00 2001 From: cbdev Date: Sun, 18 Jun 2023 13:07:25 +0200 Subject: Initial basic library --- Makefile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..5c5268a --- /dev/null +++ b/Makefile @@ -0,0 +1,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 -- cgit v1.2.3