[comp.sources.d] Empire 1.1 Makefiles

tsf@drutx.UUCP (04/23/87)

I don't know whether this will help or not but,.. a wild rumor
has it that the Version 1.1 that is being distributed is missing
the 4.2mkfiles that I sent out with the original distribution.

Here are the three files that worked for me when I had access to
a 4.2 system a while back.  Hope they're useful.  Also, if anyone
is using the 1.1 -> 1.2 conversion script, you should add these
makefiles to get closer to the Version 1.2 I'm distributing.

# This is a shell archive.  Remove anything before this line,
# then unpack it by saving it in a file and typing "sh file".
#
# Wrapped by tsf on Thu Apr 23 06:34:01 MDT 1987
# Contents:  EMPSUBS/4.2mkfile COMMANDS/4.2mkfile EMPFIX/4.2mkfile
 
echo x - EMPSUBS/4.2mkfile
sed 's/^@//' > "EMPSUBS/4.2mkfile" <<'@//E*O*F EMPSUBS/4.2mkfile//'
CFLAGS=-c
HDRDIR=../hdrs
INSDIR=../_unix.O
LIB=$(INSDIR)/empsub.a
LIBSRC= \
	atoip.c \
	atopi.c \
	chkok.c \
	cleared.c \
	cname.c \
	cnumb.c \
	copy.c \
	damage.c \
	erlog.c \
	getbit.c \
	getele.c \
	getloan.c \
	getlogn.c \
	getmysect.c \
	getmyship.c \
	getnat.c \
	getrel.c \
	getsect.c \
	getship.c \
	getshno.c \
	getsno.c \
	getstar.c \
	getstri.c \
	gettre.c \
	idist.c \
	landgun.c \
	landorsea.c \
	mailbox.c \
	max127.c \
	mtch.c \
	myeuid.c \
	myruid.c \
	natarg.c \
	neigh.c \
	nreport.c \
	nxtsct.c \
	nxtshp.c \
	onearg.c \
	plur.c \
	pr.c \
	prdate.c \
	prmptrd.c \
	pslsin.c \
	resetuid.c \
	round.c \
	same.c \
	sargs.c \
	sigsave.c \
	sread.c \
	tfact.c \
	trechk.c \
	ttyn.c \
	update.c \
	wethr.c \
	wu.c \
	xwrap.c \
	xytoa.c
HDRDEP= \
	chkok.c \
	cleared.c \
	cname.c \
	cnumb.c \
	damage.c \
	erlog.c \
	getele.c \
	getloan.c \
	getmysect.c \
	getmyship.c \
	getnat.c \
	getrel.c \
	getsect.c \
	getship.c \
	getsno.c \
	gettre.c \
	landgun.c \
	landorsea.c \
	mailbox.c \
	mtch.c \
	natarg.c \
	neigh.c \
	nreport.c \
	nxtsct.c \
	nxtshp.c \
	pr.c \
	prdate.c \
	sargs.c \
	sread.c \
	tfact.c \
	trechk.c \
	update.c \
	wethr.c \
	wu.c

$(LIB)::	$(HDRDIR)/empdef.h
	@touch $(HDRDEP);	# header change implies source change

$(LIB)::	$(LIBSRC)
	$(CC) $(CFLAGS) -I$(HDRDIR) $?
	@ar r $(LIB) *.o
	@ranlib $(LIB);		# 4.2 archive needs table of contents
	@rm -f *.o
	@echo $(LIB) is now up to date

clobber:
	rm -f $(LIB)

@.PRECIOUS:	$(LIB)
@//E*O*F EMPSUBS/4.2mkfile//
chmod u=rw,g=r,o=r EMPSUBS/4.2mkfile
 
echo x - COMMANDS/4.2mkfile
sed 's/^@//' > "COMMANDS/4.2mkfile" <<'@//E*O*F COMMANDS/4.2mkfile//'
CFLAGS=-c
HDRDIR=../hdrs
INSDIR=../_unix.O
LIB=$(INSDIR)/empcom.a
LIBSRC= \
	acce.c \
	add.c \
	assa.c \
	atta.c \
	boar.c \
	buil.c \
	cens.c \
	chan.c \
	chec.c \
	coll.c \
	cont.c \
	coun.c \
	decl.c \
	defe.c \
	deli.c \
	desi.c \
	diss.c \
	enli.c \
	fire.c \
	flee.c \
	fly.c \
	fore.c \
	gran.c \
	info.c \
	ledg.c \
	lend.c \
	load.c \
	look.c \
	map.c \
	mine.c \
	move.c \
	nati.c \
	navi.c \
	news.c \
	offe.c \
	powe.c \
	rada.c \
	rea.c \
	real.c \
	repa.c \
	rout.c \
	set.c \
	shi.c \
	spy.c \
	tele.c \
	tend.c \
	torp.c \
	trad.c \
	trea.c \
	turn.c \
	upda.c \
	vers.c \
	vote.c \
	weat.c

$(LIB)::	$(HDRDIR)/empdef.h
	@touch *.c;	# header change implies source change

$(LIB)::	$(LIBSRC)
	$(CC) $(CFLAGS) -I$(HDRDIR) $?
	@ar r $(LIB) *.o
	@ranlib $(LIB);		# 4.2 archive needs table of contents
	@rm -f *.o
	@echo $(LIB) is now up to date

clobber:
	rm -f $(LIB)

@.PRECIOUS:	$(LIB)
@//E*O*F COMMANDS/4.2mkfile//
chmod u=rw,g=r,o=r COMMANDS/4.2mkfile
 
echo x - EMPFIX/4.2mkfile
sed 's/^@//' > "EMPFIX/4.2mkfile" <<'@//E*O*F EMPFIX/4.2mkfile//'
CFLAGS=-c
HDRDIR=../hdrs
INSDIR=../BIN
LIBDIR=../_unix.O
EMPGLB=$(LIBDIR)/empglb.o
EMPSUB=$(LIBDIR)/empsub.a
LIB=_unix.O/fixlib.a
LIBSRC= \
	bytefix.c \
	chfix.c \
	fixup.c \
	floatfi.c \
	loans.c \
	longfix.c \
	nations.c \
	sectors.c \
	ships.c \
	treats.c \
	wordfix.c

HDRDEP=\
	loans.c \
	nations.c \
	sectors.c  \
	ships.c \
	treats.c

$(INSDIR)/empfix:   _unix.O _unix.O/main.o _unix.O/fixlib.a $(EMPGLB) $(EMPSUB)
	$(CC) -o $(INSDIR)/empfix _unix.O/main.o _unix.O/fixlib.a $(EMPSUB) $(EMPGLB)

_unix.O:
	mkdir _unix.O

empfix: $(INSDIR)/empfix

_unix.O/main.o: $(HDRDIR)/empdef.h main.c
	$(CC) $(CFLAGS) -I$(HDRDIR) main.c
	@mv main.o _unix.O/main.o

$(LIB)::        $(HDRDIR)/empdef.h
	@touch $(HDRDEP);	# header change implies source change

$(LIB)::         $(LIBSRC)
	$(CC) $(CFLAGS) -I$(HDRDIR) $?
	 @ar r $(LIB) [a-ln-z]*.o
	 @ranlib $(LIB);	# 4.2 archive needs table of contents
	 @rm -f [a-ln-z]*.o
 
clobber:
	rm -f $(INSDIR)/empfix
@//E*O*F EMPFIX/4.2mkfile//
chmod u=rw,g=r,o=r EMPFIX/4.2mkfile
 
exit 0