From 2a11acc66738d6300bfa90a22adcd540371060f3 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 11 Sep 2020 01:28:06 -0700 Subject: Major overhaul refactor restructuring --- Makefile | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 205b8c2..986ecdc 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,21 @@ -PREFIX= +PREFIX=/usr/local CFLAGS=-Wall -Wextra -pedantic -Wmissing-prototypes -Wstrict-prototypes +LDFLAGS= G ?= O ?= -O3 +CFILES=compiler.c grammar.c utils.c vm.c +OBJFILES=$(CFILES:.c=.o) + all: bpeg -clean: - rm -f bpeg +.c.o: + cc -c $(CFLAGS) $(G) $(O) -o $@ $< -bpeg: bpeg.c bpeg.h utils.h - cc $(CFLAGS) $(G) $(O) $< -o $@ +bpeg: $(OBJFILES) bpeg.c + cc $(CFLAGS) $(G) $(O) -o $@ $^ + +clean: + rm -f bpeg $(OBJFILES) .PHONY: all clean -- cgit v1.2.3