mirror of
https://github.com/DarkStore-3DS/Project_CTR.git
synced 2026-07-03 08:49:03 +00:00
35 lines
687 B
Makefile
35 lines
687 B
Makefile
# Sources
|
|
SRC_DIR = . polarssl libyaml
|
|
OBJS = $(foreach dir,$(SRC_DIR),$(subst .c,.o,$(wildcard $(dir)/*.c)))
|
|
|
|
# Compiler Settings
|
|
CFLAGS = --std=gnu99 -O2 -Wall -Wno-unused-value -Wno-unused-result -I.
|
|
CC = gcc
|
|
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
|
|
LIBS += -liconv
|
|
else
|
|
# Linux
|
|
CFLAGS += -Wno-unused-but-set-variable
|
|
endif
|
|
endif
|
|
|
|
|
|
# MAKEROM Build Settings
|
|
OUTPUT = makerom
|
|
|
|
main: build
|
|
|
|
rebuild: clean build
|
|
|
|
build: $(OBJS)
|
|
$(CC) -o $(OUTPUT) $(LIBS) $(OBJS)
|
|
|
|
clean:
|
|
rm -rf $(OUTPUT) $(OBJS)
|