diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1,17 +1,19 @@ CFLAGS=-std=c11 -g -fno-common -Wall -Wno-switch -CFLAGS+=-DDIETC_ROOT="\"$(PWD)\"" # CFLAGS=$(CFLAGS) -fsanitize=address SRCS=$(wildcard *.c) OBJS=$(addprefix build/,$(SRCS:.c=.o)) dietc: $(OBJS) - $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) + $(CC) $(CFLAGS) -o $@ $(OBJS) $(LDFLAGS) -build/%.o: %.c chibicc.h +build/%.o: %.c chibicc.h scripts/dietc_helpers.h.bytes @mkdir -p build $(CC) $(CFLAGS) -c $(word 1,$^) -o $@ +scripts/%.bytes: scripts/% + python3 -c "print(', '.join([hex(ord(c)) for c in open('$^', 'r').read()]))" > $@ + # Misc. clean: |