From d53ac76f78762b7bfd395576fd2ba5ed39f515c1 Mon Sep 17 00:00:00 2001 From: kartofen Date: Tue, 30 May 2023 23:14:30 +0300 Subject: templates in c --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index fc927b7..7a78977 100644 --- a/Makefile +++ b/Makefile @@ -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 $@ -- cgit v1.2.3