-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
61 lines (42 loc) · 1.53 KB
/
Copy pathMakefile
File metadata and controls
61 lines (42 loc) · 1.53 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
.SUFFIXES:
#---------------------------------------------------------------------------------
ifeq ($(strip $(DEVKITPRO)),)
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitpro")
endif
ifeq ($(strip $(DEVKITSH4)),)
$(error "Please set DEVKITSH4 in your environment. export DEVKITSH4=<path to>devkitSH4")
endif
ifeq (,$(filter _%,$(notdir $(CURDIR))))
include target.mk
else
include $(DEVKITSH4)/exword_rules
INCLUDES := -I$(CURDIR)/../../include
CFLAGS := $(INCLUDES) -m4-nofpu -O2 -ffunction-sections
ASFLAGS := -m4-nofpu
ifeq (libdataplus,$(TARGET))
VPATH := $(SRCDIR)/util \
$(SRCDIR)/util/fixedptc \
$(SRCDIR)/syscall \
$(SRCDIR)/libc
UTIL := $(patsubst %.c,%.o, $(notdir $(wildcard $(SRCDIR)/util/*.c)))
FIXEDPT := $(patsubst %.c,%.o, $(notdir $(wildcard $(SRCDIR)/util/fixedptc/*.c)))
LIBC := $(patsubst %.c,%.o, $(notdir $(wildcard $(SRCDIR)/libc/*.c)))
SYSCALL := $(patsubst %.c,%.o, $(notdir $(wildcard $(SRCDIR)/syscall/*.c))) _exit.o
OBJECTS := $(UTIL) $(FIXEDPT) $(SYSCALL) $(LIBC)
else
ifeq (libsh4a,$(TARGET))
VPATH := $(SRCDIR)/cpu/sh4a \
$(SRCDIR)/cpu/sh4a/input \
SH4A := $(patsubst %.s,%.o, $(notdir $(wildcard $(SRCDIR)/cpu/sh4a/*.s)))
INPUTDEV := $(patsubst %.c,%.o, $(notdir $(wildcard $(SRCDIR)/cpu/sh4a/input/*.c)))
OBJECTS := $(SH4A) $(INPUTDEV)
else
ifeq (libgraphics,$(TARGET))
VPATH := $(SRCDIR)/graphics \
GRAPHICS := $(patsubst %.c,%.o, $(notdir $(wildcard $(SRCDIR)/graphics/*.c)))
OBJECTS := $(GRAPHICS)
endif
endif
endif
$(TARGET).a: $(OBJECTS)
endif