new makefiles

This commit is contained in:
Oliver Lehmann 2009-08-21 18:29:22 +00:00
parent 84b2dd8ee2
commit a6a7c22c5b
4 changed files with 80 additions and 45 deletions

View File

@ -2,25 +2,11 @@
make clean make clean
make sa.timer make sa.timer
mv /sa.timer /sa.timer.orig make instsa
mv sa.timer /sa.timer
#### Kernel Modul bauen #### Kernel Modul bauen
# altes Zeug weg
make clean make clean
make kernel
# Objekte bauen make instkern
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

View File

@ -1,12 +1,34 @@
OBJ= sa.timer.o u130.o rtc72421.o gmtime.o timegm.o OBJ= timer.o rtc72421.o u130.o gmtime.o timegm.o
CC= cc M= ../common
LD= ld CC= scc
DEBUG= INCLUDES= -I$(M)
CFLAGS= -O $(DEBUG) 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: clean:
rm -f $(OBJ) timer.o sa.timer rm -f $(OBJ)

View File

@ -1,12 +1,16 @@
OBJ= sa.timer.o u130.o rtc72421.o gmtime.o timegm.o all: sa.timer kernel
CC= cc
LD= ld
DEBUG=
CFLAGS= -O $(DEBUG)
all: sa.timer sa.timer:
sa.timer: $(OBJ) libb.a cd standalone ; make all
$(LD) -s -o $@ $(OBJ) libb.a instsa:
chmod 400 $@ cd standalone ; make install
kernel:
cd kernel ; make all
instkern:
cd kernel ; make install
clean: clean:
rm -f $(OBJ) timer.o sa.timer cd standalone ; make clean
cd kernel ; make clean

View File

@ -1,12 +1,35 @@
OBJ= sa.timer.o u130.o rtc72421.o gmtime.o timegm.o OBJ= sa.timer.o u130.o rtc72421.o gmtime.o timegm.o
CC= cc M= ../common
LD= ld CC= cc
DEBUG= LD= ld
CFLAGS= -O $(DEBUG) INCLUDES= -I$(M)
CFLAGS= -O
CC_CMD= $(CC) -c $(CFLAGS) $(INCLUDES)
all: sa.timer 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 sa.timer: $(OBJ) libb.a
$(LD) -s -o $@ $(OBJ) libb.a $(LD) -s -o $@ $(OBJ) libb.a
chmod 400 $@ 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: clean:
rm -f $(OBJ) timer.o sa.timer rm -f $(OBJ) sa.timer