Update Pica kernel makefile template (Makefile.pica) to NetBSD 1.1A
conventions, so that Pica kernel can build libkern and libcompat. Based on the changes to pmax/conf/Makefile.pmax.
This commit is contained in:
parent
202c5712f6
commit
77199aee5c
@ -1,8 +1,8 @@
|
||||
# $NetBSD: Makefile.pica,v 1.1.1.1 1996/03/13 04:58:05 jonathan Exp $
|
||||
# $NetBSD: Makefile.pica,v 1.2 1996/03/27 11:00:38 jonathan Exp $
|
||||
|
||||
# @(#)Makefile.pica 8.2 (Berkeley) 2/16/94
|
||||
#
|
||||
# Makefile for 4.4 BSD
|
||||
# Makefile for NetBSD
|
||||
#
|
||||
# This makefile is constructed from a machine description:
|
||||
# config machineid
|
||||
@ -23,23 +23,29 @@
|
||||
|
||||
# DEBUG is set to -g by config if debugging is requested (config -g).
|
||||
# PROF is set to -pg by config if profiling is requested (config -p).
|
||||
TOUCH= touch -f -c
|
||||
|
||||
AS?= as
|
||||
CC?= cc
|
||||
CPP?= cpp
|
||||
#LD?=ld.kern
|
||||
LD?= ld
|
||||
STRIP?= strip -d
|
||||
TOUCH?= touch -f -c
|
||||
|
||||
# source tree is located via $S relative to the compilation directory
|
||||
S= ../../../..
|
||||
PICA= ../..
|
||||
|
||||
LD=ld.kern
|
||||
|
||||
INCLUDES= -I. -I$S/arch -I$S -I$S/sys
|
||||
COPTS= ${INCLUDES} ${IDENT} -D_KERNEL -Dpica -D__NetBSD__ ${GP} \
|
||||
-mips2 -mcpu=r4000
|
||||
CPPOPTS=${INCLUDES} ${IDENT} -D_KERNEL -Dpica -D__NetBSD__
|
||||
.ifdef DEBUG
|
||||
CFLAGS= ${DEBUG} ${COPTS}
|
||||
.else
|
||||
CFLAGS= -O2 ${COPTS}
|
||||
.endif
|
||||
INCLUDES= -I. -I$S/arch -I$S #-I$S/sys
|
||||
CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -Dpica -D__NetBSD__ ${GP}
|
||||
CFLAGS= ${DEBUG} -mips2 -mcpu=r4000 # -O2 -Werror
|
||||
COPTS= ${CPPFLAGS} ${CFLAGS}
|
||||
AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE
|
||||
|
||||
# XXX what should this be for pica?
|
||||
#LINKFLAGS= -N -Ttext 80030000 -e start
|
||||
|
||||
|
||||
### find out what to use for libkern
|
||||
.include "$S/lib/libkern/Makefile.inc"
|
||||
@ -62,16 +68,15 @@ LIBCOMPAT= ${COMPATLIB_PROF}
|
||||
# capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file
|
||||
# is marked as config-dependent.
|
||||
|
||||
NORMAL_C= ${CC} -c ${CFLAGS} ${PROF} $<
|
||||
NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $<
|
||||
|
||||
DRIVER_C= ${CC} -c ${CFLAGS} ${PROF} $<
|
||||
DRIVER_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $<
|
||||
NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
|
||||
NORMAL_C_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $<
|
||||
|
||||
PROFILE_C= ${CC} -p -c ${COPTS} $<
|
||||
DRIVER_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
|
||||
DRIVER_C_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $<
|
||||
|
||||
NORMAL_S= ${AS} ${COPTS} $< -o $@
|
||||
NORMAL_S_C= ${AS} ${COPTS} ${PARAM} $< -o $@
|
||||
NORMAL_S= ${AS} ${AFLAGS} ${CPPFLAGS} $< -o $@
|
||||
NORMAL_S_C= ${AS} ${AFLAGS} $$CPPFLAGS} ${PARAM} $< -o $@
|
||||
|
||||
%OBJS
|
||||
|
||||
@ -82,7 +87,7 @@ NORMAL_S_C= ${AS} ${COPTS} ${PARAM} $< -o $@
|
||||
# ${SYSTEM_LD_HEAD}
|
||||
# ${SYSTEM_LD} swapxxx.o
|
||||
# ${SYSTEM_LD_TAIL}
|
||||
SYSTEM_OBJ= locore.o fp.o vnode_if.o ${OBJS} param.o ioconf.o ${LIBKERN} \
|
||||
SYSTEM_OBJ= locore.o fp.o ${OBJS} param.o ioconf.o ${LIBKERN} \
|
||||
${LIBCOMPAT}
|
||||
#SYSTEM_DEP= Makefile symbols.sort ${SYSTEM_OBJ} ${LIBKERN}
|
||||
SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
|
||||
@ -108,6 +113,12 @@ SYSTEM_LD_TAIL= mv $@ ${@}.elf; \
|
||||
|
||||
%LOAD
|
||||
|
||||
assym.h: genassym
|
||||
./genassym >assym.h
|
||||
|
||||
genassym: ${PICA}/pica/genassym.c
|
||||
${CC} ${INCLUDES} ${IDENT} ${PARAM} -o genassym ${PICA}/pica/genassym.c
|
||||
|
||||
newvers:
|
||||
sh $S/conf/newvers.sh
|
||||
${CC} $(CFLAGS) -c vers.c
|
||||
@ -143,12 +154,6 @@ clock.o machdep.o autoconf.o conf.o: Makefile
|
||||
# depend on network configuration
|
||||
uipc_proto.o vfs_conf.o: Makefile
|
||||
|
||||
assym.h: genassym
|
||||
./genassym >assym.h
|
||||
|
||||
genassym: ${PICA}/pica/genassym.c
|
||||
${CC} ${INCLUDES} ${IDENT} ${PARAM} -o genassym ${PICA}/pica/genassym.c
|
||||
|
||||
depend: assym.h param.c vnode_if.h
|
||||
mkdep ${COPTS} ${CFILES} ioconf.c param.c
|
||||
mkdep -a -p ${INCLUDES} ${IDENT} ${PARAM} ${PICA}/pica/genassym.c
|
||||
@ -165,23 +170,23 @@ tags:
|
||||
@echo "see $S/kern/Makefile for tags"
|
||||
|
||||
ioconf.o: ioconf.c
|
||||
${CC} -c ${CFLAGS} ioconf.c
|
||||
${NORMAL_C}
|
||||
|
||||
param.c: $S/conf/param.c
|
||||
rm -f param.c
|
||||
cp $S/conf/param.c .
|
||||
|
||||
param.o: param.c Makefile
|
||||
${CC} -c ${CFLAGS} ${PARAM} param.c
|
||||
${NORMAL_C_C}
|
||||
|
||||
vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
|
||||
sh $S/conf/newvers.sh
|
||||
${CC} ${CFLAGS} -c vers.c
|
||||
|
||||
vnode_if.c: $S/kern/vnode_if.sh $S/kern/vnode_if.src
|
||||
sh $S/kern/vnode_if.sh $S/kern/vnode_if.src
|
||||
vnode_if.h: $S/kern/vnode_if.sh $S/kern/vnode_if.src
|
||||
sh $S/kern/vnode_if.sh $S/kern/vnode_if.src
|
||||
#vnode_if.c: $S/kern/vnode_if.sh $S/kern/vnode_if.src
|
||||
# sh $S/kern/vnode_if.sh $S/kern/vnode_if.src
|
||||
#vnode_if.h: $S/kern/vnode_if.sh $S/kern/vnode_if.src
|
||||
# sh $S/kern/vnode_if.sh $S/kern/vnode_if.src
|
||||
|
||||
%RULES
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user