From 48977bd89f18d02bd2712e18a370b83cdeaa40cc Mon Sep 17 00:00:00 2001 From: oliverschmidt Date: Wed, 18 Apr 2007 22:52:22 +0000 Subject: [PATCH] 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. --- cpu/6502/Makefile.6502 | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/cpu/6502/Makefile.6502 b/cpu/6502/Makefile.6502 index 717031d3e..a6464f999 100644 --- a/cpu/6502/Makefile.6502 +++ b/cpu/6502/Makefile.6502 @@ -29,23 +29,27 @@ # # Author: Oliver Schmidt # -# $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 # ####################### +ifndef CONTIKI + ${error CONTIKI not defined! You must specify where CONTIKI resides!} +endif + 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 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 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 AS = ca65 @@ -58,10 +62,10 @@ CFLAGS += -t $(TARGET) -Or --create-dep $(INCLUDES) LDFLAGS = -C $(CONTIKI)/platform/$(TARGET)/linker.cfg -m $(TARGET).map AROPTS = a -PROJECT_OBJECTFILES += $(OBJECTDIR)/contiki-main.o -CONTIKI_OBJECTFILES += $(OBJECTDIR)/lc-asm.o $(OBJECTDIR)/uip_arch.o -TARGET_STARTFILES = $(TARGET).o -TARGET_LIBFILES = $(TARGET).lib +CONTIKI_TARGET_MAIN = $(OBJECTDIR)/contiki-main.o +CONTIKI_OBJECTFILES += $(OBJECTDIR)/contiki-main.o $(OBJECTDIR)/lc-asm.o $(OBJECTDIR)/uip_arch.o +TARGET_STARTFILES = $(TARGET).o --start-group +TARGET_LIBFILES = $(TARGET).lib --end-group ######### # Rules #