diff options
Diffstat (limited to 'Maakbestand')
-rw-r--r-- | Maakbestand | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Maakbestand b/Maakbestand new file mode 100644 index 0000000..e760b65 --- /dev/null +++ b/Maakbestand @@ -0,0 +1,23 @@ +CC := gcc +CFLAGS := -Wall -Wextra -std=c11 -O2 +LDFLAGS := + +OBJDIR := obj +TARGET := drukkedoos + +SOURCES := $(shell find src -type f -name '*.c') +HEADERS := $(shell find src -type f -name '*.h') +OBJECTS := $(patsubst src/%.c,obj/%.o,$(SOURCES)) + +.PHONY: all clean + +all: $(TARGET) + +clean: + rm -rf $(OBJDIR) $(TARGET) + +$(TARGET): main.c $(OBJECTS) + $(CC) -o $@ $^ $(LDFLAGS) + +$(OBJECTS): obj/%.o: src/%.c $(HEADERS) + $(CC) $(CFLAGS) -c -o $@ $< |