mirror of
https://github.com/DarkStore-3DS/Project_CTR.git
synced 2026-07-04 08:49:03 +00:00
[makerom] Changed makefile
Warning-less compiling on OS X
This commit is contained in:
+20
-7
@@ -3,14 +3,27 @@ SRC_DIR = . polarssl libyaml
|
||||
OBJS = $(foreach dir,$(SRC_DIR),$(subst .c,.o,$(wildcard $(dir)/*.c)))
|
||||
|
||||
# Compiler Settings
|
||||
LIBS = -static-libgcc
|
||||
CXXFLAGS = -I.
|
||||
CFLAGS = --std=c99 -O2 -flto -Wall -Wno-unused-but-set-variable -Wno-unused-value -Wno-unused-result -I. $(MAKEROM_BUILD_FLAGS)
|
||||
CFLAGS = --std=c99 -O2 -flto -Wall -Wno-unused-value -Wno-unused-result -I.
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
ifeq ($(OS),Windows_NT)
|
||||
#Windows Build CFG
|
||||
CFLAGS += -Wno-unused-but-set-variable
|
||||
LIBS += -static-libgcc
|
||||
else
|
||||
UNAME_S := $(shell uname -s)
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
# OS X
|
||||
CFLAGS +=
|
||||
LIBS += -liconv
|
||||
else
|
||||
# Linux
|
||||
CFLAGS += -Wno-unused-but-set-variable
|
||||
LIBS +=
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
# MAKEROM Build Settings
|
||||
MAKEROM_BUILD_FLAGS = #-DDEBUG
|
||||
OUTPUT = makerom
|
||||
|
||||
main: build
|
||||
@@ -18,7 +31,7 @@ main: build
|
||||
rebuild: clean build
|
||||
|
||||
build: $(OBJS)
|
||||
$(CXX) -o $(OUTPUT) $(LIBS) $(OBJS)
|
||||
$(CC) -o $(OUTPUT) $(LIBS) $(OBJS)
|
||||
|
||||
clean:
|
||||
rm -rf $(OUTPUT) $(OBJS) *.cci *.cia *.cxi *.cfa
|
||||
rm -rf $(OUTPUT) $(OBJS)
|
||||
Reference in New Issue
Block a user