libexec exec fix
[minix.git] / usr.bin / make / Makefile.bak
blobfe2f613632e046199ba8536518ed76c439c476c2
1 #       $NetBSD: Makefile,v 1.55 2011/08/14 13:06:09 christos Exp $
2 #       @(#)Makefile    5.2 (Berkeley) 12/28/90
4 PROG=   make
5 SRCS=   arch.c buf.c compat.c cond.c dir.c for.c hash.c job.c main.c \
6         make.c parse.c str.c suff.c targ.c trace.c var.c util.c 
7 SRCS+=  strlist.c
8 SRCS+=  make_malloc.c
9 SRCS+=  lstAppend.c lstAtEnd.c lstAtFront.c lstClose.c lstConcat.c \
10         lstDatum.c lstDeQueue.c lstDestroy.c lstDupl.c lstEnQueue.c \
11         lstFind.c lstFindFrom.c lstFirst.c lstForEach.c lstForEachFrom.c \
12         lstInit.c lstInsert.c lstIsAtEnd.c lstIsEmpty.c lstLast.c \
13         lstMember.c lstNext.c lstOpen.c lstRemove.c lstReplace.c lstSucc.c
14 SRCS += lstPrev.c
16 # let people experiment for a bit
17 USE_META ?= no
18 .if ${USE_META:tl} != "no"
19 SRCS+=  meta.c
20 CPPFLAGS+= -DUSE_META
21 FILEMON_H ?= ${.CURDIR:H:H}/sys/dev/filemon/filemon.h
22 .if exists(${FILEMON_H}) && ${FILEMON_H:T} == "filemon.h"
23 COPTS.meta.c += -DHAVE_FILEMON_H -I${FILEMON_H:H}
24 .endif
25 .endif
27 # For MINIX
28 CPPFLAGS+=      -DHAVE_SETENV -DHAVE_STRERROR -DHAVE_STRDUP \
29                 -DHAVE_STRFTIME -DHAVE_VSNPRINTF -DUSE_SELECT
31 # Gross hack, but we assume i386 everywhere
32 .if ${MACHINE_ARCH} == "i686"
33 MACHINE_ARCH=i386
34 .endif
35 .if $(MACHINE) == "i686"
36 MACHINE=i386
37 .endif
38 CPPFLAGS+= -DTARGET_MACHINE=\"${MACHINE}\" \
39                 -DTARGET_MACHINE_ARCH=\"${MACHINE_ARCH}\" \
40                 -DMAKE_MACHINE=\"${MACHINE}\" \
41                 -DMAKE_MACHINE_ARCH=\"${MACHINE_ARCH}\"
44 .PATH:  ${.CURDIR}/lst.lib
45 .if make(install)
46 SUBDIR= PSD.doc
47 .endif
48 .if make(obj) || make(clean)
49 SUBDIR+= unit-tests
50 .endif
52 .include <bsd.prog.mk>
53 .include <bsd.subdir.mk>
55 .ifdef TOOLDIR
56 CPPFLAGS+= -DMAKE_NATIVE
57 COPTS.var.c += -Wno-cast-qual
58 COPTS.job.c += -Wno-format-nonliteral
59 COPTS.parse.c += -Wno-format-nonliteral
60 COPTS.var.c += -Wno-format-nonliteral
62 # this is a native netbsd build, 
63 # use libutil rather than the local emalloc etc.
64 CPPFLAGS+= -DUSE_EMALLOC
65 LDADD+=-lutil
66 DPADD+=${LIBUTIL}
67 .endif
69 # A simple unit-test driver to help catch regressions
70 accept test:
71         cd ${.CURDIR}/unit-tests && ${.MAKE} -r -m / TEST_MAKE=${TEST_MAKE:U${.OBJDIR}/${PROG:T}} ${.TARGET}