File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ ifeq ($(OS),Windows_NT)
7
7
ARCHIVE_CMD := 7z a
8
8
ARCHIVE_EXTENSION := zip
9
9
TARGET := mkspiffs.exe
10
+ TARGET_LDFLAGS := -Wl,-static -static-libgcc
11
+
10
12
else
11
13
UNAME_S := $(shell uname -s)
12
14
ifeq ($(UNAME_S),Linux)
22
24
ifeq ($(UNAME_S),Darwin)
23
25
TARGET_OS := OSX
24
26
DIST_SUFFIX := osx
27
+ CC=clang
28
+ CXX=clang++
29
+ TARGET_CFLAGS = -mmacosx-version-min=10.7 -arch i386 -arch x86_64
30
+ TARGET_CXXFLAGS = -mmacosx-version-min=10.7 -arch i386 -arch x86_64 -stdlib=libc++
31
+ TARGET_LDFLAGS = -arch i386 -arch x86_64 -stdlib=libc++
25
32
endif
26
33
ARCHIVE_CMD := tar czf
27
34
ARCHIVE_EXTENSION := tar.gz
@@ -41,6 +48,7 @@ INCLUDES := -Itclap -Ispiffs -I.
41
48
42
49
CFLAGS += $(TARGET_CFLAGS )
43
50
CXXFLAGS += $(TARGET_CXXFLAGS )
51
+ LDFLAGS += $(TARGET_LDFLAGS )
44
52
45
53
CPPFLAGS += $(INCLUDES ) -D$(TARGET_OS ) -DVERSION=\"$(VERSION ) \" -D__NO_INLINE__
46
54
@@ -59,10 +67,9 @@ $(DIST_ARCHIVE): $(TARGET) $(DIST_DIR)
59
67
$(ARCHIVE_CMD ) $(DIST_ARCHIVE ) $(DIST_DIR )
60
68
61
69
$(TARGET ) : $(OBJ )
62
- g++ $^ -o $@
70
+ $( CXX ) $^ -o $@ $( LDFLAGS )
63
71
strip $(TARGET )
64
72
65
-
66
73
$(DIST_DIR ) :
67
74
@mkdir -p $@
68
75
You can’t perform that action at this time.
0 commit comments