]> Zhao Yanbai Git Server - minix.git/commitdiff
Make commands cross-compilable
authorDirk Vogt <dirk@minix3.org>
Tue, 1 May 2012 13:13:07 +0000 (15:13 +0200)
committerThomas Veerman <thomas@minix3.org>
Mon, 18 Jun 2012 10:53:23 +0000 (10:53 +0000)
commands/ash/Makefile
commands/ash/mkinit.c
commands/ash/mksyntax.c
commands/awk/Makefile
commands/fsck.mfs/Makefile

index 05ed3bc37e64d5b1b81f7e6eb4a9fa1f2f8001d7..77a288b7cb1f6ca69200af9b9e82544c65a0e231 100644 (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
index 4a3451fd9fad67de309de0004a89a853d75fb0b7..962631fc8d14f9c87d4f2c6969a1deb0c1874d52 100644 (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[])
 {
index 830f11a3de5602d115f09b5d2a24410a5178fc41..40b825052a006c8573dd7b8a0975a9334a9d7e8f 100644 (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)
 {
index 6ceb424174e28347cbe79d933460d37bab4e251a..ea7d01eca92f8562a0a39960a09749881e16302e 100644 (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>
index 7200c69704037978830965fd7e33126d94b9e5a4..8445c72a8de3a27c4c6222db9e4229ce9717fcc7 100644 (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}