Making makefiles portable
moss at BRL.ARPA
moss at BRL.ARPA
Sat Apr 19 01:03:51 AEST 1986
What I do, is set things up in the Makefile like so:
BSD_CFLAGS=-g -O -DBSD
S52_CFLAGS=-O
BSD_LIBES=-lfb -lrt
S52_LIBES=${S5_LIBDIR}/libfb.a ${S5_LIBDIR}/librt.a
CFLAGS=${S52_CFLAGS} #default is System V Rev. 2
LIBES=${S52_LIBES}
SHELL=/usr/5bin/sh
...
Then I have a shell script called "make_bsd" which looks like:
#!/bin/sh
make CC=/bin/cc LIBES=\${BSD_LIBES} CFLAGS=\${BSD_CFLAGS} SHELL=/bin/sh $*
If BSD make doesn't recognize MAKEFLAGS, and MFLAGS isn't recognized
by Sys V, it shouldn't hurt to define both in the makefile.
My complaint is that the Gould UTX loader requires a "-m" option to
increase the stack allocation, and other loaders barf on it. This makes
things even messier.
-moss
More information about the Comp.unix.wizards
mailing list