aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 10 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 4cc9599..0a0d317 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,14 @@
CFLAGS := -std=c23 -fPIC
-CPPFLAGS := -Ichad
-SOURCE.orig := $(wildcard extern/*.c)
-SOURCE := $(SOURCE.orig:extern/%=%)
-OBJECT := $(addprefix object/,$(SOURCE:.c=.o))
+CPPFLAGS := -I. -D_XOPEN_SOURCE=500
+SOURCE.orig := $(wildcard extern/*.c chad/*.c chad/experimental/*.c)
+SOURCE.orig := $(SOURCE.orig:extern/%=%)
+SOURCE.orig := $(SOURCE.orig:chad/experimental/%=%)
+SOURCE.orig := $(SOURCE.orig:chad/%=%)
+OBJECT := $(addprefix object/,$(SOURCE.orig:.c=.o))
vpath %.c extern
+vpath %.c chad
+vpath %.c chad/experimental
object/%.o: %.c
@echo "CC $<"
@@ -14,11 +18,11 @@ object/%.o: %.c
all: object/libchad.a object/libchad.so
object/libchad.a: ${OBJECT}
- @echo "AR $<"
+ @echo "AR $+"
@ar rcs $@ $+
object/libchad.so: ${OBJECT}
- @echo "SO $<"
+ @echo "SO $+"
@${CC} ${CFLAGS} ${CPPFLAGS} -shared $+ -o $@
dist: