From a6a7c22c5b20c910b0537998d31131648aa9c08e Mon Sep 17 00:00:00 2001 From: Oliver Lehmann Date: Fri, 21 Aug 2009 18:29:22 +0000 Subject: [PATCH] new makefiles --- WEGA/src/cmd/standalone/sa.timer/README | 20 ++------- .../cmd/standalone/sa.timer/kernel/makefile | 42 ++++++++++++++----- WEGA/src/cmd/standalone/sa.timer/makefile | 24 ++++++----- .../standalone/sa.timer/standalone/makefile | 39 +++++++++++++---- 4 files changed, 80 insertions(+), 45 deletions(-) diff --git a/WEGA/src/cmd/standalone/sa.timer/README b/WEGA/src/cmd/standalone/sa.timer/README index c7fa242..307ece5 100644 --- a/WEGA/src/cmd/standalone/sa.timer/README +++ b/WEGA/src/cmd/standalone/sa.timer/README @@ -2,25 +2,11 @@ make clean make sa.timer -mv /sa.timer /sa.timer.orig -mv sa.timer /sa.timer +make instsa #### Kernel Modul bauen - # altes Zeug weg make clean - - # Objekte bauen -scc -c -O timer.c gmtime.c timegm.c rtc72421.c u130.c - - # LIB1 sichern -cp /usr/sys/sys/LIB1 /usr/sys/sys/LIB1.orig - - # Objekte ins Kernel-Archiv legen - # (Reihenfolge: lorder timer.o rtc72421.o u130.o gmtime.o timegm.o | tsort) -ar rv /usr/sys/sys/LIB1 timer.o rtc72421.o u130.o gmtime.o timegm.o - - # Kernel generieren -cd /usr/sys/conf ; make -f make.wega wega -chmod 400 wega ; mv wega /wega.new +make kernel +make instkern diff --git a/WEGA/src/cmd/standalone/sa.timer/kernel/makefile b/WEGA/src/cmd/standalone/sa.timer/kernel/makefile index 3b96163..e6c2fda 100644 --- a/WEGA/src/cmd/standalone/sa.timer/kernel/makefile +++ b/WEGA/src/cmd/standalone/sa.timer/kernel/makefile @@ -1,12 +1,34 @@ -OBJ= sa.timer.o u130.o rtc72421.o gmtime.o timegm.o -CC= cc -LD= ld -DEBUG= -CFLAGS= -O $(DEBUG) +OBJ= timer.o rtc72421.o u130.o gmtime.o timegm.o +M= ../common +CC= scc +INCLUDES= -I$(M) +CFLAGS= -O +CC_CMD= $(CC) -c $(CFLAGS) $(INCLUDES) + +all: kernel + +u130.o: + $(CC_CMD) $(M)/$*.c + +rtc72421.o: + $(CC_CMD) $(M)/$*.c + +gmtime.o: + $(CC_CMD) $(M)/$*.c + +timegm.o: + $(CC_CMD) $(M)/$*.c + +kernel: $(OBJ) + +install: kernel + @echo "I will now include the new objects in the kernel library LIB1." + @echo "A backup of the old LIB1 can be found here: /usr/sys/sys/LIB1.orig" + if test ! -f /usr/sys/sys/LIB1.orig ; \ + cp /usr/sys/sys/LIB1 /usr/sys/sys/LIB1.orig ; \ + fi + ar rv /usr/sys/sys/LIB1 timer.o rtc72421.o u130.o gmtime.o timegm.o + @echo "You should now go and build a new WEGA kernel to get the RTC up and running!" -all: sa.timer -sa.timer: $(OBJ) libb.a - $(LD) -s -o $@ $(OBJ) libb.a - chmod 400 $@ clean: - rm -f $(OBJ) timer.o sa.timer + rm -f $(OBJ) diff --git a/WEGA/src/cmd/standalone/sa.timer/makefile b/WEGA/src/cmd/standalone/sa.timer/makefile index 3b96163..f2f4d0e 100644 --- a/WEGA/src/cmd/standalone/sa.timer/makefile +++ b/WEGA/src/cmd/standalone/sa.timer/makefile @@ -1,12 +1,16 @@ -OBJ= sa.timer.o u130.o rtc72421.o gmtime.o timegm.o -CC= cc -LD= ld -DEBUG= -CFLAGS= -O $(DEBUG) +all: sa.timer kernel -all: sa.timer -sa.timer: $(OBJ) libb.a - $(LD) -s -o $@ $(OBJ) libb.a - chmod 400 $@ +sa.timer: + cd standalone ; make all +instsa: + cd standalone ; make install + +kernel: + cd kernel ; make all + +instkern: + cd kernel ; make install + clean: - rm -f $(OBJ) timer.o sa.timer + cd standalone ; make clean + cd kernel ; make clean diff --git a/WEGA/src/cmd/standalone/sa.timer/standalone/makefile b/WEGA/src/cmd/standalone/sa.timer/standalone/makefile index 3b96163..9dae947 100644 --- a/WEGA/src/cmd/standalone/sa.timer/standalone/makefile +++ b/WEGA/src/cmd/standalone/sa.timer/standalone/makefile @@ -1,12 +1,35 @@ -OBJ= sa.timer.o u130.o rtc72421.o gmtime.o timegm.o -CC= cc -LD= ld -DEBUG= -CFLAGS= -O $(DEBUG) +OBJ= sa.timer.o u130.o rtc72421.o gmtime.o timegm.o +M= ../common +CC= cc +LD= ld +INCLUDES= -I$(M) +CFLAGS= -O +CC_CMD= $(CC) -c $(CFLAGS) $(INCLUDES) all: sa.timer + +u130.o: + $(CC_CMD) $(M)/$*.c + +rtc72421.o: + $(CC_CMD) $(M)/$*.c + +gmtime.o: + $(CC_CMD) $(M)/$*.c + +timegm.o: + $(CC_CMD) $(M)/$*.c + sa.timer: $(OBJ) libb.a - $(LD) -s -o $@ $(OBJ) libb.a - chmod 400 $@ + $(LD) -s -o $@ $(OBJ) libb.a + chmod 400 $@ + +install: sa.timer + @echo "A backup of the old sa.timer can be found here: /sa.timer.orig" + if test ! -f /sa.timer.orig ; \ + cp /sa.timer /sa.timer.orig ; \ + fi + cp sa.timer /sa.timer + clean: - rm -f $(OBJ) timer.o sa.timer + rm -f $(OBJ) sa.timer