better makefiles
This commit is contained in:
parent
a6a7c22c5b
commit
ea031d3631
|
|
@ -1,34 +1,34 @@
|
||||||
OBJ= timer.o rtc72421.o u130.o gmtime.o timegm.o
|
OBJ= timer.o rtc72421.o u130.o gmtime.o timegm.o
|
||||||
M= ../common
|
M= ../common
|
||||||
CC= scc
|
CC= scc
|
||||||
INCLUDES= -I$(M)
|
CFLAGS= -O -I$(M)
|
||||||
CFLAGS= -O
|
CC_CMD= $(CC) -c $(CFLAGS)
|
||||||
CC_CMD= $(CC) -c $(CFLAGS) $(INCLUDES)
|
|
||||||
|
|
||||||
all: kernel
|
all: kernel
|
||||||
|
|
||||||
u130.o:
|
u130.o:
|
||||||
$(CC_CMD) $(M)/$*.c
|
$(CC_CMD) $(M)/u130.c
|
||||||
|
|
||||||
rtc72421.o:
|
rtc72421.o:
|
||||||
$(CC_CMD) $(M)/$*.c
|
$(CC_CMD) $(M)/rtc72421.c
|
||||||
|
|
||||||
gmtime.o:
|
gmtime.o:
|
||||||
$(CC_CMD) $(M)/$*.c
|
$(CC_CMD) $(M)/gmtime.c
|
||||||
|
|
||||||
timegm.o:
|
timegm.o:
|
||||||
$(CC_CMD) $(M)/$*.c
|
$(CC_CMD) $(M)/timegm.c
|
||||||
|
|
||||||
kernel: $(OBJ)
|
kernel: $(OBJ)
|
||||||
|
touch kernel
|
||||||
|
|
||||||
install: kernel
|
install: kernel
|
||||||
@echo "I will now include the new objects in the kernel library LIB1."
|
@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"
|
@echo "A backup of the old LIB1 can be found here: /usr/sys/sys/LIB1.orig"
|
||||||
if test ! -f /usr/sys/sys/LIB1.orig ; \
|
sh -c 'if test ! -f /usr/sys/sys/LIB1.orig ; then \
|
||||||
cp /usr/sys/sys/LIB1 /usr/sys/sys/LIB1.orig ; \
|
cp /usr/sys/sys/LIB1 /usr/sys/sys/LIB1.orig ; \
|
||||||
fi
|
fi'
|
||||||
ar rv /usr/sys/sys/LIB1 timer.o rtc72421.o u130.o gmtime.o timegm.o
|
ar rv /usr/sys/sys/LIB1 $(OBJ)
|
||||||
@echo "You should now go and build a new WEGA kernel to get the RTC up and running!"
|
@echo "You should now go and build a new WEGA kernel to get the RTC up and running"
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(OBJ)
|
rm -f $(OBJ) kernel
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
all: sa.timer kernel
|
all: sa.timer kern
|
||||||
|
|
||||||
sa.timer:
|
sa.timer:
|
||||||
cd standalone ; make all
|
cd standalone ; make all
|
||||||
instsa:
|
instsa:
|
||||||
cd standalone ; make install
|
cd standalone ; make install
|
||||||
|
|
||||||
kernel:
|
kern:
|
||||||
cd kernel ; make all
|
cd kernel ; make all
|
||||||
|
|
||||||
instkern:
|
instkern:
|
||||||
|
|
|
||||||
|
|
@ -2,23 +2,22 @@ OBJ= sa.timer.o u130.o rtc72421.o gmtime.o timegm.o
|
||||||
M= ../common
|
M= ../common
|
||||||
CC= cc
|
CC= cc
|
||||||
LD= ld
|
LD= ld
|
||||||
INCLUDES= -I$(M)
|
CFLAGS= -O -I$(M)
|
||||||
CFLAGS= -O
|
CC_CMD= $(CC) -c $(CFLAGS)
|
||||||
CC_CMD= $(CC) -c $(CFLAGS) $(INCLUDES)
|
|
||||||
|
|
||||||
all: sa.timer
|
all: sa.timer
|
||||||
|
|
||||||
u130.o:
|
u130.o:
|
||||||
$(CC_CMD) $(M)/$*.c
|
$(CC_CMD) $(M)/u130.c
|
||||||
|
|
||||||
rtc72421.o:
|
rtc72421.o:
|
||||||
$(CC_CMD) $(M)/$*.c
|
$(CC_CMD) $(M)/rtc72421.c
|
||||||
|
|
||||||
gmtime.o:
|
gmtime.o:
|
||||||
$(CC_CMD) $(M)/$*.c
|
$(CC_CMD) $(M)/gmtime.c
|
||||||
|
|
||||||
timegm.o:
|
timegm.o:
|
||||||
$(CC_CMD) $(M)/$*.c
|
$(CC_CMD) $(M)/timegm.c
|
||||||
|
|
||||||
sa.timer: $(OBJ) libb.a
|
sa.timer: $(OBJ) libb.a
|
||||||
$(LD) -s -o $@ $(OBJ) libb.a
|
$(LD) -s -o $@ $(OBJ) libb.a
|
||||||
|
|
@ -26,9 +25,9 @@ sa.timer: $(OBJ) libb.a
|
||||||
|
|
||||||
install: sa.timer
|
install: sa.timer
|
||||||
@echo "A backup of the old sa.timer can be found here: /sa.timer.orig"
|
@echo "A backup of the old sa.timer can be found here: /sa.timer.orig"
|
||||||
if test ! -f /sa.timer.orig ; \
|
sh -c 'if test ! -f /sa.timer.orig ; then \
|
||||||
cp /sa.timer /sa.timer.orig ; \
|
cp /sa.timer /sa.timer.orig ; \
|
||||||
fi
|
fi'
|
||||||
cp sa.timer /sa.timer
|
cp sa.timer /sa.timer
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue