* Typo in comment.
* Use nm and awk to create namelist.
This commit is contained in:
parent
3c9fe59106
commit
8adcee17c3
1 changed files with 5 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
||||||
# $Id: Makefile,v 1.7 2006/12/05 16:19:43 bg- Exp $
|
# $Id: Makefile,v 1.8 2006/12/20 13:46:14 bg- Exp $
|
||||||
#
|
#
|
||||||
# This makefile requires GNU make!
|
# This makefile requires GNU make!
|
||||||
|
|
||||||
|
@ -39,6 +39,7 @@ LIBC=-lgcc -lc -lgcc
|
||||||
CC=msp430-gcc
|
CC=msp430-gcc
|
||||||
LD=msp430-ld
|
LD=msp430-ld
|
||||||
AS=msp430-as
|
AS=msp430-as
|
||||||
|
NM=msp430-nm
|
||||||
OBJCOPY=msp430-objcopy
|
OBJCOPY=msp430-objcopy
|
||||||
STRIP=msp430-strip
|
STRIP=msp430-strip
|
||||||
AR=msp430-ar
|
AR=msp430-ar
|
||||||
|
@ -62,7 +63,7 @@ endif
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
$(CC) $(CFLAGS) -c $< -o $(notdir $(<:.c=.o))
|
$(CC) $(CFLAGS) -c $< -o $(notdir $(<:.c=.o))
|
||||||
|
|
||||||
# Combine several .o:s to one .ko and but COMMONs into the BSS segment
|
# Combine several .o:s to one .ko and put COMMONs into the BSS segment
|
||||||
%.ko:
|
%.ko:
|
||||||
$(LD) -r -dc --strip-all --unresolved-symbols=ignore-in-object-files $^ -o $@
|
$(LD) -r -dc --strip-all --unresolved-symbols=ignore-in-object-files $^ -o $@
|
||||||
|
|
||||||
|
@ -74,9 +75,9 @@ endif
|
||||||
|
|
||||||
# Add a namelist to the kernel
|
# Add a namelist to the kernel
|
||||||
%.out: $^
|
%.out: $^
|
||||||
-test -f $@_nm.c || echo "unsigned symbols[1];" > $@_nm.c
|
: | awk -f ../../tools/mknmlist > $@_tmp.c && mv $@_tmp.c $@_nm.c
|
||||||
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(LIBC) $@_nm.c
|
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(LIBC) $@_nm.c
|
||||||
../../tools/msp430-make-symbols $@ > $@_tmp.c && mv $@_tmp.c $@_nm.c
|
$(NM) $@ | awk -f ../../tools/mknmlist > $@_tmp.c && mv $@_tmp.c $@_nm.c
|
||||||
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(LIBC) $@_nm.c
|
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(LIBC) $@_nm.c
|
||||||
|
|
||||||
%.u: %.ihex
|
%.u: %.ihex
|
||||||
|
|
Loading…
Reference in a new issue