fart/Makefile
Josh Holtrop d6aa5b6e69 added pthread support for starting the server listen/accept loop
git-svn-id: svn://anubis/fart/trunk@224 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-04-05 18:41:39 +00:00

34 lines
555 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
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)