diff options
author | Tom Smeding <t.j.smeding@uu.nl> | 2024-07-13 18:33:37 +0200 |
---|---|---|
committer | Tom Smeding <t.j.smeding@uu.nl> | 2024-07-13 18:33:37 +0200 |
commit | a08a2a2dbb3d150bdb2d01bd54c6ad32f02fe5fa (patch) | |
tree | aaac1ffb99935d3b65eed111c9d7f158d28ac176 /Maakbestand | |
parent | eba8b972d2bc85b8fe6acff90505116da8e29abd (diff) |
waar, poging 2
Diffstat (limited to 'Maakbestand')
-rw-r--r-- | Maakbestand | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Maakbestand b/Maakbestand index e760b65..98e0798 100644 --- a/Maakbestand +++ b/Maakbestand @@ -1,5 +1,5 @@ CC := gcc -CFLAGS := -Wall -Wextra -std=c11 -O2 +CFLAGS := -Wall -Wextra -std=c2x -O2 LDFLAGS := OBJDIR := obj @@ -9,6 +9,8 @@ SOURCES := $(shell find src -type f -name '*.c') HEADERS := $(shell find src -type f -name '*.h') OBJECTS := $(patsubst src/%.c,obj/%.o,$(SOURCES)) +PROGNAMES_X := $(patsubst src/%.c,X(%),$(wildcard src/*.c)) + .PHONY: all clean all: $(TARGET) @@ -17,7 +19,8 @@ clean: rm -rf $(OBJDIR) $(TARGET) $(TARGET): main.c $(OBJECTS) - $(CC) -o $@ $^ $(LDFLAGS) + $(CC) -o $@ $^ $(LDFLAGS) -DPROGNAMES_XLIST="$(PROGNAMES_X)" $(OBJECTS): obj/%.o: src/%.c $(HEADERS) + @mkdir -p $(dir $@) $(CC) $(CFLAGS) -c -o $@ $< |