mirror of
https://github.com/gbdk-2020/gbdk-2020.git
synced 2026-02-19 16:21:53 +01:00
35 lines
722 B
Makefile
35 lines
722 B
Makefile
# Common settings
|
|
|
|
ifndef PORTS
|
|
PORTS = sm83 z80 mos6502
|
|
endif
|
|
ifndef PLATFORMS
|
|
PLATFORMS = gb ap duck gg sms msxdos nes
|
|
endif
|
|
|
|
ifndef SDCCLIB
|
|
SDCCLIB = $(SDCCDIR)
|
|
endif
|
|
|
|
SCC = $(SDCCLIB)/bin/sdcc
|
|
GBCC = $(SDCCLIB)/bin/lcc
|
|
SDAR = $(subst \,/,'$(SDCCLIB)')/bin/sdar
|
|
|
|
|
|
AS_Z80 = $(SDCCLIB)/bin/sdasz80
|
|
AS_SM83 = $(SDCCLIB)/bin/sdasgb
|
|
AS_6500 = $(SDCCLIB)/bin/sdas6500
|
|
|
|
CLEANSPEC = *.o *.cdb *.sym *.lst *~ *.asm
|
|
|
|
CFLAGS = -I$(TOPDIR)/include -D__PORT_$(PORT) -D__TARGET_$(THIS)
|
|
CFLAGS += -m$(PORT)
|
|
CFLAGS += --max-allocs-per-node 50000
|
|
CFLAGS += --fsigned-char
|
|
CFLAGS += --no-optsdcc-in-asm
|
|
CC = $(SCC)
|
|
BUILD = $(TOPDIR)/build/$(THIS)
|
|
LIB = $(BUILD)/$(THIS).lib
|
|
|
|
OBJ = $(CSRC:%.c=$(BUILD)/%.o) $(ASSRC:%.s=$(BUILD)/%.o)
|