Make commands cross-compilable

This commit is contained in:
Dirk Vogt 2012-05-01 15:13:07 +02:00 committed by Thomas Veerman
parent 207e4d2a71
commit 25ae53b165
5 changed files with 24 additions and 7 deletions

View file

@ -56,10 +56,15 @@ init.c: mkinit alias.c eval.c exec.c input.c jobs.c options.c parser.c \
redir.c trap.c var.c
./mkinit ${.ALLSRC:S/^mkinit$//}
mkinit: mkinit.o
mknodes: mknodes.o
mksyntax: mksyntax.o
mksignames: mksignames.o
mkinit: mkinit.lo
${HOST_LINK.c} mkinit.lo -o $@
mknodes: mknodes.lo
${HOST_LINK.c} mknodes.lo -o $@
mksyntax: mksyntax.lo
${HOST_LINK.c} mksyntax.lo -o $@
mksignames: mksignames.lo
${HOST_LINK.c} mksignames.lo -o $@
.ORDER: nodes.c nodes.h
nodes.c nodes.h: mknodes nodetypes nodes.c.pat

View file

@ -165,6 +165,10 @@ static void error(char *);
#define equal(s1, s2) (strcmp(s1, s2) == 0)
#ifndef __unused
#define __unused __attribute__((__unused__))
#endif
int
main(int argc __unused, char *argv[])
{

View file

@ -115,6 +115,10 @@ static void print(char *);
static void output_type_macros(void);
static void digit_convert(void);
#ifndef __unused
#define __unused __attribute__((__unused__))
#endif
int
main(int argc __unused, char **argv __unused)
{

View file

@ -14,8 +14,12 @@ build-tools: maketab
proctab.c: maketab
./maketab > proctab.c
maketab: awkgram.h maketab.c
maketab.lo: awkgram.h
CLEANFILES= maketab proctab.c
maketab: maketab.lo
${HOST_LINK.c} maketab.lo -o $@
CLEANFILES= maketab proctab.c maketab.lo
.include <bsd.prog.mk>

View file

@ -1,4 +1,4 @@
FSCK= ${NETBSDSRCDIR}/sbin/fsck
FSCK= ${MINIXSRCDIR}/sbin/fsck
PROG= fsck.mfs
SRCS= fsck.c
CPPFLAGS+= -I${MINIXSRCDIR}/servers -I${FSCK}