summaryrefslogtreecommitdiff
path: root/Mkfiles
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2002-05-26 22:43:16 +0000
committerH. Peter Anvin <hpa@zytor.com>2002-05-26 22:43:16 +0000
commit372aad95472f0b373bd907cda0668f916ee34a0c (patch)
treecdc8782f6182538832d362d96c6d3f1e6ca4330f /Mkfiles
parentf807fd8f0d3b0681650c2c37efda817ba0e1ed4b (diff)
downloadnasm-372aad95472f0b373bd907cda0668f916ee34a0c.tar.gz
nasm-372aad95472f0b373bd907cda0668f916ee34a0c.tar.bz2
nasm-372aad95472f0b373bd907cda0668f916ee34a0c.zip
Clean up Makefile.unx and document it better
Diffstat (limited to 'Mkfiles')
-rw-r--r--Mkfiles/Makefile.unx47
-rw-r--r--Mkfiles/README9
2 files changed, 38 insertions, 18 deletions
diff --git a/Mkfiles/Makefile.unx b/Mkfiles/Makefile.unx
index 6d4c7bf..012edec 100644
--- a/Mkfiles/Makefile.unx
+++ b/Mkfiles/Makefile.unx
@@ -13,24 +13,28 @@
prefix = /usr/local
CC = cc
CFLAGS = -O -I.
+PERL = perl
-# You _shouldn't_ need to adjust anything below this line.
+INSTALL = install -c
+INSTALL_PROGRAM = $(INSTALL)
+INSTALL_DATA = $(INSTALL) -m 644
-exec_prefix = ${prefix}
-bindir = ${exec_prefix}/bin
-mandir = ${prefix}/man
+exec_prefix = $(prefix)
+bindir = $(exec_prefix)/bin
+mandir = $(prefix)/man
-INSTALL = install -c
-INSTALL_PROGRAM = ${INSTALL}
-INSTALL_DATA = ${INSTALL} -m 644
+# You _shouldn't_ need to adjust anything below this line.
+
+.SUFFIXES: .c .o .h .mac .pl
.c.o:
- $(CC) -c $(CFLAGS) -o $@ $*.c
+ $(CC) -c $(CFLAGS) $<
-NASM = nasm.o nasmlib.o float.o insnsa.o assemble.o labels.o \
- parser.o outform.o output/outbin.o output/outaout.o output/outcoff.o output/outelf.o \
- output/outobj.o output/outas86.o output/outrdf.o output/outdbg.o preproc.o listing.o \
- eval.o output/outrdf2.o output/outieee.o
+NASM = nasm.o nasmlib.o float.o insnsa.o assemble.o labels.o \
+ parser.o outform.o output/outbin.o output/outaout.o \
+ output/outcoff.o output/outelf.o \
+ output/outobj.o output/outas86.o output/outdbg.o preproc.o listing.o \
+ eval.o output/outrdf2.o output/outieee.o
NDISASM = ndisasm.o disasm.o sync.o nasmlib.o insnsd.o
@@ -71,20 +75,29 @@ sync.o: sync.c sync.h
# These files contains all the standard macros that are derived from
# the version number.
version.h: version version.pl
- perl version.pl h < version > version.h
+ $(PERL) version.pl h < version > version.h
version.mac: version version.pl
- perl version.pl mac < version > version.mac
+ $(PERL) version.pl mac < version > version.mac
# This source file is generated from the standard macros file
# `standard.mac' by another Perl script. Again, it's part of the
# standard distribution.
macros.c: macros.pl standard.mac version.mac
- perl macros.pl standard.mac version.mac
+ $(PERL) macros.pl standard.mac version.mac
+
+insnsa.c: insns.pl insns.dat
+ $(PERL) insns.pl -a insns.dat
+
+insnsd.c: insns.pl insns.dat
+ $(PERL) insns.pl -d insns.dat
+
+insnsi.h: insns.pl insns.dat
+ $(PERL) insns.pl -i insns.dat
-insnsa.c insnsd.c insnsi.h insnsn.c: insns.dat insns.pl
- perl insns.pl insns.dat
+insnsn.c: insns.pl insns.dat
+ $(PERL) insns.pl -n insns.dat
# This target generates all files that require perl.
# This allows easier generation of distribution (see dist target).
diff --git a/Mkfiles/README b/Mkfiles/README
index 6bde23b..33dc7f7 100644
--- a/Mkfiles/README
+++ b/Mkfiles/README
@@ -26,6 +26,13 @@ The Makefiles are:
Makefile.os2 OS/2 Warp Borland C++
Makefile.sc 32-bit DOS Symantec C++ 7
Makefile.scw Win32 Symantec C++ 7
- Makefile.unx Unix cc use if "configure" fails
+ Makefile.unx Unix Any(*) use only if "configure" fails
Makefile.vc Win32 MS Visual C++ OK as of NASM 0.98.32
Makefile.wcw Win32 Watcom C
+
+
+(*) = This Makefile should work with any compiler which is ANSI
+ C89/ISO C90 compliant and that uses the standard Unix compiler
+ arguments, such as -c and -O. Pre-ANSI compilers, such as the
+ "cc" distributed with SunOS 4.x, will not work.
+