BSD 4_3_Net_2 release
[unix-history] / usr / src / usr.sbin / config / mkmakefile.c
index 19600ee..304120a 100644 (file)
@@ -2,23 +2,37 @@
  * Copyright (c) 1980,1990 Regents of the University of California.
  * All rights reserved.
  *
  * Copyright (c) 1980,1990 Regents of the University of California.
  * All rights reserved.
  *
- * Redistribution and use in source and binary forms are permitted provided
- * that: (1) source distributions retain this entire copyright notice and
- * comment, and (2) distributions including binaries display the following
- * acknowledgement:  ``This product includes software developed by the
- * University of California, Berkeley and its contributors'' in the
- * documentation or other materials provided with the distribution and in
- * all advertising materials mentioning features or use of this software.
- * Neither the name of the University nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *     This product includes software developed by the University of
+ *     California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)mkmakefile.c       5.28 (Berkeley) 6/1/90";
+static char sccsid[] = "@(#)mkmakefile.c       5.33 (Berkeley) 7/1/91";
 #endif /* not lint */
 
 /*
 #endif /* not lint */
 
 /*
@@ -31,7 +45,6 @@ static char sccsid[] = "@(#)mkmakefile.c      5.28 (Berkeley) 6/1/90";
 #include <ctype.h>
 #include "y.tab.h"
 #include "config.h"
 #include <ctype.h>
 #include "y.tab.h"
 #include "config.h"
-#include "pathnames.h"
 
 #define next_word(fp, wd) \
        { register char *word = get_word(fp); \
 
 #define next_word(fp, wd) \
        { register char *word = get_word(fp); \
@@ -40,6 +53,13 @@ static char sccsid[] = "@(#)mkmakefile.c     5.28 (Berkeley) 6/1/90";
          else \
                wd = word; \
        }
          else \
                wd = word; \
        }
+#define next_quoted_word(fp, wd) \
+       { register char *word = get_quoted_word(fp); \
+         if (word == (char *)EOF) \
+               return; \
+         else \
+               wd = word; \
+       }
 
 static struct file_list *fcur;
 char *tail();
 
 static struct file_list *fcur;
 char *tail();
@@ -85,10 +105,7 @@ new_fent()
        register struct file_list *fp;
 
        fp = (struct file_list *) malloc(sizeof *fp);
        register struct file_list *fp;
 
        fp = (struct file_list *) malloc(sizeof *fp);
-       fp->f_needs = 0;
-       fp->f_next = 0;
-       fp->f_flags = 0;
-       fp->f_type = 0;
+       bzero(fp, sizeof *fp);
        if (fcur == 0)
                fcur = ftab = fp;
        else
        if (fcur == 0)
                fcur = ftab = fp;
        else
@@ -97,7 +114,6 @@ new_fent()
        return (fp);
 }
 
        return (fp);
 }
 
-char   *COPTS;
 static struct users {
        int     u_default;
        int     u_min;
 static struct users {
        int     u_default;
        int     u_min;
@@ -106,6 +122,7 @@ static      struct users {
        { 24, 8, 1024 },                /* MACHINE_VAX */
        { 4, 2, 128 },                  /* MACHINE_TAHOE */
        { 8, 2, 64 },                   /* MACHINE_HP300 */
        { 24, 8, 1024 },                /* MACHINE_VAX */
        { 4, 2, 128 },                  /* MACHINE_TAHOE */
        { 8, 2, 64 },                   /* MACHINE_HP300 */
+       { 8, 2, 64 },                   /* MACHINE_I386 */
 };
 #define        NUSERS  (sizeof (users) / sizeof (users[0]))
 
 };
 #define        NUSERS  (sizeof (users) / sizeof (users[0]))
 
@@ -120,7 +137,7 @@ makefile()
        struct users *up;
 
        read_files();
        struct users *up;
 
        read_files();
-       strcpy(line, "../conf/Makefile.");
+       strcpy(line, "Makefile.");
        (void) strcat(line, machinename);
        ifp = fopen(line, "r");
        if (ifp == 0) {
        (void) strcat(line, machinename);
        ifp = fopen(line, "r");
        if (ifp == 0) {
@@ -165,43 +182,18 @@ makefile()
        } else if (maxusers > up->u_max)
                printf("warning: maxusers > %d (%d)\n", up->u_max, maxusers);
        fprintf(ofp, "PARAM=-DTIMEZONE=%d -DDST=%d -DMAXUSERS=%d\n",
        } else if (maxusers > up->u_max)
                printf("warning: maxusers > %d (%d)\n", up->u_max, maxusers);
        fprintf(ofp, "PARAM=-DTIMEZONE=%d -DDST=%d -DMAXUSERS=%d\n",
-           timezone, dst, maxusers);
+           zone, dst, maxusers);
        for (op = mkopt; op; op = op->op_next)
                fprintf(ofp, "%s=%s\n", op->op_name, op->op_value);
        for (op = mkopt; op; op = op->op_next)
                fprintf(ofp, "%s=%s\n", op->op_name, op->op_value);
+       if (debugging)
+               fprintf(ofp, "DEBUG=-g\n");
+       if (profiling)
+               fprintf(ofp, "PROF=-pg\n");
        while (fgets(line, BUFSIZ, ifp) != 0) {
        while (fgets(line, BUFSIZ, ifp) != 0) {
-               if (*line == '%')
-                       goto percent;
-               if ((debugging || profiling) &&
-                   strncmp(line, "COPTS=", 6) == 0) {
-                       register char *cp;
-
-                       cp = index(line, '\n');
-                       if (cp)
-                               *cp = 0;
-                       if (profiling) {
-                               cp = line + 6;
-                               while (*cp && (*cp == ' ' || *cp == '\t'))
-                                       cp++;
-                               COPTS = malloc((unsigned)(strlen(cp) + 1));
-                               if (COPTS == 0) {
-                                       printf("config: out of memory\n");
-                                       exit(1);
-                               }
-                               strcpy(COPTS, cp);
-                       }
+               if (*line != '%') {
                        fprintf(ofp, "%s", line);
                        fprintf(ofp, "%s", line);
-                       if (debugging)
-                               fprintf(ofp, " -g");
-                       if (profiling) {
-                               fprintf(ofp, " -pg\n");
-                               fprintf(ofp, _PATH_GPROF, machinename);
-                       } else
-                               fprintf(ofp, "\n");
                        continue;
                }
                        continue;
                }
-               fprintf(ofp, "%s", line);
-               continue;
-       percent:
                if (eq(line, "%OBJS\n"))
                        do_objs(ofp);
                else if (eq(line, "%CFILES\n"))
                if (eq(line, "%OBJS\n"))
                        do_objs(ofp);
                else if (eq(line, "%CFILES\n"))
@@ -230,12 +222,12 @@ read_files()
        register struct device *dp;
        struct device *save_dp;
        register struct opt *op;
        register struct device *dp;
        struct device *save_dp;
        register struct opt *op;
-       char *wd, *this, *needs, *devorprof;
+       char *wd, *this, *needs, *special;
        char fname[32];
        char fname[32];
-       int nreqs, first = 1, configdep, isdup, std;
+       int nreqs, first = 1, configdep, isdup, std, filetype;
 
        ftab = 0;
 
        ftab = 0;
-       (void) strcpy(fname, "files");
+       (void) strcpy(fname, "../../conf/files");
 openit:
        fp = fopen(fname, "r");
        if (fp == 0) {
 openit:
        fp = fopen(fname, "r");
        if (fp == 0) {
@@ -246,6 +238,7 @@ next:
        /*
         * filename     [ standard | optional ] [ config-dependent ]
         *      [ dev* | profiling-routine ] [ device-driver]
        /*
         * filename     [ standard | optional ] [ config-dependent ]
         *      [ dev* | profiling-routine ] [ device-driver]
+        *      [ compile-with "compile rule" ]
         */
        wd = get_word(fp);
        if (wd == (char *)EOF) {
         */
        wd = get_word(fp);
        if (wd == (char *)EOF) {
@@ -282,10 +275,11 @@ next:
                printf("%s: Local file %s overrides %s.\n",
                    fname, this, tp->f_fn);
        nreqs = 0;
                printf("%s: Local file %s overrides %s.\n",
                    fname, this, tp->f_fn);
        nreqs = 0;
-       devorprof = "";
+       special = 0;
        configdep = 0;
        needs = 0;
        std = 0;
        configdep = 0;
        needs = 0;
        std = 0;
+       filetype = NORMAL;
        if (eq(wd, "standard"))
                std = 1;
        else if (!eq(wd, "optional")) {
        if (eq(wd, "standard"))
                std = 1;
        else if (!eq(wd, "optional")) {
@@ -300,20 +294,33 @@ nextparam:
                configdep++;
                goto nextparam;
        }
                configdep++;
                goto nextparam;
        }
-       devorprof = wd;
-       if (eq(wd, "device-driver") || eq(wd, "profiling-routine")) {
-               next_word(fp, wd);
-               goto save;
+       if (eq(wd, "compile-with")) {
+               next_quoted_word(fp, wd);
+               if (wd == 0) {
+                       printf("%s: %s missing compile command string.\n",
+                              fname);
+                       exit(1);
+               }
+               special = ns(wd);
+               goto nextparam;
        }
        nreqs++;
        }
        nreqs++;
+       if (eq(wd, "device-driver")) {
+               filetype = DRIVER;
+               goto nextparam;
+       }
+       if (eq(wd, "profiling-routine")) {
+               filetype = PROFILING;
+               goto nextparam;
+       }
        if (needs == 0 && nreqs == 1)
                needs = ns(wd);
        if (isdup)
                goto invis;
        for (dp = dtab; dp != 0; save_dp = dp, dp = dp->d_next)
                if (eq(dp->d_name, wd)) {
        if (needs == 0 && nreqs == 1)
                needs = ns(wd);
        if (isdup)
                goto invis;
        for (dp = dtab; dp != 0; save_dp = dp, dp = dp->d_next)
                if (eq(dp->d_name, wd)) {
-                       if (std &&
-                           dp->d_type == PSEUDO_DEVICE && dp->d_slave <= 0)
+                       if (std && dp->d_type == PSEUDO_DEVICE &&
+                           dp->d_slave <= 0)
                                dp->d_slave = 1;
                        goto nextparam;
                }
                                dp->d_slave = 1;
                        goto nextparam;
                }
@@ -343,6 +350,7 @@ invis:
        tp->f_type = INVISIBLE;
        tp->f_needs = needs;
        tp->f_flags = isdup;
        tp->f_type = INVISIBLE;
        tp->f_needs = needs;
        tp->f_flags = isdup;
+       tp->f_special = special;
        goto next;
 
 doneparam:
        goto next;
 
 doneparam:
@@ -358,21 +366,17 @@ save:
                    fname, this);
                exit(1);
        }
                    fname, this);
                exit(1);
        }
-       if (eq(devorprof, "profiling-routine") && profiling == 0)
+       if (filetype == PROFILING && profiling == 0)
                goto next;
        if (tp == 0)
                tp = new_fent();
        tp->f_fn = this;
                goto next;
        if (tp == 0)
                tp = new_fent();
        tp->f_fn = this;
-       if (eq(devorprof, "device-driver"))
-               tp->f_type = DRIVER;
-       else if (eq(devorprof, "profiling-routine"))
-               tp->f_type = PROFILING;
-       else
-               tp->f_type = NORMAL;
+       tp->f_type = filetype;
        tp->f_flags = 0;
        if (configdep)
                tp->f_flags |= CONFIGDEP;
        tp->f_needs = needs;
        tp->f_flags = 0;
        if (configdep)
                tp->f_flags |= CONFIGDEP;
        tp->f_needs = needs;
+       tp->f_special = special;
        if (pf && pf->f_type == INVISIBLE)
                pf->f_flags = 1;                /* mark as duplicate */
        goto next;
        if (pf && pf->f_type == INVISIBLE)
                pf->f_flags = 1;                /* mark as duplicate */
        goto next;
@@ -451,7 +455,7 @@ do_cfiles(fp)
                                lpos = 8;
                                fputs("\\\n\t", fp);
                        }
                                lpos = 8;
                                fputs("\\\n\t", fp);
                        }
-                       fprintf(fp, "../%s ", tp->f_fn);
+                       fprintf(fp, "$S/%s ", tp->f_fn);
                        lpos += len + 1;
                }
        for (fl = conf_list; fl; fl = fl->f_next)
                        lpos += len + 1;
                }
        for (fl = conf_list; fl; fl = fl->f_next)
@@ -462,7 +466,8 @@ do_cfiles(fp)
                                fputs("\\\n\t", fp);
                        }
                        if (eq(fl->f_fn, "generic"))
                                fputs("\\\n\t", fp);
                        }
                        if (eq(fl->f_fn, "generic"))
-                               fprintf(fp, "../%s/%s ", machinename, swapname);
+                               fprintf(fp, "$S/%s/%s/%s ",
+                                   machinename, machinename, swapname);
                        else
                                fprintf(fp, "%s ", swapname);
                        lpos += len + 1;
                        else
                                fprintf(fp, "%s ", swapname);
                        lpos += len + 1;
@@ -495,114 +500,52 @@ do_rules(f)
 {
        register char *cp, *np, och, *tp;
        register struct file_list *ftp;
 {
        register char *cp, *np, och, *tp;
        register struct file_list *ftp;
-       char *extras;
-
-for (ftp = ftab; ftp != 0; ftp = ftp->f_next) {
-       if (ftp->f_type == INVISIBLE)
-               continue;
-       cp = (np = ftp->f_fn) + strlen(ftp->f_fn) - 1;
-       och = *cp;
-       *cp = '\0';
-       if (och == 'o') {
-               fprintf(f, "%so:\n\t-cp ../%so .\n\n", tail(np), np);
-               continue;
-       }
-       fprintf(f, "%so: ../%s%c\n", tail(np), np, och);
-       tp = tail(np);
-       if (och == 's') {
-               fprintf(f, "\t-ln -s ../%ss %sc\n", np, tp);
-               fprintf(f, "\t${CC} -E ${COPTS} %sc | ${AS} -o %so\n",
-                       tp, tp);
-               fprintf(f, "\trm -f %sc\n\n", tp);
-               continue;
-       }
-       if (ftp->f_flags & CONFIGDEP)
-               extras = "${PARAM} ";
-       else
-               extras = "";
-       switch (ftp->f_type) {
-
-       case NORMAL:
-               switch (machine) {
-
-               case MACHINE_VAX:
-               case MACHINE_TAHOE:
-                       fprintf(f, "\t${CC} -c -S ${COPTS} %s../%sc\n",
-                               extras, np);
-                       fprintf(f, "\t${C2} %ss | ${INLINE} | ${AS} -o %so\n",
-                           tp, tp);
-                       fprintf(f, "\trm -f %ss\n\n", tp);
-                       break;
-
-               case MACHINE_HP300:
-                       fprintf(f, "\t${CC} -c ${CFLAGS} %s../%sc\n\n",
-                               extras, np);
-                       break;
-               }
-               break;
-
-       case DRIVER:
-               switch (machine) {
-
-               case MACHINE_VAX:
-               case MACHINE_TAHOE:
-                       fprintf(f, "\t${CC} -c -S ${COPTS} %s../%sc\n",
-                               extras, np);
-                       fprintf(f,"\t${C2} -i %ss | ${INLINE} | ${AS} -o %so\n",
-                           tp, tp);
-                       fprintf(f, "\trm -f %ss\n\n", tp);
-                       break;
-
-               case MACHINE_HP300:
-                       fprintf(f, "\t${CC} -c ${CFLAGS} %s../%sc\n\n",
-                               extras, np);
-                       break;
-               }
-               break;
+       char *special;
 
 
-       case PROFILING:
-               if (!profiling)
+       for (ftp = ftab; ftp != 0; ftp = ftp->f_next) {
+               if (ftp->f_type == INVISIBLE)
+                       continue;
+               cp = (np = ftp->f_fn) + strlen(ftp->f_fn) - 1;
+               och = *cp;
+               *cp = '\0';
+               if (och == 'o') {
+                       fprintf(f, "%so:\n\t-cp $S/%so .\n\n", tail(np), np);
                        continue;
                        continue;
-               if (COPTS == 0) {
-                       fprintf(stderr,
-                           "config: COPTS undefined in generic makefile");
-                       COPTS = "";
                }
                }
-               switch (machine) {
-
-               case MACHINE_TAHOE:
-                       fprintf(f, "\t${CC} -c -S %s %s../%sc\n",
-                               COPTS, extras, np);
-                       fprintf(f, "\tex - %ss < ${GPROF.EX}\n", tp);
-                       fprintf(f,"\t${C2} %ss | ${INLINE} | ${AS} -o %so\n",
-                           tp, tp);
-                       fprintf(f, "\trm -f %ss\n\n", tp);
-                       break;
-
-               case MACHINE_VAX:
-                       fprintf(f, "\t${CC} -c -S %s %s../%sc\n",
-                               COPTS, extras, np);
-                       fprintf(f, "\tex - %ss < ${GPROF.EX}\n", tp);
-                       fprintf(f, "\t${INLINE} %ss | ${AS} -o %so\n", tp, tp);
-                       fprintf(f, "\trm -f %ss\n\n", tp);
-                       break;
-
-               case MACHINE_HP300:
-                       fprintf(f, "\t${CC} -c -S %s %s../%sc\n",
-                               COPTS, extras, np);
-                       fprintf(f, "\tex - %ss < ${GPROF.EX}\n", tp);
-                       fprintf(f, "\t${AS} -o %so %ss\n", tp, tp);
-                       fprintf(f, "\trm -f %ss\n\n", tp);
-                       break;
+               fprintf(f, "%so: $S/%s%c\n", tail(np), np, och);
+               tp = tail(np);
+               special = ftp->f_special;
+               if (special == 0) {
+                       char *ftype;
+                       static char cmd[128];
+
+                       switch (ftp->f_type) {
+
+                       case NORMAL:
+                               ftype = "NORMAL";
+                               break;
+
+                       case DRIVER:
+                               ftype = "DRIVER";
+                               break;
+
+                       case PROFILING:
+                               if (!profiling)
+                                       continue;
+                               ftype = "PROFILE";
+                               break;
+
+                       default:
+                               printf("config: don't know rules for %s\n", np);
+                               break;
+                       }
+                       (void)sprintf(cmd, "${%s_%c%s}", ftype, toupper(och),
+                                     ftp->f_flags & CONFIGDEP? "_C" : "");
+                       special = cmd;
                }
                }
-               break;
-
-       default:
-               printf("Don't know rules for %s\n", np);
-               break;
+               *cp = och;
+               fprintf(f, "\t%s\n\n", special);
        }
        }
-       *cp = och;
-}
 }
 
 /*
 }
 
 /*
@@ -632,46 +575,12 @@ do_systemspec(f, fl, first)
        int first;
 {
 
        int first;
 {
 
-       fprintf(f, "%s: Makefile machine/symbols.sort", fl->f_needs);
-       if (machine == MACHINE_VAX)
-               fprintf(f, " ${INLINECMD} locore.o emulate.o");
-       else if (machine == MACHINE_TAHOE)
-               fprintf(f, " ${INLINE} locore.o");
-       else
-               fprintf(f, " locore.o");
-       fprintf(f, " ${OBJS} param.o ioconf.o swap%s.o\n", fl->f_fn);
-       fprintf(f, "\t@echo loading %s\n\t@rm -f %s\n",
-           fl->f_needs, fl->f_needs);
-       if (first) {
-               fprintf(f, "\t@sh ../conf/newvers.sh\n");
-               fprintf(f, "\t@${CC} ${CFLAGS} -c vers.c\n");
-       }
-       switch (machine) {
-
-       case MACHINE_VAX:
-               fprintf(f, "\t@${LD} -n -o %s -e start -%c -T 80000000 ",
-                       fl->f_needs, debugging ? 'X' : 'x');
-               fprintf(f,
-                   "locore.o emulate.o ${OBJS} vers.o ioconf.o param.o ");
-               break;
-
-       case MACHINE_TAHOE:
-               fprintf(f, "\t@${LD} -n -o %s -e start -%c -T C0000800 ",
-                       fl->f_needs, debugging ? 'X' : 'x');
-               fprintf(f, "locore.o ${OBJS} vers.o ioconf.o param.o ");
-               break;
-
-       case MACHINE_HP300:
-               fprintf(f, "\t@${LD} -n -o %s -e start -%c ",
-                       fl->f_needs, debugging ? 'X' : 'x');
-               fprintf(f, "locore.o ${OBJS} vers.o ioconf.o param.o ");
-               break;
-       }
-       fprintf(f, "swap%s.o\n", fl->f_fn);
-       fprintf(f, "\t@echo rearranging symbols\n");
-       fprintf(f, "\t@-symorder machine/symbols.sort %s\n", fl->f_needs);
-       fprintf(f, "\t@size %s\n", fl->f_needs);
-       fprintf(f, "\t@chmod 755 %s\n\n", fl->f_needs);
+       fprintf(f, "%s: ${SYSTEM_DEP} swap%s.o", fl->f_needs, fl->f_fn);
+       if (first)
+               fprintf(f, " newvers");
+       fprintf(f, "\n\t${SYSTEM_LD_HEAD}\n");
+       fprintf(f, "\t${SYSTEM_LD} swap%s.o\n", fl->f_fn);
+       fprintf(f, "\t${SYSTEM_LD_TAIL}\n\n");
        do_swapspec(f, fl->f_fn);
        for (fl = fl->f_next; fl->f_type == SWAPSPEC; fl = fl->f_next)
                ;
        do_swapspec(f, fl->f_fn);
        for (fl = fl->f_next; fl->f_type == SWAPSPEC; fl = fl->f_next)
                ;
@@ -683,28 +592,12 @@ do_swapspec(f, name)
        register char *name;
 {
 
        register char *name;
 {
 
-       if (!eq(name, "generic")) {
+       if (!eq(name, "generic"))
                fprintf(f, "swap%s.o: swap%s.c\n", name, name);
                fprintf(f, "swap%s.o: swap%s.c\n", name, name);
-               fprintf(f, "\t${CC} -c -O ${COPTS} swap%s.c\n\n", name);
-               return;
-       }
-       fprintf(f, "swapgeneric.o: ../%s/swapgeneric.c\n", machinename);
-       switch (machine) {
-
-       case MACHINE_VAX:
-       case MACHINE_TAHOE:
-               fprintf(f, "\t${CC} -c -S ${COPTS} ");
-               fprintf(f, "../%s/swapgeneric.c\n", machinename);
-               fprintf(f, "\t${C2} swapgeneric.s | ${INLINE}");
-               fprintf(f, " | ${AS} -o swapgeneric.o\n");
-               fprintf(f, "\trm -f swapgeneric.s\n\n");
-               break;
-
-       case MACHINE_HP300:
-               fprintf(f, "\t${CC} -c ${CFLAGS} ");
-               fprintf(f, "../%s/swapgeneric.c\n\n", machinename);
-               break;
-       }
+       else
+               fprintf(f, "swapgeneric.o: ../%s/swapgeneric.c\n",
+                       machinename);
+       fprintf(f, "\t${NORMAL_C}\n\n");
 }
 
 char *
 }
 
 char *