
#
# This makefile is automatically generated by imake... do not modify
# or you may lose your changes when imake generates makefiles again.
# Ignore this message if you are not using imake.
#

            TOP = /mit/cgw
             AS = as
             CC = cc
            CPP = /lib/cpp
             LD = ld
           LINT = lint
       LINTOPTS = -abchpx
           MAKE = make

    CDEBUGFLAGS = -O
        DESTDIR =

            TOP = /mit/cgw
        INSTALL = install
           TAGS = etags
         CFLAGS = $(CDEBUGFLAGS) $(INCLUDES) $(DEFINES)
        LDFLAGS = $(CDEBUGFLAGS) $(SYS_LIBRARIES)
   INSTLIBFLAGS = -c -m 0664
          GWLIB = $(TOP)/"vax"/libexl
      GWLIBINST = $(TOP)/"vax"/lib
         DEVLIB = libdev.a
        FAKELIB = libfake.a
        GATELIB = libgate.a
        PROTLIB = libprot.a
          APLIB = libappl.a
         NETLIB = libnet.a
           CLIB = libc.a
            SCB = scb.o
            CRT = crt.o
         CRTDDT = crtddt.o
         DDTLIB = libddt.a
          DDTST = isymt.o
      FAKEDDTST = fst.o
         SYSLIB = libsys.a
          TOOLS = $(TOP)/src/tools
        TOOLBIN = $(TOP)/"vax"/bin
        TOOLMAN = $(TOP)/man/ManSuffix
         DOCSRC = $(TOP)/doc
         DEPEND = $(TOOLBIN)/makedepend
      DEPENDSRC = $(TOOLS)/makedepend
       IMAKESRC = $(TOOLS)/imake

       INCLUDES = -I$(TOP)/src/gw -I$(TOP)/src/sys/include
      MACROFILE = Vax.macros
          IMAKE = $(TOOLBIN)/imake

      IMAKE_CMD = $(IMAKE) -TImake.tmpl \
			-I$(TOOLS)/imake.includes \
			-s Makefile
         RM_CMD = rm -f *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a \
			tags TAGS make.log

# Makefile for ddt

# Description of conditional compilation flags
# DDTDBG
# DDTLM
# DDTNIN
# DDTBOOT - defined to get the command which invokes the boot program
# DDTCAT - defined when catting all the files together
# DDTUNIX - defined to get the UNIX a.out symbol table code
# DDTCMD - defined to include the command interpreter commands
# DDTSRC - defined to include the source debugging commands
# DDTSCRIPT - defined to include the DDT script commands

CFLAGS = -O -I. -DDDTDBG -DDDTUNIX -DDDTCMD -DDDTSRC -DDDTSCRIPT
DDTLMFLAGS = -O -I. -DDDTDBG -DDDTLM -DDDTNIN -DDDTCAT -DDDTSCRIPT -DDDTBOOT

SRC_SA = hcddt.c bpt.c script.c hc.c parse.c cmd.c ops.c val.c util.c \
	vax-mdep.c vax-lm.c symt-lm.c vax-disasm.c
OBJ_U = main.o parse.o cmd.o val.o ops.o util.o bpt.o hcddt.o symt-unix.o \
	hc.o vax-unix.o vax-disasm.o vax-mdep.o start.o script.o

# ddt_sa: $(ISYMT) $(FST) $(LIBDDT)

# $(GWLIB)/$(DDTST): isymt.o
#	cp fst.o $(FAKEDDTST)

# $(GWLIB)/$(FAKEDDTST): fst.o
#	cp fst.o $(FAKEDDTST)

all:: $(DDTST) $(FAKEDDTST) $(SCB) $(CRTDDT)

.c.o:
	$(CC) -c $(CFLAGS) $*.c

all:: $(GWLIB)/$(DDTLIB)

$(GWLIB)/$(DDTLIB): ddt_sa.o vax-hc.o
	ar r $@ ddt_sa.o vax-hc.o
	ranlib $@

	cp isymt.o $(GWLIB)/$(DDTST)
	cp fst.o $(GWLIB)/$(FAKEDDTST)
	cp scb.o $(GWLIB)/$(SCB)
	cp crtddt.o $(GWLIB)/crtddt.o

ddt:  $(OBJ_U)
	rm -f $@
	$(CC) -o $@  $(OBJ_U)   $(LDFLAGS)

relink::
	rm -f ddt
	$(MAKE) $(MFLAGS) ddt

clean::
	rm -f ddt

ddt_sa.o: ddt_sa.c
	cc -c $(DDTLMFLAGS) ddt_sa.c

ddt_sa.c: $(SRC_SA)
	cat $(SRC_SA) > ddt_sa.c

st.o: a.out
	nm -gn a.out | mksymt > st.s
	cc -c st.s

test: hello.o
	ld -X -e start $(GWLIB)/$(SCB) $(GWLIB)/$(CRTDDT) hello.o \
		 $(GWLIB)/$(DDTLIB) $(GWLIB)/$(CLIB) $(GWLIB)/$(DDTST) st.o

.c.s:
	cc -S $(CFLAGS) -DDDTBOOT $*.c

clean::
	$(RM_CMD) \#*

Makefile:: Imakefile \
	$(TOOLS)/imake.includes/Imake.tmpl \
	$(TOOLS)/imake.includes/Imake.rules \
	$(TOOLS)/imake.includes/$(MACROFILE)
		-rm -f Makefile.bak; mv Makefile Makefile.bak
		$(IMAKE_CMD) -DTOPDIR=$(TOP)

tags::
	$(TAGS) -w *.[ch]
	$(TAGS) -xw *.[ch] > TAGS

install::
	@echo "install done"

Makefiles::

                                                                                                                                                                                                                                                                                                                                                                         