From d8e0b4eb26d08a5ffd0a7ccf1126096d09935530 Mon Sep 17 00:00:00 2001 From: bg- Date: Tue, 5 Dec 2006 16:19:43 +0000 Subject: [PATCH] * New rule for making .ko:s. --- platform/sky/Makefile | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/platform/sky/Makefile b/platform/sky/Makefile index d66963fc7..e2461c9e8 100644 --- a/platform/sky/Makefile +++ b/platform/sky/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.6 2006/12/01 14:55:15 bg- Exp $ +# $Id: Makefile,v 1.7 2006/12/05 16:19:43 bg- Exp $ # # This makefile requires GNU make! @@ -9,6 +9,10 @@ TOOLS = tunslip scat codeprop all: $(LIB) $(KERNELS) $(PROGS) $(TOOLS) +loadable_prg.ko: loadable_prg.o +udpsend.ko: udpsend.o +udprecv.ko: udprecv.o + gateway.out: gateway.o $(LIB) client.out: client.o $(LIB) dhclient.out: dhclient.o $(LIB) @@ -58,15 +62,9 @@ endif %.o: %.c $(CC) $(CFLAGS) -c $< -o $(notdir $(<:.c=.o)) -# Transform one .o to a .ko -%.ko: %.o - $(STRIP) -K _init -K _fini --strip-unneeded -g -x $< -o $@ - -# Combine several .o:s to one .ko -# The msp430-ld can't do incremental linking, bogus output -#%.ko %.o: $^ -# /opt/msp430/bin/msp430-ld -r $< -o $@ -# $(STRIP) -K _init -K _fini --strip-unneeded -g -x $@ +# Combine several .o:s to one .ko and but COMMONs into the BSS segment +%.ko: + $(LD) -r -dc --strip-all --unresolved-symbols=ignore-in-object-files $^ -o $@ %.ihex: %.out $(OBJCOPY) $^ -O ihex $@