switch build system to SCons
This commit is contained in:
1 parent
c218c8956f
commit
9b8f3290ad
8 files changed
+31
-158
No files matched your search
@@ -1,33 +1,10 @@
|
||||
export SCONSFLAGS := -Q
|
||||
|
||||
SHELL := bash
|
||||
all:
|
||||
@scons
|
||||
|
||||
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)
|
||||
install:
|
||||
@scons $@
|
||||
|
||||
clean:
|
||||
@for d in $(SUBDIRS); \
|
||||
do $(MAKE) -C $$d clean CLEAN=1; \
|
||||
done
|
||||
-rm -f $(TARGET)
|
||||
@scons -c
|
||||
Reference in new issue
Block a user