gbdk/gbdk-lib/Makefile.common

40 lines
672 B
Makefile
Raw Permalink Normal View History

2015-01-10 16:25:06 +01:00
# Common settings
2015-01-10 16:25:08 +01:00
ifndef ASM
ASM = asxxxx
endif
2015-01-10 16:25:06 +01:00
2015-01-10 16:25:09 +01:00
ifndef MODEL
MODEL = small
endif
2015-01-10 16:25:06 +01:00
ifndef PORTS
PORTS = gbz80 z80
endif
ifndef PLATFORMS
PLATFORMS = gb consolez80 rrgb
endif
ifndef SDCCLIB
SDCCLIB = /home/michaelh/projects/sdcc
endif
2015-01-10 16:25:08 +01:00
SCC = $(SDCCLIB)/bin/sdcc
GBCC = $(SDCCLIB)/bin/lcc
2015-01-10 16:25:06 +01:00
2015-01-10 16:25:07 +01:00
AS_Z80 = $(SDCCLIB)/bin/as-z80
2015-01-10 16:25:08 +01:00
ifeq ($(RGBDS),1)
AS_GBZ80 = rgbasm
else
2015-01-10 16:25:06 +01:00
AS_GBZ80 = $(SDCCLIB)/bin/as-gbz80
2015-01-10 16:25:08 +01:00
endif
2015-01-10 16:25:06 +01:00
2015-01-10 16:25:08 +01:00
CLEANSPEC = *.o *.cdb *.sym *.lst *~ *.asm
2015-01-10 16:25:06 +01:00
2015-01-10 16:25:09 +01:00
CFLAGS = -I$(TOPDIR)/include --model-$(MODEL)
2015-01-10 16:25:09 +01:00
CFLAGS += -m$(PORT) -DGBDK=1
2015-01-10 16:25:08 +01:00
CC = $(SCC)
2015-01-10 16:25:09 +01:00
BUILD = $(TOPDIR)/build/$(MODEL)/$(ASM)/$(THIS)
2015-01-10 16:25:08 +01:00
LIB = $(BUILD)/$(THIS).lib
2015-01-10 16:25:09 +01:00
OBJ = $(CSRC:%.c=$(BUILD)/%.o) $(ASSRC:%.s=$(BUILD)/%.o)