diff options
author | kartofen <mladenovnasko0@gmail.com> | 2023-05-30 23:14:30 +0300 |
---|---|---|
committer | kartofen <mladenovnasko0@gmail.com> | 2023-05-30 23:14:30 +0300 |
commit | d53ac76f78762b7bfd395576fd2ba5ed39f515c1 (patch) | |
tree | 105ab8b6a57a0b1296fe3f0a8dab97faa40d204f /Makefile | |
parent | 93b71ee9b3cd95ed346370e37ef1fdcb3c01520f (diff) |
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -3,7 +3,7 @@ CC := gcc CFLAGS := -Wall -Wextra -Wpedantic BIND := bin -CSRCS = $(shell find . -type f -name '*.c') +CSRCS = $(shell find * -type f -name '*.c') .PHONY: all clean @@ -12,6 +12,11 @@ all: $(CSRCS:%.c=$(BIND)/%) clean: rm -rf $(BIND) +$(BIND)/c-templates: c-templates.c + mkdir -p $(dir $@) + gcc -E -CC $^ | gcc -E -CC -DDEFINE=\#define -xc - | gcc $(CFLAGS) --std=gnu99 -o $@ -xc - + $(BIND)/%: %.c - mkdir -p $(dir $@)p + @echo $@ + mkdir -p $(dir $@) $(CC) $(CFLAGS) $^ -o $@ |