forked from mrneo240/openmenu
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (35 loc) · 1.45 KB
/
Makefile
File metadata and controls
47 lines (35 loc) · 1.45 KB
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
TARGET := themeMenu.elf
EXT_SRCS := external/easing.c
TXR_SRCS := texture/block_pool.c texture/lru.c texture/txr_manager.c texture/dat_reader.c texture/serial_sanitize.c texture/simple_texture_allocator.c
BACKEND_SRCS := external/ini.c backend/gd_list.c backend/gdemu_sdk.c backend/gdemu_control.c backend/db_list.c
UI_MENUS := ui/ui_scroll.c ui/ui_line_large.c ui/ui_line_desc.c ui/ui_grid.c ui/global_settings.c ui/ui_menu_credits.c ui/theme_manager.c
UI_SRCS := ui/dc/font_bmf.c ui/dc/font_bitmap.c ui/dc/pvr_texture.c ui/dc/input.c ui/draw_kos.c ui/animation.c
SRCS := $(BACKEND_SRCS) $(UI_SRCS) $(UI_MENUS) $(TXR_SRCS) $(EXT_SRCS) vm2_api.c main.c
OBJS = $(subst .c,.o,$(SRCS))
CC := kos-cc
AS := kos-as
OBJCOPY := $(KOS_OBJCOPY)
RM := rm
CFLAGS := -I. -ffunction-sections -fdata-sections -std=c11 -O2 -g -Wno-unknown-pragmas -Wall -Wextra $(OPTIONS)
LDFLAGS := -Wl,--gc-sections -Xlinker -Map=output.map
LIBS := -lm
all: clean-elf $(TARGET)
%.o: %.s
@echo $(AS) $<
@$(CC) -x assembler-with-cpp $(CFLAGS) -c $< -o $@
%.o: %.c
@echo $(CC) $<
@$(CC) -c $< -o $@ $(CFLAGS)
$(TARGET): $(OBJS)
@echo \> $(CC) -o $(TARGET)
@$(CC) -o $(TARGET) $(LDFLAGS) $(CFLAGS) $(OBJS) $(LIBS) $(MAP)
@echo $(notdir $(OBJCOPY)) -R .stack -O binary $@ $(basename $@).bin
@$(OBJCOPY) -R .stack -O binary $@ 1ST_READ.BIN
.PHONY: clean
.PHONY: clean-elf
clean:
-@$(RM) -f $(TARGET) $(OBJS) *.bin *.BIN
clean-elf:
-@$(RM) -f $(TARGET)
run: $(TARGET)
$(KOS_LOADER) $(TARGET)