fart/Makefile
Josh Holtrop b7e2aa1bae added freeimage library (de)initialization
git-svn-id: svn://anubis/fart/trunk@381 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-10-13 20:30:09 +00:00

34 lines
567 B
Makefile

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