Replaced the PROJECT_OBJECTFILES hack with puting the Contiki library (containing contiki-main.o) and the cc65 libary into a cc65 "library group" which allows mutual crossreferences between the libraries in the group.

This commit is contained in:
oliverschmidt 2007-04-18 22:52:22 +00:00
parent ffe5f48d55
commit 48977bd89f

View File

@ -29,23 +29,27 @@
# #
# Author: Oliver Schmidt <ol.sc@web.de> # Author: Oliver Schmidt <ol.sc@web.de>
# #
# $Id: Makefile.6502,v 1.3 2007/04/14 15:55:50 oliverschmidt Exp $ # $Id: Makefile.6502,v 1.4 2007/04/18 22:52:22 oliverschmidt Exp $
# #
####################### #######################
# General Definitions # # General Definitions #
####################### #######################
ifndef CONTIKI
${error CONTIKI not defined! You must specify where CONTIKI resides!}
endif
ifndef CC65_INC ifndef CC65_INC
${error CC65_INC not defined! You must specify where the cc65 headers reside} ${error CC65_INC not defined! You must specify where the cc65 headers reside!}
endif endif
ifndef LD65_LIB ifndef LD65_LIB
${error LD65_LIB not defined! You must specify where the cc65 libraries reside} ${error LD65_LIB not defined! You must specify where the cc65 libraries reside!}
endif endif
ifndef LD65_OBJ ifndef LD65_OBJ
${error LD65_OBJ not defined! You must specify where the cc65 objects reside} ${error LD65_OBJ not defined! You must specify where the cc65 objects reside!}
endif endif
AS = ca65 AS = ca65
@ -58,10 +62,10 @@ CFLAGS += -t $(TARGET) -Or --create-dep $(INCLUDES)
LDFLAGS = -C $(CONTIKI)/platform/$(TARGET)/linker.cfg -m $(TARGET).map LDFLAGS = -C $(CONTIKI)/platform/$(TARGET)/linker.cfg -m $(TARGET).map
AROPTS = a AROPTS = a
PROJECT_OBJECTFILES += $(OBJECTDIR)/contiki-main.o CONTIKI_TARGET_MAIN = $(OBJECTDIR)/contiki-main.o
CONTIKI_OBJECTFILES += $(OBJECTDIR)/lc-asm.o $(OBJECTDIR)/uip_arch.o CONTIKI_OBJECTFILES += $(OBJECTDIR)/contiki-main.o $(OBJECTDIR)/lc-asm.o $(OBJECTDIR)/uip_arch.o
TARGET_STARTFILES = $(TARGET).o TARGET_STARTFILES = $(TARGET).o --start-group
TARGET_LIBFILES = $(TARGET).lib TARGET_LIBFILES = $(TARGET).lib --end-group
######### #########
# Rules # # Rules #