Build system

* Use sh-elf-gcc (as used on Planète Casio)
* Link with libfxcg -DFXCG_MINI_COMPAT
* Disable LTO as it caused problems (hopefully could be reenabled later)
This commit is contained in:
Lephenixnoir 2021-07-17 10:45:17 +02:00
parent 34e09b4cbf
commit 58e22d75d4
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
2 changed files with 10 additions and 5 deletions

5
.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
*.o
CG_Doom.bin
CG_Doom.elf
CG_Doom.map
doom.wad

View File

@ -1,10 +1,10 @@
CC=sh3eb-elf-gcc
CPP=sh3eb-elf-g++
OBJCOPY=sh3eb-elf-objcopy
CC=sh-elf-gcc
CPP=sh-elf-g++
OBJCOPY=sh-elf-objcopy
MKG3A=mkg3a
RM=rm
CFLAGS=-m4a-nofpu -mb -fgcse-sm -fgcse-las -fgcse-after-reload -Isrc -O3 -fmerge-all-constants -mhitachi -flto -fuse-linker-plugin -Wall -Wextra -I../../../../include -lgcc -L../../../../lib -I./ -I../../cgdoom
LDFLAGS=$(CFLAGS) -nostartfiles -T../../../../toolchain/prizm.x -Wl,-static -Wl,-gc-sections -lgcc
CFLAGS=-m4a-nofpu -mb -fgcse-sm -fgcse-las -fgcse-after-reload -Isrc -O3 -fmerge-all-constants -mhitachi -fuse-linker-plugin -Wall -Wextra -I../../../../include -lgcc -L../../../../lib -I./ -I../../cgdoom -D_FXCG_MINICOMPAT
LDFLAGS=$(CFLAGS) -nostartfiles -T../../../../toolchain/prizm.x -Wl,-static -lfxcg -lgcc -Wl,-Map=$(PROJ_NAME).map
CSOURCES=$(wildcard ../../cgdoom/*.c)
OBJECTS=$(CSOURCES:.c=.o)
PROJ_NAME=CG_Doom