Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit cadb7cc

Browse files
thewilsonatorTurkeyMan
authored andcommitted
Hack the makefiles to make OSX build.
1 parent 41db5b0 commit cadb7cc

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

test/common.mak

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,20 @@ ROOT:=$(GENERATED)/$(OS)/$(BUILD)/$(MODEL)
1717
ifneq (default,$(MODEL))
1818
MODEL_FLAG:=-m$(MODEL)
1919
endif
20-
CFLAGS:=$(MODEL_FLAG) $(PIC) -Wall
20+
CFLAGS_BASE:= $(MODEL_FLAG) $(PIC) -Wall
2121
DFLAGS:=$(MODEL_FLAG) $(PIC) -w -I../../src -I../../import -I$(SRC) -defaultlib= -debuglib= -dip1000
2222
# LINK_SHARED may be set by importing makefile
2323
DFLAGS+=$(if $(LINK_SHARED),-L$(DRUNTIMESO),-L$(DRUNTIME))
2424
ifeq ($(BUILD),debug)
2525
DFLAGS += -g -debug
26-
CFLAGS += -g
26+
CFLAGS := $(CFLAGS_BASE) -g
2727
else
2828
DFLAGS += -O -release
29-
CFLAGS += -O3
29+
CFLAGS := $(CFLAGS_BASE) -O3
3030
endif
31+
CXXFLAGS_BASE := $(CFLAGS_BASE) -std=c++11
3132
CXXFLAGS:=$(CFLAGS) -std=c++11
3233
ifeq (osx,$(OS))
3334
CXXFLAGS+=-stdlib=libc++
35+
CXXFLAGS_BASE+=-stdlib=libc++
3436
endif

test/stdcpp/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ $(ROOT)/%.done : $(ROOT)/%
2222
$(ROOT)/%: $(SRC)/%.cpp $(SRC)/%_test.d
2323
mkdir -p $(dir $@)
2424
$(QUIET)$(DMD) $(DFLAGS) -main -unittest -c -of=$(ROOT)/$*_d.o $(SRC)/$*_test.d
25-
$(QUIET)$(CXX) $(CXXFLAGS) -o $@ $< $(ROOT)/$*_d.o $(DRUNTIME) -lpthread
25+
$(QUIET)$(CXX) $(CXXFLAGS_BASE) -o $@ $< $(ROOT)/$*_d.o $(DRUNTIME) -lpthread
2626

2727
clean:
2828
rm -rf $(GENERATED)

0 commit comments

Comments
 (0)