forked from marian-m12l/n64brew-gamejam-4
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
48 lines (35 loc) · 1.23 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
TARGET=n64jam4
BUILD_DIR=build
include $(N64_INST)/include/n64.mk
src = main.c
assets_xm = $(wildcard assets/*.xm)
assets_wav = $(wildcard assets/*.wav)
assets_png = $(wildcard assets/*.png)
assets_conv = $(addprefix filesystem/,$(notdir $(assets_xm:%.xm=%.xm64))) \
$(addprefix filesystem/,$(notdir $(assets_wav:%.wav=%.wav64))) \
$(addprefix filesystem/,$(notdir $(assets_png:%.png=%.sprite)))
#N64_CFLAGS = -Wno-error
AUDIOCONV_FLAGS ?=
MKSPRITE_FLAGS ?=
all: $(TARGET).z64
filesystem/%.xm64: assets/%.xm
@mkdir -p $(dir $@)
@echo " [AUDIO] $@"
@$(N64_AUDIOCONV) $(AUDIOCONV_FLAGS) -o filesystem $<
filesystem/%.wav64: assets/%.wav
@mkdir -p $(dir $@)
@echo " [AUDIO] $@"
@$(N64_AUDIOCONV) -o filesystem $<
filesystem/%.sprite: assets/%.png
@mkdir -p $(dir $@)
@echo " [SPRITE] $@"
@$(N64_MKSPRITE) $(MKSPRITE_FLAGS) -o filesystem "$<"
filesystem/n64brew.sprite: MKSPRITE_FLAGS=--format RGBA16 --tiles 32,32
$(BUILD_DIR)/$(TARGET).dfs: $(assets_conv)
$(BUILD_DIR)/$(TARGET).elf: $(src:%.c=$(BUILD_DIR)/%.o)
$(TARGET).z64: N64_ROM_TITLE="N64brew GameJam 4"
$(TARGET).z64: $(BUILD_DIR)/$(TARGET).dfs
clean:
rm -rf $(BUILD_DIR) $(TARGET).z64
-include $(wildcard $(BUILD_DIR)/*.d)
.PHONY: all clean