mirror of
https://github.com/jakcron/nstool.git
synced 2024-12-22 18:55:29 +00:00
Support Compiling on MacOS
This commit is contained in:
parent
20dfdc6b2a
commit
6630e108b2
|
@ -9,18 +9,28 @@ INCS = -I"include" -I"source/libpolarssl/include" $(foreach dep,$(DEPENDS), -I"$
|
|||
|
||||
|
||||
# Compiler Settings
|
||||
CXXFLAGS = -std=c++11 $(INCS) -D__STDC_FORMAT_MACROS -Wall -Wno-unused-but-set-variable -Wno-unused-value
|
||||
CFLAGS = -std=c11 $(INCS) -Wall -Wno-unused-but-set-variable -Wno-unused-value
|
||||
CXXFLAGS = -std=c++11 $(INCS) -D__STDC_FORMAT_MACROS -Wall -Wno-unused-value
|
||||
CFLAGS = -std=c11 $(INCS) -Wall -Wno-unused-value
|
||||
ARFLAGS = cr -o
|
||||
ifeq ($(OS),Windows_NT)
|
||||
# Windows Only Flags/Libs
|
||||
CC = x86_64-w64-mingw32-gcc
|
||||
CXX = x86_64-w64-mingw32-g++
|
||||
CFLAGS +=
|
||||
CXXFLAGS +=
|
||||
CFLAGS += -Wno-unused-but-set-variable
|
||||
CXXFLAGS += -Wno-unused-but-set-variable
|
||||
else
|
||||
UNAME = $(shell uname -s)
|
||||
ifeq ($(UNAME), Darwin)
|
||||
# MacOS Only Flags/Libs
|
||||
CFLAGS += -Wunused-private-field
|
||||
CXXFLAGS += -Wunused-private-field
|
||||
ARFLAGS = rc
|
||||
else
|
||||
# *nix Only Flags/Libs
|
||||
CFLAGS +=
|
||||
CXXFLAGS +=
|
||||
CFLAGS += -Wno-unused-but-set-variable
|
||||
CXXFLAGS += -Wno-unused-but-set-variable
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
# Output
|
||||
|
@ -31,7 +41,7 @@ main: build
|
|||
rebuild: clean build
|
||||
|
||||
build: $(OBJS)
|
||||
ar cr -o $(OUTPUT) $(OBJS)
|
||||
ar $(ARFLAGS) $(OUTPUT) $(OBJS)
|
||||
|
||||
clean:
|
||||
rm -rf $(OUTPUT) $(OBJS)
|
|
@ -9,18 +9,28 @@ INCS = -I"include" $(foreach dep,$(DEPENDS), -I"$(LIB_DIR)/lib$(dep)/include")
|
|||
|
||||
|
||||
# Compiler Settings
|
||||
CXXFLAGS = -std=c++11 $(INCS) -D__STDC_FORMAT_MACROS -Wall -Wno-unused-but-set-variable -Wno-unused-value
|
||||
CFLAGS = -std=c11 $(INCS) -Wall -Wno-unused-but-set-variable -Wno-unused-value
|
||||
CXXFLAGS = -std=c++11 $(INCS) -D__STDC_FORMAT_MACROS -Wall -Wno-unused-value
|
||||
CFLAGS = -std=c11 $(INCS) -Wall -Wno-unused-value
|
||||
ARFLAGS = cr -o
|
||||
ifeq ($(OS),Windows_NT)
|
||||
# Windows Only Flags/Libs
|
||||
CC = x86_64-w64-mingw32-gcc
|
||||
CXX = x86_64-w64-mingw32-g++
|
||||
CFLAGS +=
|
||||
CXXFLAGS +=
|
||||
CFLAGS += -Wno-unused-but-set-variable
|
||||
CXXFLAGS += -Wno-unused-but-set-variable
|
||||
else
|
||||
UNAME = $(shell uname -s)
|
||||
ifeq ($(UNAME), Darwin)
|
||||
# MacOS Only Flags/Libs
|
||||
CFLAGS += -Wunused-private-field
|
||||
CXXFLAGS += -Wunused-private-field
|
||||
ARFLAGS = rc
|
||||
else
|
||||
# *nix Only Flags/Libs
|
||||
CFLAGS +=
|
||||
CXXFLAGS +=
|
||||
CFLAGS += -Wno-unused-but-set-variable
|
||||
CXXFLAGS += -Wno-unused-but-set-variable
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
# Output
|
||||
|
@ -31,7 +41,7 @@ main: build
|
|||
rebuild: clean build
|
||||
|
||||
build: $(OBJS)
|
||||
ar cr -o $(OUTPUT) $(OBJS)
|
||||
ar $(ARFLAGS) $(OUTPUT) $(OBJS)
|
||||
|
||||
clean:
|
||||
rm -rf $(OUTPUT) $(OBJS)
|
|
@ -9,18 +9,28 @@ INCS = -I"include" $(foreach dep,$(DEPENDS), -I"$(LIB_DIR)/lib$(dep)/include")
|
|||
|
||||
|
||||
# Compiler Settings
|
||||
CXXFLAGS = -std=c++11 $(INCS) -D__STDC_FORMAT_MACROS -Wall -Wno-unused-but-set-variable -Wno-unused-value
|
||||
CFLAGS = -std=c11 $(INCS) -Wall -Wno-unused-but-set-variable -Wno-unused-value
|
||||
CXXFLAGS = -std=c++11 $(INCS) -D__STDC_FORMAT_MACROS -Wall -Wno-unused-value
|
||||
CFLAGS = -std=c11 $(INCS) -Wall -Wno-unused-value
|
||||
ARFLAGS = cr -o
|
||||
ifeq ($(OS),Windows_NT)
|
||||
# Windows Only Flags/Libs
|
||||
CC = x86_64-w64-mingw32-gcc
|
||||
CXX = x86_64-w64-mingw32-g++
|
||||
CFLAGS +=
|
||||
CXXFLAGS +=
|
||||
CFLAGS += -Wno-unused-but-set-variable
|
||||
CXXFLAGS += -Wno-unused-but-set-variable
|
||||
else
|
||||
UNAME = $(shell uname -s)
|
||||
ifeq ($(UNAME), Darwin)
|
||||
# MacOS Only Flags/Libs
|
||||
CFLAGS += -Wunused-private-field
|
||||
CXXFLAGS += -Wunused-private-field
|
||||
ARFLAGS = rc
|
||||
else
|
||||
# *nix Only Flags/Libs
|
||||
CFLAGS +=
|
||||
CXXFLAGS +=
|
||||
CFLAGS += -Wno-unused-but-set-variable
|
||||
CXXFLAGS += -Wno-unused-but-set-variable
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
# Output
|
||||
|
@ -31,7 +41,7 @@ main: build
|
|||
rebuild: clean build
|
||||
|
||||
build: $(OBJS)
|
||||
ar cr -o $(OUTPUT) $(OBJS)
|
||||
ar $(ARFLAGS) $(OUTPUT) $(OBJS)
|
||||
|
||||
clean:
|
||||
rm -rf $(OUTPUT) $(OBJS)
|
|
@ -9,18 +9,28 @@ INCS = -I"include" $(foreach dep,$(DEPENDS), -I"$(LIB_DIR)/lib$(dep)/include")
|
|||
|
||||
|
||||
# Compiler Settings
|
||||
CXXFLAGS = -std=c++11 $(INCS) -D__STDC_FORMAT_MACROS -Wall -Wno-unused-but-set-variable -Wno-unused-value
|
||||
CFLAGS = -std=c11 $(INCS) -Wall -Wno-unused-but-set-variable -Wno-unused-value
|
||||
CXXFLAGS = -std=c++11 $(INCS) -D__STDC_FORMAT_MACROS -Wall -Wno-unused-value
|
||||
CFLAGS = -std=c11 $(INCS) -Wall -Wno-unused-value
|
||||
ARFLAGS = cr -o
|
||||
ifeq ($(OS),Windows_NT)
|
||||
# Windows Only Flags/Libs
|
||||
CC = x86_64-w64-mingw32-gcc
|
||||
CXX = x86_64-w64-mingw32-g++
|
||||
CFLAGS +=
|
||||
CXXFLAGS +=
|
||||
CFLAGS += -Wno-unused-but-set-variable
|
||||
CXXFLAGS += -Wno-unused-but-set-variable
|
||||
else
|
||||
UNAME = $(shell uname -s)
|
||||
ifeq ($(UNAME), Darwin)
|
||||
# MacOS Only Flags/Libs
|
||||
CFLAGS += -Wunused-private-field
|
||||
CXXFLAGS += -Wunused-private-field
|
||||
ARFLAGS = rc
|
||||
else
|
||||
# *nix Only Flags/Libs
|
||||
CFLAGS +=
|
||||
CXXFLAGS +=
|
||||
CFLAGS += -Wno-unused-but-set-variable
|
||||
CXXFLAGS += -Wno-unused-but-set-variable
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
# Output
|
||||
|
@ -31,7 +41,7 @@ main: build
|
|||
rebuild: clean build
|
||||
|
||||
build: $(OBJS)
|
||||
ar cr -o $(OUTPUT) $(OBJS)
|
||||
ar $(ARFLAGS) $(OUTPUT) $(OBJS)
|
||||
|
||||
clean:
|
||||
rm -rf $(OUTPUT) $(OBJS)
|
Loading…
Reference in a new issue