# $NetBSD: Makefile.hp700,v 1.3 2002/11/17 17:10:11 chs Exp $ # Makefile for NetBSD # # This makefile is constructed from a machine description: # config machineid # Most changes should be made in the machine description # /sys/arch/hp700/conf/``machineid'' # after which you should do # config machineid # Machine generic makefile changes should be made in # /sys/arch/hp700/conf/Makefile.hp700 # after which config should be rerun for all machines of that type. # # To specify debugging, add the config line: makeoptions DEBUG="-g" # A better way is to specify -g only for a few files. # # makeoptions DEBUGLIST="uvm* trap if_*" USETOOLS?= no MACHINE_ARCH=hppa NEED_OWN_INSTALL_TARGET?=no .include ## ## (1) port identification ## HP700= $S/arch/hp700 HPPA= $S/arch/hppa GENASSYM= ${HP700}/hp700/genassym.cf ## ## (2) compile settings ## CPPFLAGS+= -Dhppa -Dhp700 # XXX fredette - the compiler blows up with -O2: COPTS+= -O0 .if ${IDENT:M-DDDB} != "" COPTS+= -fno-omit-frame-pointer .endif .if ${IDENT:M-DHP7000_CPU} != "" COPTS+= -mpa-risc-1-0 -mschedule=700 .elif ${IDENT:M-DHP8*_CPU} != "" COPTS+= -mpa-risc-2-0 .else COPTS+= -mpa-risc-1-1 .endif .if ${IDENT:M-DHP*_CPU} == ${IDENT:M-DHP7100LC_CPU} # XXX they said gcc has bugs in 7100lc scheduling #COPTS+= -mschedule=7100LC .endif .if ${IDENT:M-DFPEMUL} != "" COPTS+= -msoft-float -mdisable-fpregs .include "${HPPA}/spmath/Makefile.inc" .ifndef PROF LIBSPMATH= ${SPMATH} .else LIBSPMATH= ${SPMATH_PROF} .endif .endif COPTS+= -mno-space-regs -mfast-indirect-calls -mportable-runtime APPFLAGS= -x assembler-with-cpp -P -traditional ${CPPFLAGS} -D_LOCORE # Do NOT assume the compiler does "-x funny_format" (gcc-specific) # This needs an intermediate file. The original file is always # safe in some far away directory, so just use the base name. NORMAL_S= ${CPP} ${APPFLAGS} $< > $*.s ;\ ${AS} -o $@ $*.s ; rm $*.s ## ## (3) libkern and compat ## KERN_AS= obj ## ## (4) local objects, compile rules, and dependencies ## MD_OBJS= locore.o ${LIBSPMATH} MD_CFILES= MD_SFILES= ${HP700}/hp700/locore.S locore.o: ${HP700}/hp700/locore.S ${NORMAL_S} ## ## (5) link settings ## LINKFORMAT= -T ${HP700}/conf/ld.script TEXTADDR?= 00200000 EXTRA_LINKFLAGS= -Map $@.map ## ## (6) port specific target dependencies ## # For cross-compilation, the "gcc -M" mkdep script is convenient, # but that does not correctly make rules from *.s files. The # easiest work-around is to just list those dependencies here. # XXX fredette - probably very incomplete: locore.o: assym.h hppa/asm.h hppa/trap.h hppa/frame.h hppa/reg.h locore.o: ${HPPA}/hppa/trap.S locore.o: ${HPPA}/hppa/copy.S locore.o: ${HPPA}/hppa/proc_subr.S locore.o: ${HPPA}/hppa/support.S locore.o: ${HPPA}/hppa/sigcode.S copy.o: assym.h hppa/asm.h $S/sys/errno.h bcopy.o: assym.h hppa/asm.h copypage.o: assym.h hppa/asm.h # depend on CPU configuration db_machdep.o machdep.o pmap.o vm_machdep.o: Makefile # depends on KGDBDEV, KGDBRATE, DDB, etc. com_gsc.o clock.o pdc.o autoconf.o machdep.o: Makefile ## ## (7) misc settings ## MKDEP_AFLAGS= ${APPFLAGS} ## ## (8) config(8) generated machinery ## %INCLUDES %OBJS %CFILES %SFILES %LOAD %RULES ## ## (9) port independent kernel machinery ## .include "$S/conf/Makefile.kern.inc"