diff options
Diffstat (limited to 'src/Makefile')
-rw-r--r-- | src/Makefile | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/src/Makefile b/src/Makefile index 07f1cb5..0f4841b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,7 +1,3 @@ -ifeq ($(strip $(DEVKITPRO)),) -$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitPRO") -endif - SRCS = $(sort $(wildcard $(srcdir)/*.c)) OBJS = $(patsubst $(srcdir)/%.c,obj/%.o,$(SRCS)) DEPS = $(patsubst $(srcdir)/%.c,obj/%.d,$(SRCS)) @@ -10,11 +6,9 @@ CFLAGS = CPPFLAGS = LDFLAGS = -CC = $(DEVKITPRO)/devkitARM/bin/arm-none-eabi-gcc - -CFLAGS_AUTO = -D__3DS__ -ffunction-sections -flto -g -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft -mword-relocations -O3 -std=c11 -Wall -Werror=implicit-function-declaration -LDFLAGS_AUTO = -L$(DEVKITPRO)/libctru/lib -specs=3dsx.specs -LDLIBS_AUTO = -lctru -lm +CFLAGS_AUTO = -fdata-sections -ffunction-sections -flto -g -O3 -std=c11 -Wall -Werror=implicit-function-declaration +LDFLAGS_AUTO = +LDLIBS_AUTO = -lm CFLAGS_ALL = $(CPPFLAGS) $(CFLAGS_AUTO) $(CFLAGS) LDFLAGS_ALL = $(LDFLAGS_AUTO) $(LDFLAGS) @@ -30,15 +24,9 @@ all: else -all: imb3.3dsx -3dslink: imb3.3dsx - $(DEVKITPRO)/tools/bin/3dslink $< -.PHONY: 3dslink - -imb3.3dsx: imb3.elf - 3dsxtool $< $@ +include $(srcdir)/platform/$(platform).mk -imb3.elf: $(OBJS) obj/gc/gc.o obj/platform/3ds.o +imb3.elf: $(OBJS) obj/gc/gc.o obj/platform/$(platform).o $(CC) $(CFLAGS_ALL) $(LDFLAGS_ALL) -o $@ $^ $(LDLIBS_ALL) obj/%.o: $(srcdir)/%.c |