2002-05-01 05:02:01 +08:00
|
|
|
#
|
|
|
|
# Auto-configuring Makefile for RDOFF object file utils; part of the
|
|
|
|
# Netwide Assembler
|
|
|
|
#
|
|
|
|
# The Netwide Assembler is copyright (C) 1996 Simon Tatham and
|
|
|
|
# Julian Hall. All rights reserved. The software is
|
2007-12-29 22:44:23 +08:00
|
|
|
# redistributable under the license given in the file "LICENSE"
|
2002-05-01 05:02:01 +08:00
|
|
|
# distributed in the NASM archive.
|
|
|
|
|
|
|
|
top_srcdir = @top_srcdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
prefix = @prefix@
|
|
|
|
exec_prefix = @exec_prefix@
|
|
|
|
bindir = @bindir@
|
|
|
|
mandir = @mandir@
|
2007-10-19 14:33:06 +08:00
|
|
|
datarootdir = @datarootdir@
|
2002-05-01 05:02:01 +08:00
|
|
|
|
|
|
|
CC = @CC@
|
2005-10-21 03:46:34 +08:00
|
|
|
CFLAGS = @CFLAGS@
|
2007-04-16 07:03:28 +08:00
|
|
|
BUILD_CFLAGS = $(CFLAGS) @DEFS@
|
2016-05-17 04:20:01 +08:00
|
|
|
INTERNAL_CFLAGS = -I$(srcdir) -I$(top_srcdir) -I..
|
2005-10-21 03:46:34 +08:00
|
|
|
ALL_CFLAGS = $(BUILD_CFLAGS) $(INTERNAL_CFLAGS)
|
2002-05-01 05:02:01 +08:00
|
|
|
LDFLAGS = @LDFLAGS@
|
|
|
|
|
|
|
|
INSTALL = @INSTALL@
|
|
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
|
|
INSTALL_DATA = @INSTALL_DATA@
|
|
|
|
LN_S = @LN_S@
|
2007-12-31 06:24:10 +08:00
|
|
|
MKDIR = mkdir
|
2002-05-01 05:02:01 +08:00
|
|
|
|
2011-06-24 04:26:59 +08:00
|
|
|
LDRDFLIBS = rdoff.$(O) symtab.$(O) collectn.$(O) \
|
|
|
|
rdlib.$(O) segtab.$(O) hash.$(O)
|
|
|
|
RDXLIBS = rdoff.$(O) rdfload.$(O) symtab.$(O) collectn.$(O) hash.$(O)
|
|
|
|
NASMLIB = ../nasmlib.$(O)
|
2002-05-01 05:02:01 +08:00
|
|
|
|
2002-05-19 10:26:38 +08:00
|
|
|
# Binary suffixes
|
|
|
|
O = @OBJEXT@
|
|
|
|
X = @EXEEXT@
|
|
|
|
|
|
|
|
PROGRAMS = rdfdump$(X) ldrdf$(X) rdx$(X) rdflib$(X) \
|
2009-07-04 06:30:48 +08:00
|
|
|
rdf2bin$(X) rdf2com$(X) rdf2ith$(X) rdf2ihx$(X) rdf2srec$(X)
|
2002-05-19 10:26:38 +08:00
|
|
|
|
|
|
|
.SUFFIXES: .c .i .s .$(O) .1 .man
|
|
|
|
|
|
|
|
.c.$(O):
|
2005-10-21 03:46:34 +08:00
|
|
|
$(CC) -c $(ALL_CFLAGS) $<
|
2002-05-01 05:02:01 +08:00
|
|
|
|
2002-05-19 10:26:38 +08:00
|
|
|
all: $(PROGRAMS)
|
|
|
|
|
2004-09-15 14:54:34 +08:00
|
|
|
rdfdump$(X): rdfdump.$(O) rdoff.$(O)
|
|
|
|
$(CC) $(LDFLAGS) -o rdfdump$(X) rdfdump.$(O) rdoff.$(O)
|
2011-06-24 04:40:06 +08:00
|
|
|
ldrdf$(X): ldrdf.$(O) $(LDRDFLIBS) $(NASMLIB)
|
2011-06-24 04:26:59 +08:00
|
|
|
$(CC) $(LDFLAGS) -o ldrdf$(X) ldrdf.$(O) $(LDRDFLIBS) $(NASMLIB)
|
|
|
|
rdx$(X): rdx.$(O) $(RDXLIBS) $(NASMLIB)
|
|
|
|
$(CC) $(LDFLAGS) -o rdx$(X) rdx.$(O) $(RDXLIBS) $(NASMLIB)
|
2002-05-19 10:26:38 +08:00
|
|
|
rdflib$(X): rdflib.$(O)
|
|
|
|
$(CC) $(LDFLAGS) -o rdflib$(X) rdflib.$(O)
|
2011-06-24 04:26:59 +08:00
|
|
|
rdf2bin$(X): rdf2bin.$(O) $(RDXLIBS) $(NASMLIB)
|
|
|
|
$(CC) $(LDFLAGS) -o rdf2bin$(X) rdf2bin.$(O) $(RDXLIBS) $(NASMLIB)
|
2016-07-27 06:03:45 +08:00
|
|
|
rdf2com$(X): rdf2bin$(X)
|
2002-05-19 10:26:38 +08:00
|
|
|
rm -f rdf2com$(X) && $(LN_S) rdf2bin$(X) rdf2com$(X)
|
2016-07-27 06:03:45 +08:00
|
|
|
rdf2ith$(X): rdf2bin$(X)
|
2009-07-04 06:30:48 +08:00
|
|
|
rm -f rdf2ith$(X) && $(LN_S) rdf2bin$(X) rdf2ith$(X)
|
2016-07-27 06:03:45 +08:00
|
|
|
rdf2ihx$(X): rdf2bin$(X)
|
2009-07-04 12:02:33 +08:00
|
|
|
rm -f rdf2ihx$(X) && $(LN_S) rdf2bin$(X) rdf2ihx$(X)
|
2016-07-27 06:03:45 +08:00
|
|
|
rdf2srec$(X): rdf2bin$(X)
|
2009-07-06 09:48:50 +08:00
|
|
|
rm -f rdf2srec$(X) && $(LN_S) rdf2bin$(X) rdf2srec$(X)
|
2002-05-19 10:26:38 +08:00
|
|
|
|
|
|
|
rdf2ihx.$(O): rdf2ihx.c
|
|
|
|
rdf2bin.$(O): rdf2bin.c
|
|
|
|
rdfdump.$(O): rdfdump.c
|
|
|
|
rdoff.$(O): rdoff.c rdoff.h
|
|
|
|
ldrdf.$(O): ldrdf.c rdoff.h ../nasmlib.h symtab.h collectn.h rdlib.h
|
|
|
|
symtab.$(O): symtab.c symtab.h
|
|
|
|
collectn.$(O): collectn.c collectn.h
|
|
|
|
rdx.$(O): rdx.c rdoff.h rdfload.h symtab.h
|
|
|
|
rdfload.$(O): rdfload.c rdfload.h rdoff.h collectn.h symtab.h
|
|
|
|
rdlib.$(O): rdlib.c rdlib.h
|
|
|
|
rdflib.$(O): rdflib.c
|
|
|
|
segtab.$(O): segtab.c
|
|
|
|
|
2002-05-01 05:02:01 +08:00
|
|
|
clean:
|
2002-05-19 10:26:38 +08:00
|
|
|
rm -f *.$(O) $(PROGRAMS)
|
2002-05-01 05:02:01 +08:00
|
|
|
|
|
|
|
spotless: clean
|
|
|
|
rm -f Makefile
|
|
|
|
|
|
|
|
distclean: spotless
|
|
|
|
|
2002-05-19 10:26:38 +08:00
|
|
|
install: all
|
2007-12-19 08:12:13 +08:00
|
|
|
$(MKDIR) -p $(INSTALLROOT)$(bindir)
|
2002-05-19 10:26:38 +08:00
|
|
|
$(INSTALL_PROGRAM) rdfdump$(X) $(INSTALLROOT)$(bindir)/rdfdump$(X)
|
|
|
|
$(INSTALL_PROGRAM) ldrdf$(X) $(INSTALLROOT)$(bindir)/ldrdf$(X)
|
|
|
|
$(INSTALL_PROGRAM) rdx$(X) $(INSTALLROOT)$(bindir)/rdx$(X)
|
|
|
|
$(INSTALL_PROGRAM) rdflib$(X) $(INSTALLROOT)$(bindir)/rdflib$(X)
|
|
|
|
$(INSTALL_PROGRAM) rdf2bin$(X) $(INSTALLROOT)$(bindir)/rdf2bin$(X)
|
|
|
|
cd $(INSTALLROOT)$(bindir) && rm -f rdf2com$(X) && $(LN_S) rdf2bin$(X) rdf2com$(X)
|
2009-07-06 08:08:46 +08:00
|
|
|
cd $(INSTALLROOT)$(bindir) && rm -f rdf2ith$(X) && $(LN_S) rdf2bin$(X) rdf2ith$(X)
|
|
|
|
cd $(INSTALLROOT)$(bindir) && rm -f rdf2ihx$(X) && $(LN_S) rdf2bin$(X) rdf2ihx$(X)
|
|
|
|
cd $(INSTALLROOT)$(bindir) && rm -f rdf2srec$(X) && $(LN_S) rdf2bin$(X) rdf2srec$(X)
|
2007-12-19 08:12:13 +08:00
|
|
|
$(MKDIR) -p $(INSTALLROOT)$(mandir)/man1
|
|
|
|
$(INSTALL_DATA) $(srcdir)/*.1 $(INSTALLROOT)$(mandir)/man1/
|