jtlc/Makefile
josh 01bd481bce initial import
git-svn-id: svn://anubis/jtlc/trunk@2 f5bc74b8-7b62-4e90-9214-7121d538519f
2009-03-28 15:17:48 +00:00

31 lines
516 B
Makefile

SHELL := bash
TARGET := jtlc
ifdef WIN32
export CPPFLAGS += -I"$(shell cd)"
else
export CPPFLAGS += -I"$(shell pwd)"
endif
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)