git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
C++: clean up Makefile and psc-xcode.sh
commitd0feb35731ab76e236d6f784b300dfdc4fdb7bff authorAndy Arvanitis <andyarvanitis@gmail.com> dateSat 3 Dec 2016, 19:22 (10 years ago) parent2509d99
2 files changed+3−15
pcc/Makefile−12 pcc/psc-xcode.sh+3−3
pcc/Makefile−12
@@ -21,7 +21,6 @@ PURESCRIPT_PKGS := .psc-package
2121PURESCRIPT_SRC := src
2222OUTPUT := output
2323BIN := main
24−OBJ := purescript.o
2524
2625override PCCFLAGS += --comments
2726override CXXFLAGS += -std=c++11
@@ -48,12 +47,6 @@ release: codegen
4847debug: codegen
4948 @$(MAKE) $(BIN) CXXFLAGS+=$(DEBUG)
5049
51−release-object: codegen
52− @$(MAKE) $(OBJ) CXXFLAGS+=$(RELEASE)
53−
54−debug-object: codegen
55− @$(MAKE) $(OBJ) CXXFLAGS+=$(DEBUG)
56−
5750codegen: PURESCRIPT_PKG_SRCS=$(shell find $(PURESCRIPT_PKGS) -name '*.purs' | grep -v \/test\/ | grep -v \/example\/ | grep -v \/examples\/)
5851codegen: PURESCRIPT_SRCS=$(shell find $(PURESCRIPT_SRC) -name '*.purs')
5952#
@@ -74,11 +67,6 @@ $(BIN): $(OBJS)
7467 @mkdir -p $(BIN_DIR)
7568 @$(CXX) $^ -o $(BIN_DIR)/$@ $(LDFLAGS)
7669
77−$(OBJ): $(OBJS)
78− @echo "Creating combined object file" $(BIN_DIR)/$(OBJ)
79− @mkdir -p $(BIN_DIR)
80− @$(LD) -r $^ -o $(BIN_DIR)/$@ $(LDFLAGS)
81−
8270-include $(DEPS)
8371
8472%.o: %.cc
pcc/psc-xcode.sh+3−3
@@ -14,14 +14,14 @@ if [[ "$CONFIGURATION" == "Debug" ]] ; then
1414 touch "$IS_DEBUG"
1515 fi
1616 rm "$IS_RELEASE" > /dev/null 2>&1 || true
17− OBJECT_TYPE=debug-object
17+ OBJECT_TYPE=debug
1818else
1919 if [ ! -f "$IS_RELEASE" ] ; then
2020 make clean
2121 touch "$IS_RELEASE"
2222 fi
2323 rm "$IS_DEBUG" > /dev/null 2>&1 || true
24− OBJECT_TYPE=release-object
24+ OBJECT_TYPE=release
2525fi
2626
2727## Create compiler switches for architectures
@@ -39,4 +39,4 @@ for arch_ in $ARCHS ; do
3939 fi
4040done
4141
42−make $OBJECT_TYPE ${PSC_PKG} CXXFLAGS="$ARCH_OPTS $FLTO -isysroot $SDKROOT" LD="clang -Wl,-r -nostdlib $ARCH_OPTS" -j`sysctl -n hw.ncpu`
42+make $OBJECT_TYPE CXXFLAGS="$ARCH_OPTS $FLTO -isysroot $SDKROOT" LDFLAGS="-r -nostdlib $ARCH_OPTS" BIN=purescript.o -j`sysctl -n hw.ncpu`