2022-04-15 16:44:57 +03:00
|
|
|
# $NetBSD: Makefile.boot,v 1.25 2022/04/15 13:44:57 rillig Exp $
|
1996-08-30 21:59:37 +04:00
|
|
|
#
|
2020-08-09 18:54:13 +03:00
|
|
|
# A very simple makefile...
|
1994-04-17 07:09:49 +04:00
|
|
|
#
|
|
|
|
# You only want to use this if you aren't running NetBSD.
|
|
|
|
#
|
2020-08-09 18:54:13 +03:00
|
|
|
# Modify MACHINE and MACHINE_ARCH as appropriate for your target architecture.
|
2022-04-15 16:44:57 +03:00
|
|
|
# Add the following definitions to EXTRA_CFLAGS as necessary:
|
1994-04-17 07:09:49 +04:00
|
|
|
#
|
2022-04-15 16:44:57 +03:00
|
|
|
# -DHAVE_SETENV
|
|
|
|
# -DHAVE_SETPGID
|
|
|
|
# -DHAVE_SETRLIMIT
|
|
|
|
# -DHAVE_STRERROR
|
|
|
|
# -DHAVE_STRSEP
|
|
|
|
# -DHAVE_VSNPRINTF
|
|
|
|
# -DUSE_SELECT
|
2020-08-09 18:54:13 +03:00
|
|
|
|
|
|
|
PROG= bmake
|
|
|
|
MACHINE= i386
|
|
|
|
MACHINE_ARCH= i386
|
|
|
|
CC= gcc
|
|
|
|
CFLAGS= -O -g
|
|
|
|
EXTRA_CFLAGS=
|
|
|
|
EXTRA_LIBS=
|
|
|
|
|
2021-12-12 14:02:23 +03:00
|
|
|
OBJS= arch.o buf.o compat.o cond.o dir.o for.o hash.o \
|
2020-08-09 18:54:13 +03:00
|
|
|
job.o lst.o main.o make.o make_malloc.o metachar.o parse.o \
|
2020-10-25 16:25:19 +03:00
|
|
|
str.o suff.o targ.o trace.o var.o util.o
|
1996-12-31 20:52:23 +03:00
|
|
|
|
|
|
|
.c.o:
|
2020-08-09 18:54:13 +03:00
|
|
|
${CC} ${CPPFLAGS} ${CFLAGS} ${EXTRA_CFLAGS} -c $< -o $@
|
1996-12-31 20:52:23 +03:00
|
|
|
|
2020-08-09 18:54:13 +03:00
|
|
|
CPPFLAGS= \
|
|
|
|
-DTARGET_MACHINE=\"${MACHINE}\" \
|
1999-04-03 08:39:10 +04:00
|
|
|
-DTARGET_MACHINE_ARCH=\"${MACHINE_ARCH}\" \
|
2004-05-07 04:04:38 +04:00
|
|
|
-DMAKE_MACHINE=\"${MACHINE}\"
|
1996-08-13 20:40:31 +04:00
|
|
|
|
2020-08-09 18:54:13 +03:00
|
|
|
${PROG}: ${OBJS}
|
|
|
|
# @echo 'make of ${PROG} and make.0 started.'
|
|
|
|
${CC} ${CFLAGS} ${OBJS} -o $@ ${EXTRA_LIBS}
|
1996-08-13 20:40:31 +04:00
|
|
|
@ls -l $@
|
1994-03-05 03:34:29 +03:00
|
|
|
# nroff -h -man make.1 > make.0
|
2020-08-09 18:54:13 +03:00
|
|
|
# @echo 'make of ${PROG} and make.0 completed.'
|
1996-08-13 20:40:31 +04:00
|
|
|
|
|
|
|
clean:
|
2020-08-09 18:54:13 +03:00
|
|
|
rm -f ${OBJS} ${PROG}
|