File:  [Power 6/32 Unix Tahoe 4.2BSD] / cci / usr / src / bin / cdb / makefile
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Sun Jul 28 12:24:19 2019 UTC (6 years, 11 months ago) by root
Branches: bsd, MAIN
CVS tags: v12b, v121, HEAD
Power 6/32 Unix version 1.2b

# @(#)Make.cdb	2.5
# this file contains MAKE information for making CDB
# this file is a System III style makefile.

# change this to the name of the directory where you want CDB to live

MAKEPARAM = AS=${AS} CC=${CC} LD=${LD} INCLDIR=${INCLDIR} LIBDIR=${LIBDIR} ULIBDIR=${ULIBDIR} DESTDIR=${DESTDIR}
INSDIR = ${DESTDIR}/usr/bin

.SUFFIXES: .o .s .a .c
SHELL = ${DESTDIR}/bin/sh
# the following are the compile and load flags for different versions.
# set CFLAGS and LDFLAGS to the appropriate values.

# if ONYXDEBUG, then also un-comment the ".c.o" rule below
ONYXLD		= -i
ONYX		= -DONYX -DSYSIII -O
ONYXDEBUG	= -DONYX -DSYSIII -DDEBUG -Dregister= -S

# if PLEXUSDEBUG, then also un-comment the ".c.o" rule below
PLEXUSLD	= -i
PLEXUS		= -DPLEXUS -Dz8000 -DONYX -DSYSIII -O
PLEXUSDEBUG	= -DPLEXUS -Dz8000 -DONYX -DSYSIII -DDEBUG -Dregister= -S

# if regulus, uncomment the CC and AS definitions below
# if REGDEBUG, then also un-comment the ".c.o" rule below
#CC = c68
#AS = as68
REGLD		= -L -f
REG		= -DM68000 -DREGULUS -DSYSIII -L -f -O
REGDEBUG	= -DM68000 -DREGULUS -DSYSIII -DDEBUG -L -f -Dregister= -S

# TAHOE 4.1 BSD
TAHOE41LD		=
TAHOE41		= -DTAHOE -DBSD41 -O
TAHOE41DEBUG	= -DTAHOE -DBSD41 -DDEBUG -Dregister= -g

# TAHOE 4.2 BSD
TAHOE42LD		=
TAHOE42		= -DTAHOE -DBSD41 -DBSD42 -O
TAHOE42DEBUG	= -DTAHOE -DBSD41 -DBSD42 -DDEBUG -Dregister= -g

# VAX 4.1 BSD
VAX41LD		=
VAX41		= -DVAX -DBSD41 -O
VAX41DEBUG	= -DVAX -DBSD41 -DDEBUG -Dregister= -g

# VAX 4.2 BSD	(and 4.1c BSD)
VAX42LD		=
VAX42		= -DVAX -DBSD41 -DBSD42 -O
VAX42DEBUG	= -DVAX -DBSD41 -DBSD42 -DDEBUG -Dregister= -g

# SUN 4.2 BSD	(and 4.1c BSD)
SUN42LD		=
SUN42		= -DSUN -DM68000 -DBSD41 -DBSD42 -O
SUN42DEBUG	= -DSUN -DM68000 -DBSD41 -DBSD42 -DDEBUG -Dregister= -g

CFLAGS		= $(TAHOE42) -c
LDFLAGS		= $(TAHOE42LD)

.c.o:
	$(CC) $(CFLAGS) $*.c
# un-comment the following for debugging CDB on NON-BSD systems 
#	@symln <$*.s >$*.a ; as -u -o $*.o $*.a ; rm -f $*.a $*.s
# this is a variation on the above for REGULUS
#	symln <$*.s >$*.a ; mv $*.a $*.s ; as68 -u -L $*.s ; rm -f $*.s

.c:
	$(CC) $(CFLAGS) $*.c
# un-comment the following for debugging CDB on NON-BSD systems 
#	@symln <$*.s >$*.a ; as -u -o $*.o $*.a ; rm -f $*.a $*.s
	$(CC) -o $* $*.o end.o


Hfiles = cdb.h macdefs.h sym.h tk.h ty.h basic.h
Cfiles = main.c access.c bp.c cmd.c cmdline.c expr.c files.c format.c \
	    help.c init.c initcore.c initsym.c list.c proc.c pt.c \
	    single.c sym.c tk.c ty.c var.c end.c
Ofiles = main.o access.o bp.o cmd.o cmdline.o expr.o files.o format.o \
	    help.o init.o initcore.o initsym.o list.o proc.o pt.o \
	    single.o sym.o tk.o ty.o var.o end.o
# NOTE: 'end.o' MUST be the last file in the Ofiles list!

# these are the documentation files (and other random stuff) for the debugger
DOCfiles = cdb.1 names.ms help.text\
		Install READ_ME PLEXUS.FIX\
		t.c ext.sed tags.awk\
		Make.example Make.cdb

# un-comment these for NON-BSD systems
# SUPPORT		= symln symfix nmnew
# SUPPORTCfiles	= symln.c symfix.c nmnew.c

ALLFILES	= $(Hfiles) $(Cfiles) $(SUPPORTCfiles) $(DOCfiles)

cdb:	$(Ofiles) makefile
	$(CC) $(LDFLAGS) -o cdb $(Ofiles)

install: ext.h $(SUPPORT) cdb
# strip cdb $(SUPPORT)
	mv cdb $(SUPPORT) $(INSDIR)

# t is a toy file used for testing/play with cdb
t:	t.o end.o
	$(CC) $(LDFLAGS) -o t t.o end.o

# the next three are for NON-BSD systems
symln:
	$(CC) $(LDFLAGS) -o symln symln.c

symfix:
	$(CC) $(LDFLAGS) -o symfix symfix.c

nmnew:
	$(CC) $(LDFLAGS) -o nmnew nmnew.c

# this will rebuild the tags file for working with cdb.
tags:	$(Cfiles)
	awk -f tags.awk $(Cfiles) | sort - > tags

# if you modify (or add) any procedure formals, execute this rule.
ext.h:	$(Cfiles)
	grep '^export' $(Cfiles) | sed -f ext.sed > ext.h

clean:
	mv end.o keep
	rm -f $(Ofiles)
	mv keep end.o
	
cleansrc:
	rm -f *.[ch] makefile cdb

save:	$(ALLFILES)
	csh backup $?
	touch save

# this just gives you a file with the names of all the files. useful....
allfiles:	$(ALLFILES)
	echo "$(ALLFILES)" >allfiles

# the following will create a list of first-level dependecies for cdb
# it should be run if you add any non-system include files to cdb
depend:
	echo '#start of automatic dependencies' > d1
	grep '^#include' $(Cfiles) | grep '"' > d2
	sed -e 's/#include//' -e 's/"//g' -e 's/\.c/.o/' -e 's/\/\*.*\*\///' <d2 >> d1
	cp Make.cdb newMake.cdb
	(echo '/^#start of auto/,$$d'; echo '$$r d1'; echo w; echo q) | /bin/ed - newMake.cdb
	mv Make.cdb oldMake.cdb
	mv newMake.cdb Make.cdb
	rm oldMake.cdb
	@rm d1 d2
	@echo DONE with depend

end.o:  end.c
	${CC} -g -c -DTAHOE -DBSD41 -DBSD42 end.c
#start of static dependencies

# don't put anything below the following line! It is manipulated by above rule.
#start of automatic dependencies
main.o: cdb.h
access.o: macdefs.h
access.o: cdb.h
bp.o: cdb.h
cmd.o: cdb.h
cmdline.o: cdb.h
expr.o: cdb.h
expr.o: macdefs.h
files.o: cdb.h
files.o: macdefs.h
format.o: macdefs.h
format.o: cdb.h
help.o: cdb.h
init.o: cdb.h
init.o: macdefs.h
initcore.o: cdb.h
initcore.o: basic.h
initcore.o: sym.h
initcore.o: macdefs.h
initsym.o: cdb.h
list.o: cdb.h
proc.o: macdefs.h
proc.o: cdb.h
pt.o: cdb.h
single.o: cdb.h
sym.o: cdb.h
tk.o: cdb.h
ty.o: cdb.h
ty.o: macdefs.h
var.o: macdefs.h
var.o: cdb.h

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.