Skip to content

Commit ea7b766

Browse files
committed
Makefile: start splitting into multiple .mk files
Keeping a single list of files is starting to be unwieldy.
1 parent db99b79 commit ea7b766

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

Diff for: Makefile

+8-3
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,9 @@ libdragon: LDFLAGS+=$(N64_LDFLAGS)
2626
libdragon: libdragon.a libdragonsys.a
2727

2828
libdragonsys.a: $(BUILD_DIR)/system.o
29-
@echo " [AR] $@"
30-
$(N64_AR) -rcs -o $@ $^
3129

32-
libdragon.a: $(BUILD_DIR)/n64sys.o $(BUILD_DIR)/interrupt.o $(BUILD_DIR)/backtrace.o \
30+
LIBDRAGON_OBJS += \
31+
$(BUILD_DIR)/n64sys.o $(BUILD_DIR)/interrupt.o $(BUILD_DIR)/backtrace.o \
3332
$(BUILD_DIR)/fmath.o $(BUILD_DIR)/inthandler.o $(BUILD_DIR)/entrypoint.o \
3433
$(BUILD_DIR)/debug.o $(BUILD_DIR)/debugcpp.o $(BUILD_DIR)/usb.o $(BUILD_DIR)/libcart/cart.o $(BUILD_DIR)/fatfs/ff.o \
3534
$(BUILD_DIR)/fatfs/ffunicode.o $(BUILD_DIR)/rompak.o $(BUILD_DIR)/dragonfs.o \
@@ -56,6 +55,12 @@ libdragon.a: $(BUILD_DIR)/n64sys.o $(BUILD_DIR)/interrupt.o $(BUILD_DIR)/backtra
5655
$(BUILD_DIR)/rdpq/rdpq_rect.o $(BUILD_DIR)/rdpq/rdpq_mode.o \
5756
$(BUILD_DIR)/rdpq/rdpq_sprite.o $(BUILD_DIR)/rdpq/rdpq_tex.o \
5857
$(BUILD_DIR)/rdpq/rdpq_attach.o $(BUILD_DIR)/dlfcn.o
58+
59+
include $(SOURCE_DIR)/audio/libdragon.mk
60+
61+
libdragon.a: $(LIBDRAGON_OBJS)
62+
63+
%.a:
5964
@echo " [AR] $@"
6065
$(N64_AR) -rcs -o $@ $^
6166

Diff for: src/audio/libdragon.mk

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
LIBDRAGON_OBJS += \
2+
$(BUILD_DIR)/audio/mixer.o $(BUILD_DIR)/audio/samplebuffer.o \
3+
$(BUILD_DIR)/audio/rsp_mixer.o $(BUILD_DIR)/audio/wav64.o \
4+
$(BUILD_DIR)/audio/xm64.o $(BUILD_DIR)/audio/libxm/play.o \
5+
$(BUILD_DIR)/audio/libxm/context.o $(BUILD_DIR)/audio/libxm/load.o \
6+
$(BUILD_DIR)/audio/ym64.o $(BUILD_DIR)/audio/ay8910.o \
7+
8+
LIBDRAGON_OBJS += \
9+
$(BUILD_DIR)/audio/wav64_vadpcm.o

0 commit comments

Comments
 (0)