-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (38 loc) · 1.71 KB
/
Makefile
File metadata and controls
47 lines (38 loc) · 1.71 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
TOOLCHAIN ?= /home/tavisco/Palm/palmdev_V3/buildtools/toolchain/bin
SDK ?= /home/tavisco/Palm/palmdev_V3/buildtools/palm-os-sdk-master/sdk-5r3/include
PILRC = /home/tavisco/Palm/palmdev_V3/buildtools/pilrc3_3_unofficial/bin/pilrc
CC = $(TOOLCHAIN)/m68k-none-elf-gcc
LD = $(TOOLCHAIN)/m68k-none-elf-gcc
OBJCOPY = $(TOOLCHAIN)/m68k-none-elf-objcopy
COMMON = -Wno-multichar -funsafe-math-optimizations -Os -m68000 -mno-align-int -mpcrel -fpic -fshort-enums -mshort
WARN = -Wsign-compare -Wextra -Wall -Werror -Wno-unused-parameter -Wno-old-style-declaration -Wno-unused-function -Wno-unused-variable -Wno-error=cpp -Wno-error=switch
LKR = linker.lkr
CCFLAGS = $(LTO) $(WARN) $(COMMON) -I. -ffunction-sections -fdata-sections
LDFLAGS = $(LTO) $(WARN) $(COMMON) -Wl,--gc-sections -Wl,-T $(LKR)
SRCS = Src/StudentOrganizer.c Src/Main.c Src/Classes.c Src/ManageClass.c Src/ManageHomework.c Src/Homeworks.c
RCP = Rsc/StudentOrganizer_Rsc.rcp
RSC = Src/
OBJS = $(patsubst %.S,%.o,$(patsubst %.c,%.o,$(SRCS)))
TARGET = StudentOrganizer
CREATOR = UWSC
TYPE = appl
#add PalmOS SDK
INCS += -isystem$(SDK)
INCS += -isystem$(SDK)/Core
INCS += -isystem$(SDK)/Core/Hardware
INCS += -isystem$(SDK)/Core/System
INCS += -isystem$(SDK)/Core/UI
INCS += -isystem$(SDK)/Dynamic
INCS += -isystem$(SDK)/Libraries
INCS += -isystem$(SDK)/Libraries/PalmOSGlue
$(TARGET).prc: code0001.bin
$(PILRC) -ro -o $(TARGET).prc -creator $(CREATOR) -type $(TYPE) -name $(TARGET) -I $(RSC) $(RCP) && rm code0001.bin
%.bin: %.elf
$(OBJCOPY) -O binary $< $@ -j.vec -j.text -j.rodata
%.elf: $(OBJS)
$(LD) -o $@ $(LDFLAGS) $^
%.o : %.c Makefile
$(CC) $(CCFLAGS) $(INCS) -c $< -o $@
clean:
rm -rf $(OBJS) $(NAME).elf
.PHONY: clean