diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 19 |
1 files changed, 14 insertions, 5 deletions
@@ -1,6 +1,7 @@ CC=gcc OUT=oats.out -LIBS=-I. +INCLUDES=-I. +LIBS= ARGS= RELEASE=0 @@ -16,7 +17,7 @@ CFLAGS=$(GFLAGS) $(DFLAGS) endif DIST=build -SRC:=tag.c memory.c vec.c sv.c lisp.c reader.c eval.c main.c +SRC:=lib/arena.c lib/vec.c lib/sv.c lisp/tag.c lisp/context.c lisp/lisp.c lisp/reader.c lisp/eval.c main.c OBJ:=$(SRC:%.c=$(DIST)/%.o) DEPDIR=$(DIST)/dependencies DEPS:=$(SRC:%.c=$(DEPDIR)/%.d) @@ -25,10 +26,10 @@ DEPS:=$(SRC:%.c=$(DEPDIR)/%.d) all: $(DIST)/$(OUT) $(DIST)/%.o: %.c | $(DIST) $(DEPDIR) - $(CC) $(CFLAGS) $(DEPFLAGS) $(DEPDIR)/$*.d -c $< -o $@ $(LIBS) + $(CC) $(INCLUDES) $(CFLAGS) $(DEPFLAGS) $(DEPDIR)/$*.d -c $< -o $@ $(LIBS) $(DIST)/$(OUT): $(OBJ) | $(DIST) - $(CC) $(CFLAGS) $^ -o $@ $(LIBS) + $(CC) $(INCLUDES) $(CFLAGS) $^ -o $@ $(LIBS) .PHONY: run run: $(DIST)/$(OUT) @@ -38,11 +39,19 @@ run: $(DIST)/$(OUT) clean: rm -rfv $(DIST)/* -$(DIST): +$(DIST): | $(DIST)/lib $(DIST)/lisp mkdir -p $(DIST) +$(DIST)/lib: + mkdir -p $(DIST)/lib + +$(DIST)/lisp: + mkdir -p $(DIST)/lisp + $(DEPDIR): mkdir -p $(DEPDIR) + mkdir -p $(DEPDIR)/lib + mkdir -p $(DEPDIR)/lisp .PHONY: watch: |