jtlc/Makefile
josh c9c59e41fc added util/refptr, tests/Initial.jtl, parser/parser.h, c_statement to grammar
git-svn-id: svn://anubis/jtlc/trunk@7 f5bc74b8-7b62-4e90-9214-7121d538519f
2010-01-12 21:30:34 +00:00

32 lines
529 B
Makefile

SHELL := bash
TARGET := jtlc
ifdef WIN32
TOPLEVEL := $(shell cd)
else
TOPLEVEL := $(shell pwd)
endif
export CPPFLAGS += -I"$(TOPLEVEL)"
export CXXFLAGS := -Wall -O2
LDFLAGS := -lfl
SUBDIRS := main parser
all: $(TARGET)
.PHONY: $(TARGET)
$(TARGET):
@for d in $(SUBDIRS); \
do $(MAKE) -C $$d; \
ret=$$?; \
if [[ $$ret != 0 ]]; then \
exit $$ret; \
fi; \
done
$(CXX) -o $@ $(patsubst %,%/*.o,$(SUBDIRS)) $(CXXFLAGS) $(LDFLAGS)
clean:
for d in $(SUBDIRS); do $(MAKE) -C $$d clean CLEAN=1; done
-rm -f $(TARGET)