fart/Makefile
Josh Holtrop f103b71ed6 added SUBDIRS to top-level Makefile to make adding subdirectories easier
git-svn-id: svn://anubis/fart/trunk@214 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-13 19:26:12 +00:00

32 lines
522 B
Makefile

TARGET := fart
ifdef WIN32
export CPPFLAGS += -I"$(shell cd)"
else
export CPPFLAGS += -I"$(shell pwd)"
endif
export CXXFLAGS := -Wall -O2
LDFLAGS := -lfl
SUBDIRS := util shapes 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)