2005-05-31 08:03:08 +04:00
|
|
|
# $NetBSD: Makefile.i386,v 1.138 2005/05/31 04:03:10 christos Exp $
|
1996-02-02 23:08:17 +03:00
|
|
|
|
1993-04-29 07:27:39 +04:00
|
|
|
# Makefile for NetBSD
|
1993-03-21 12:45:37 +03:00
|
|
|
#
|
|
|
|
# This makefile is constructed from a machine description:
|
|
|
|
# config machineid
|
|
|
|
# Most changes should be made in the machine description
|
1993-12-15 04:06:55 +03:00
|
|
|
# /sys/arch/i386/conf/``machineid''
|
1993-03-21 12:45:37 +03:00
|
|
|
# after which you should do
|
1996-02-02 23:08:17 +03:00
|
|
|
# config machineid
|
|
|
|
# Machine generic makefile changes should be made in
|
1993-12-15 04:06:55 +03:00
|
|
|
# /sys/arch/i386/conf/Makefile.i386
|
1994-05-23 14:18:52 +04:00
|
|
|
# after which config should be rerun for all machines of that type.
|
2001-11-16 03:23:02 +03:00
|
|
|
#
|
2001-11-20 15:56:17 +03:00
|
|
|
# To specify debugging, add the config line: makeoptions DEBUG="-g"
|
2001-11-16 03:23:02 +03:00
|
|
|
# A better way is to specify -g only for a few files.
|
|
|
|
#
|
|
|
|
# makeoptions DEBUGLIST="uvm* trap if_*"
|
1994-05-23 14:18:52 +04:00
|
|
|
|
2001-11-16 03:23:02 +03:00
|
|
|
MACHINE_ARCH= i386
|
2001-10-26 10:45:33 +04:00
|
|
|
USETOOLS?= no
|
2001-11-16 03:23:02 +03:00
|
|
|
NEED_OWN_INSTALL_TARGET?=no
|
1999-01-28 23:04:54 +03:00
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
2001-11-16 03:23:02 +03:00
|
|
|
##
|
|
|
|
## (1) port identification
|
|
|
|
##
|
|
|
|
I386= $S/arch/i386
|
2005-05-31 08:03:08 +04:00
|
|
|
GENASSYM_CONF= ${I386}/i386/genassym.cf
|
2001-11-16 03:23:02 +03:00
|
|
|
|
|
|
|
##
|
|
|
|
## (2) compile settings
|
|
|
|
##
|
2001-11-23 08:18:59 +03:00
|
|
|
CPPFLAGS+= -Di386
|
|
|
|
AFLAGS+= -x assembler-with-cpp -traditional-cpp
|
2001-06-05 09:05:46 +04:00
|
|
|
|
2001-11-16 03:23:02 +03:00
|
|
|
##
|
2001-11-20 15:56:17 +03:00
|
|
|
## (3) libkern and compat
|
2001-11-16 03:23:02 +03:00
|
|
|
##
|
2005-03-12 17:39:12 +03:00
|
|
|
.if !empty(IDENT:M-DLKM)
|
2001-11-16 03:23:02 +03:00
|
|
|
KERN_AS= obj
|
2005-03-12 17:39:12 +03:00
|
|
|
.else
|
|
|
|
KERN_AS= library
|
|
|
|
.endif
|
2001-11-16 03:23:02 +03:00
|
|
|
|
|
|
|
##
|
|
|
|
## (4) local objects, compile rules, and dependencies
|
|
|
|
##
|
2003-03-03 01:19:05 +03:00
|
|
|
MD_OBJS= locore.o spl.o vector.o microtime.o
|
2001-11-16 03:23:02 +03:00
|
|
|
MD_CFILES=
|
2003-05-02 21:40:13 +04:00
|
|
|
MD_SFILES= ${I386}/i386/locore.S ${I386}/i386/spl.S \
|
|
|
|
${I386}/i386/vector.S ${I386}/i386/microtime.S
|
2001-01-20 04:05:53 +03:00
|
|
|
|
2002-11-22 18:23:35 +03:00
|
|
|
locore.o: ${I386}/i386/locore.S assym.h
|
|
|
|
${NORMAL_S}
|
|
|
|
|
|
|
|
spl.o: ${I386}/i386/spl.S assym.h
|
|
|
|
${NORMAL_S}
|
|
|
|
|
|
|
|
vector.o: ${I386}/i386/vector.S assym.h
|
2001-11-16 03:23:02 +03:00
|
|
|
${NORMAL_S}
|
|
|
|
|
2003-03-03 01:19:05 +03:00
|
|
|
microtime.o: ${I386}/i386/microtime.S assym.h
|
|
|
|
${NORMAL_S}
|
|
|
|
|
2001-11-16 03:23:02 +03:00
|
|
|
##
|
|
|
|
## (5) link settings
|
|
|
|
##
|
|
|
|
TEXTADDR?= c0100000
|
2001-12-09 08:00:40 +03:00
|
|
|
LINKFLAGS_NORMAL= -X
|
1999-01-28 23:04:54 +03:00
|
|
|
.if (${OBJECT_FMT} == "ELF")
|
2001-01-20 04:05:53 +03:00
|
|
|
KERN_LDSCRIPT?= kern.ldscript
|
2001-11-16 03:23:02 +03:00
|
|
|
LINKFORMAT= -T ${I386}/conf/${KERN_LDSCRIPT}
|
1999-01-28 23:04:54 +03:00
|
|
|
.else
|
2001-11-16 03:23:02 +03:00
|
|
|
LINKFORMAT= -z
|
1999-01-28 23:04:54 +03:00
|
|
|
.endif
|
2000-09-07 10:39:36 +04:00
|
|
|
|
2001-11-16 03:23:02 +03:00
|
|
|
##
|
|
|
|
## (6) port specific target dependencies
|
|
|
|
##
|
1996-09-10 01:06:55 +04:00
|
|
|
|
2002-11-24 21:56:01 +03:00
|
|
|
freebsd_sigcode.o ibcs2_sigcode.o linux_sigcode.o: assym.h
|
|
|
|
svr4_sigcode.o mach_sigcode.o: assym.h
|
2003-04-03 02:10:23 +04:00
|
|
|
apmcall.o in_cksum.o pnpbioscall.o bioscall.o: assym.h
|
2003-07-05 20:56:10 +04:00
|
|
|
mptramp.o: assym.h
|
2002-12-12 20:41:19 +03:00
|
|
|
clock.o: config_time.h
|
1995-06-25 00:39:40 +04:00
|
|
|
|
2001-11-16 03:23:02 +03:00
|
|
|
##
|
|
|
|
## (7) misc settings
|
|
|
|
##
|
1994-05-23 14:18:52 +04:00
|
|
|
|
2001-11-16 03:23:02 +03:00
|
|
|
##
|
|
|
|
## (8) config(8) generated machinery
|
|
|
|
##
|
|
|
|
%INCLUDES
|
1994-05-23 14:18:52 +04:00
|
|
|
|
1993-03-21 12:45:37 +03:00
|
|
|
%OBJS
|
|
|
|
|
|
|
|
%CFILES
|
|
|
|
|
1996-02-02 23:08:17 +03:00
|
|
|
%SFILES
|
|
|
|
|
1993-03-21 12:45:37 +03:00
|
|
|
%LOAD
|
|
|
|
|
|
|
|
%RULES
|
2001-11-16 03:23:02 +03:00
|
|
|
|
2004-03-26 02:32:10 +03:00
|
|
|
# XXX - Ugly, but make doesn't easily handle .o.uue (assumes it's a suffix)
|
|
|
|
# XXX - Also, config has no simple was to just add foo.o to the Makefile.
|
|
|
|
# It needs a pathname of some sort for "object"
|
|
|
|
.if !empty(OBJS:M\/athhal-elf.o)
|
|
|
|
OBJS:=${OBJS:C/\/athhal-elf.o/athhal-elf.o/}
|
|
|
|
|
|
|
|
.PATH: $S/../contrib/sys/arch/i386/dev
|
2004-07-15 07:35:20 +04:00
|
|
|
ATH_UUDEC?= @${_MKSHMSG} "uudecode ${.CURDIR:T}/${.TARGET}"; \
|
|
|
|
${_MKSHECHO}\
|
|
|
|
${UUDECODE} -p $> \> ${.TARGET}; \
|
|
|
|
rm -f ${.TARGET}; \
|
|
|
|
${UUDECODE} -p $> > ${.TARGET}
|
|
|
|
athhal-elf.o: athhal-elf-o.uue
|
|
|
|
${ATH_UUDEC}
|
2004-03-26 02:32:10 +03:00
|
|
|
.endif
|
|
|
|
|
2001-11-16 03:23:02 +03:00
|
|
|
##
|
|
|
|
## (9) port independent kernel machinery
|
|
|
|
##
|
|
|
|
.include "$S/conf/Makefile.kern.inc"
|
2004-06-04 08:45:49 +04:00
|
|
|
|
|
|
|
##
|
|
|
|
## (10) Appending make options.
|
|
|
|
##
|
|
|
|
%MAKEOPTIONSAPPEND
|