1 # $NetBSD: bsd.hostprog.mk,v 1.74 2014/12/01 01:34:30 erh Exp $
2 # @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94
10 LIBATF_C?
= /usr
/lib
/libatf-c.a
11 LIBATF_CXX?
= /usr
/lib
/libatf-c
++.a
12 LIBBLUETOOTH?
= /usr
/lib
/libbluetooth.a
13 LIBBZ2?
= /usr
/lib
/libbz2.a
14 LIBC?
= /usr
/lib
/libc.a
15 LIBC_PIC?
= /usr
/lib
/libc_pic.a
16 LIBC_SO?
= /usr
/lib
/libc.so
17 LIBCOMPAT?
= /usr
/lib
/libcompat.a
18 LIBCRYPT?
= /usr
/lib
/libcrypt.a
19 LIBCURSES?
= /usr
/lib
/libcurses.a
20 LIBDBM?
= /usr
/lib
/libdbm.a
21 LIBDES?
= /usr
/lib
/libdes.a
22 LIBEDIT?
= /usr
/lib
/libedit.a
23 LIBEVENT?
= /usr
/lib
/libevent.a
24 LIBEVENT_OPENSSL?
= /usr
/lib
/libevent_openssl.a
25 LIBEVENT_PTHREADS?
= /usr
/lib
/libevent_pthreads.a
26 LIBEXPAT?
= /usr
/lib
/libexpat.a
27 LIBFETCH?
= /usr
/lib
/libfetch.a
28 LIBFORM?
= /usr
/lib
/libform.a
29 LIBGCC?
= /usr
/lib
/libgcc.a
30 LIBGNUMALLOC?
= /usr
/lib
/libgnumalloc.a
31 LIBINTL?
= /usr
/lib
/libintl.a
32 LIBIPSEC?
= /usr
/lib
/libipsec.a
33 LIBKVM?
= /usr
/lib
/libkvm.a
34 LIBL?
= /usr
/lib
/libl.a
35 LIBLUTOK?
= /usr
/lib
/liblutok.a
36 LIBLZMA?
= /usr
/lib
/liblzma.a
37 LIBM?
= /usr
/lib
/libm.a
38 LIBMAGIC?
= /usr
/lib
/libmagic.a
39 LIBMENU?
= /usr
/lib
/libmenu.a
40 LIBMP?
= /usr
/lib
/libmp.a
41 LIBNTP?
= /usr
/lib
/libntp.a
42 LIBOBJC?
= /usr
/lib
/libobjc.a
43 LIBP2K?
= /usr
/lib
/libp2k.a
44 LIBPC?
= /usr
/lib
/libpc.a
45 LIBPCAP?
= /usr
/lib
/libpcap.a
46 LIBPCI?
= /usr
/lib
/libpci.a
47 LIBPLOT?
= /usr
/lib
/libplot.a
48 LIBPOSIX?
= /usr
/lib
/libposix.a
49 LIBPUFFS?
= /usr
/lib
/libpuffs.a
50 LIBQUOTA?
= /usr
/lib
/libquota.a
51 LIBRESOLV?
= /usr
/lib
/libresolv.a
52 LIBRPCSVC?
= /usr
/lib
/librpcsvc.a
53 LIBRUMP?
= /usr
/lib
/librump.a
54 LIBRUMPCLIENT?
= /usr
/lib
/librumpclient.a
55 LIBRUMPNET?
= /usr
/lib
/librumpnet.a
56 LIBRUMPUSER?
= /usr
/lib
/librumpuser.a
57 LIBRUMPVFS?
= /usr
/lib
/librumpvfs.a
58 LIBSKEY?
= /usr
/lib
/libskey.a
59 LIBSQLITE3?
= /usr
/lib
/libsqlite3.a
60 LIBSSP?
= /usr
/lib
/libssp.a
61 LIBSTDCXX?
= /usr
/lib
/libstdc
++.a
62 LIBSUPCXX?
= /usr
/lib
/libsupc
++.a
63 LIBTERMINFO?
= /usr
/lib
/libterminfo.a
64 LIBUTIL?
= /usr
/lib
/libutil.a
65 LIBWRAP?
= /usr
/lib
/libwrap.a
66 LIBUKFS?
= /usr
/lib
/libukfs.a
67 LIBY?
= /usr
/lib
/liby.a
68 LIBZ?
= /usr
/lib
/libz.a
70 ##### rump file system modules
71 LIBRUMPFS_CD9660FS?
= /usr
/lib
/librumpfs_cd9660fs.a
72 LIBRUMPFS_EFS?
= /usr
/lib
/librumpfs_efs.a
73 LIBRUMPFS_EXT2FS?
= /usr
/lib
/librumpfs_ext2fs.a
74 LIBRUMPFS_FFS?
= /usr
/lib
/librumpfs_ffs.a
75 LIBRUMPFS_HFS?
= /usr
/lib
/librumpfs_hfs.a
76 LIBRUMPFS_LFS?
= /usr
/lib
/librumpfs_lfs.a
77 LIBRUMPFS_MSDOSFS?
= /usr
/lib
/librumpfs_msdosfs.a
78 LIBRUMPFS_NTFS?
= /usr
/lib
/librumpfs_ntfs.a
79 LIBRUMPFS_SYSPUFFS?
= /usr
/lib
/librumpfs_syspuffs.a
80 LIBRUMPFS_TMPFS?
= /usr
/lib
/librumpfs_tmpfs.a
81 LIBRUMPFS_UDF?
= /usr
/lib
/librumpfs_udf.a
82 LIBRUMPFS_UFS?
= /usr
/lib
/librumpfs_ufs.a
84 MKDEP_SUFFIXES?
= .lo .ln .d
87 INSTALL
:= ${INSTALL
:NSTRIP
=*}
89 MKDEPCXX
:= ${HOST_MKDEPCXX}
91 .if
${TOOLCHAIN_MISSING} == "no" || defined
(EXTERNAL_TOOLCHAIN
)
96 .if defined
(HOSTPROG_CXX
)
97 HOSTPROG
= ${HOSTPROG_CXX}
100 .if defined
(HOSTPROG
)
103 _YHPSRCS
= ${SRCS
:M
*.
[ly
]:C
/\..
$/.c
/} ${YHEADER
:D
${SRCS
:M
*.y
:.y
=.h
}}
105 CLEANFILES
+= ${_YHPSRCS}
107 .if
!empty
(SRCS
:N
*.h
:N
*.sh
)
108 OBJS
+= ${SRCS
:N
*.h
:N
*.sh
:R
:S
/$/.lo
/g
}
109 LOBJS
+= ${LSRCS
:.c
=.ln
} ${SRCS
:M
*.c
:.c
=.ln
}
112 .if defined
(OBJS
) && !empty
(OBJS
)
113 .NOPATH
: ${OBJS} ${HOSTPROG} ${_YHPSRCS}
115 ${OBJS} ${LOBJS}: ${DPSRCS}
116 ${HOSTPROG}: ${OBJS} ${DPADD}
118 ${HOST_LINK.c
} ${HOST_LDSTATIC} -o
${.TARGET
} ${OBJS} ${LDADD}
119 .if
!empty
(.MAKE.OS
:M
*CYGWIN
*)
120 ${HOST_SH} ${NETBSDSRCDIR}/tools
/binstall
/mkmanifest
${HOSTPROG}
124 .
endif # defined(OBJS) && !empty(OBJS)
128 .
endif # !defined(MAN)
129 .
endif # defined(HOSTPROG)
133 CLEANFILES
+= a.out
[Ee
]rrs mklog core
*.core
${HOSTPROG} ${OBJS} ${LOBJS}
136 CFLAGS
:= ${HOST_CFLAGS}
137 CPPFLAGS
:= ${HOST_CPPFLAGS
:N-Wp
,-iremap
,*}
140 .if defined
(LOBJS
) && !empty
(LOBJS
)
141 ${LINT} ${LINTFLAGS} ${LDFLAGS
:C
/-L
[ ]*/-L
/Wg
:M-L
*} ${LOBJS} ${LDADD}
144 ##### Pull in related .mk logic
145 LINKSMODE?
= ${BINMODE}
146 .
include <bsd.man.mk
>
147 .
include <bsd.nls.mk
>
148 .
include <bsd.files.mk
>
149 .
include <bsd.inc.mk
>
150 .
include <bsd.links.mk
>
151 .
include <bsd.dep.mk
>
152 .
include <bsd.
clean.mk
>
154 ${TARGETS}: # ensure existence
156 # Override YACC/LEX rules so nbtool_config.h can be forced as the 1st include
159 ${LEX.l
} -o
${.TARGET
} ${.IMPSRC
}
160 echo
'#if HAVE_NBTOOL_CONFIG_H' > ${.TARGET
}.1
161 echo
'#include "nbtool_config.h"' >> ${.TARGET
}.1
162 echo
'#endif' >> ${.TARGET
}.1
163 cat
${.TARGET
} >> ${.TARGET
}.1
164 mv
${.TARGET
}.1 ${.TARGET
}
167 ${YACC.y
} -o
${.TARGET
} ${.IMPSRC
}
168 echo
'#if HAVE_NBTOOL_CONFIG_H' > ${.TARGET
}.1
169 echo
'#include "nbtool_config.h"' >> ${.TARGET
}.1
170 echo
'#endif' >> ${.TARGET
}.1
171 cat
${.TARGET
} >> ${.TARGET
}.1
172 mv
${.TARGET
}.1 ${.TARGET
}