* New rule for making .ko:s.
This commit is contained in:
parent
a1759d5bed
commit
d8e0b4eb26
|
@ -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!
|
# This makefile requires GNU make!
|
||||||
|
|
||||||
|
@ -9,6 +9,10 @@ TOOLS = tunslip scat codeprop
|
||||||
|
|
||||||
all: $(LIB) $(KERNELS) $(PROGS) $(TOOLS)
|
all: $(LIB) $(KERNELS) $(PROGS) $(TOOLS)
|
||||||
|
|
||||||
|
loadable_prg.ko: loadable_prg.o
|
||||||
|
udpsend.ko: udpsend.o
|
||||||
|
udprecv.ko: udprecv.o
|
||||||
|
|
||||||
gateway.out: gateway.o $(LIB)
|
gateway.out: gateway.o $(LIB)
|
||||||
client.out: client.o $(LIB)
|
client.out: client.o $(LIB)
|
||||||
dhclient.out: dhclient.o $(LIB)
|
dhclient.out: dhclient.o $(LIB)
|
||||||
|
@ -58,15 +62,9 @@ endif
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
$(CC) $(CFLAGS) -c $< -o $(notdir $(<:.c=.o))
|
$(CC) $(CFLAGS) -c $< -o $(notdir $(<:.c=.o))
|
||||||
|
|
||||||
# Transform one .o to a .ko
|
# Combine several .o:s to one .ko and but COMMONs into the BSS segment
|
||||||
%.ko: %.o
|
%.ko:
|
||||||
$(STRIP) -K _init -K _fini --strip-unneeded -g -x $< -o $@
|
$(LD) -r -dc --strip-all --unresolved-symbols=ignore-in-object-files $^ -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 $@
|
|
||||||
|
|
||||||
%.ihex: %.out
|
%.ihex: %.out
|
||||||
$(OBJCOPY) $^ -O ihex $@
|
$(OBJCOPY) $^ -O ihex $@
|
||||||
|
|
Loading…
Reference in a new issue