New installation mechanism
authorceriel <none@none>
Tue, 27 Aug 1991 09:20:30 +0000 (09:20 +0000)
committerceriel <none@none>
Tue, 27 Aug 1991 09:20:30 +0000 (09:20 +0000)
util/int/.distr
util/int/proto.make [new file with mode: 0644]
util/led/.distr
util/led/proto.make [new file with mode: 0644]
util/misc/.distr
util/misc/proto.make [new file with mode: 0644]
util/ncgg/.distr
util/ncgg/proto.make [new file with mode: 0644]
util/opt/.distr
util/opt/proto.make [new file with mode: 0644]

index b5b421f..7b20f91 100644 (file)
@@ -1,5 +1,5 @@
 READ_ME
-Makefile
+proto.make
 M.trap_msg
 M.warn_h
 M.warn_msg
diff --git a/util/int/proto.make b/util/int/proto.make
new file mode 100644 (file)
index 0000000..f919659
--- /dev/null
@@ -0,0 +1,590 @@
+# $Header$
+
+#PARAMS                do not remove this line
+
+SRC_DIR = $(SRC_HOME)/util/int
+
+INCLUDES = -I$(TARGET_HOME)/h -I$(TARGET_HOME)/config -I.
+CFLAGS = $(COPTIONS) $(INCLUDES)
+LDFLAGS = $(LDOPTIONS)
+LINTFLAGS = $(LINTOPTIONS) $(INCLUDES)
+
+INT =          int
+
+IP_SPEC =      $(SRC_HOME)/etc/ip_spec.t
+TRAPS =                $(SRC_HOME)/etc/traps
+APP_A =                $(SRC_HOME)/doc/int/appA        # to be moved later
+
+CFILES =       $(SRC_DIR)/alloc.c \
+       $(SRC_DIR)/core.c \
+       $(SRC_DIR)/data.c \
+       $(SRC_DIR)/do_array.c \
+       $(SRC_DIR)/do_branch.c \
+       $(SRC_DIR)/do_comp.c \
+       $(SRC_DIR)/do_conv.c \
+       $(SRC_DIR)/do_fpar.c \
+       $(SRC_DIR)/do_incdec.c \
+       $(SRC_DIR)/do_intar.c \
+       $(SRC_DIR)/do_load.c \
+       $(SRC_DIR)/do_logic.c \
+       $(SRC_DIR)/do_misc.c \
+       $(SRC_DIR)/do_proc.c \
+       $(SRC_DIR)/do_ptrar.c \
+       $(SRC_DIR)/do_sets.c \
+       $(SRC_DIR)/do_store.c \
+       $(SRC_DIR)/do_unsar.c \
+       $(SRC_DIR)/dump.c \
+       $(SRC_DIR)/disassemble.c \
+       $(SRC_DIR)/fra.c \
+       $(SRC_DIR)/global.c \
+       $(SRC_DIR)/init.c \
+       $(SRC_DIR)/io.c \
+       $(SRC_DIR)/log.c \
+       $(SRC_DIR)/m_ioctl.c \
+       $(SRC_DIR)/m_sigtrp.c \
+       $(SRC_DIR)/main.c \
+       $(SRC_DIR)/moncalls.c \
+       $(SRC_DIR)/monstruct.c \
+       $(SRC_DIR)/proctab.c \
+       $(SRC_DIR)/read.c \
+       $(SRC_DIR)/rsb.c \
+       $(SRC_DIR)/segment.c \
+       $(SRC_DIR)/stack.c \
+       $(SRC_DIR)/switch.c \
+       $(SRC_DIR)/tally.c \
+       $(SRC_DIR)/text.c \
+       $(SRC_DIR)/trap.c \
+       $(SRC_DIR)/warn.c
+
+OBJ =  alloc.o core.o data.o do_array.o do_branch.o do_comp.o do_conv.o \
+       do_fpar.o do_incdec.o do_intar.o do_load.o do_logic.o do_misc.o \
+       do_proc.o do_ptrar.o do_sets.o do_store.o do_unsar.o dump.o \
+       disassemble.o fra.o global.o init.o io.o log.o m_ioctl.o m_sigtrp.o \
+       main.o moncalls.o monstruct.o proctab.o read.o rsb.o segment.o \
+       stack.o switch.o tally.o text.o trap.o warn.o
+
+HDR =  $(SRC_DIR)/alloc.h \
+       $(SRC_DIR)/fra.h \
+       $(SRC_DIR)/global.h \
+       $(SRC_DIR)/linfil.h \
+       $(SRC_DIR)/log.h \
+       $(SRC_DIR)/mem.h \
+       $(SRC_DIR)/memdirect.h \
+       $(SRC_DIR)/monstruct.h \
+       $(SRC_DIR)/opcode.h \
+       $(SRC_DIR)/proctab.h \
+       $(SRC_DIR)/read.h \
+       $(SRC_DIR)/rsb.h \
+       $(SRC_DIR)/shadow.h \
+       $(SRC_DIR)/text.h \
+       $(SRC_DIR)/trap.h \
+       $(SRC_DIR)/logging.h \
+       $(SRC_DIR)/debug.h \
+       $(SRC_DIR)/nofloat.h \
+       $(SRC_DIR)/segcheck.h \
+       $(SRC_DIR)/sysidf.h \
+       $(SRC_DIR)/v7ioctl.h \
+       $(SRC_DIR)/e.out.h#     should be in $(EM)/h or so, or in $(EM/h/em_abs.h
+
+# Main entries
+all:   test
+
+install:       $(INT)
+       cp $(INT) $(TARGET_HOME)/bin/int
+       cp int.1 $(TARGET_HOME)/man/int.1
+
+cmp:   $(INT)
+       -cmp $(INT) $(TARGET_HOME)/bin/int
+       -cmp int.1 $(TARGET_HOME)/man/int.1
+
+test:  $(INT) test/awa.em22 test/awa.em24 test/awa.em44
+       @rm -f int.mess
+       -echo 3 5 7 2 -1 | time $(INT) test/awa.em22
+       cat int.mess
+       @rm -f int.mess
+       -echo 3 5 7 2 -1 | time $(INT) test/awa.em24
+       cat int.mess
+       @rm -f int.mess
+       -echo 3 5 7 2 -1 | time $(INT) test/awa.em44
+       cat int.mess
+
+$(INT):        $(OBJ)
+       $(CC) $(LDFLAGS) -o $(INT) $(OBJ)
+
+# Generated files
+trap_msg:      $(SRC_DIR)/M.trap_msg $(TRAPS)
+       $(SRC_DIR)/M.trap_msg $(TRAPS)
+
+warn_msg:      $(SRC_DIR)/M.warn_msg $(APP_A)
+       $(SRC_DIR)/M.warn_msg $(APP_A)
+
+warn.h:                $(SRC_DIR)/M.warn_h $(APP_A)
+       $(SRC_DIR)/M.warn_h $(APP_A)
+
+switch/DoCases:
+       (cd switch; make DoCases)
+
+switch/PrCases:        
+       (cd switch; make PrCases)
+
+test/awa.em22:
+       (cd test; make awa.em22)
+
+test/awa.em24:
+       (cd test; make awa.em24)
+
+test/awa.em44:
+       (cd test; make awa.em44)
+
+
+# Auxiliary entries
+lint:  $(CFILES) trap_msg warn_msg warn.h switch/DoCases switch/PrCases
+       $(LINT) $(LINTFLAGS) $(CFILES)
+
+tags:  $(HDR) $(CFILES)
+       ctags $(HDR) $(CFILES)
+
+MFILES =       $(SRC_DIR)/M.trap_msg $(SRC_DIR)/M.warn_h $(SRC_DIR)/M.warn_msg
+
+ALL =  $(SRC_DIR)/READ_ME $(SRC_DIR)/proto.make $(MFILES) $(HDR) $(CFILES)
+
+print:
+       @pr $(ALL)
+
+pr:    print
+
+opr:
+       make pr | opr
+
+clean:
+       rm -f core mon.out int.mess int.log int.core int.tally \
+               trap_msg warn_msg warn.h tags print \
+               $(OBJ) $(INT)
+       (cd switch; make clean)
+       (cd test; make clean)
+
+bare:  clean
+       (cd switch; make bare)
+
+depend:        warn.h trap_msg warn_msg
+       sed '/^#DEPENDENCIES/,$$d' Makefile >Makefile.new
+       echo '#DEPENDENCIES' >>Makefile.new
+       for i in $(CFILES) ; do \
+               echo "`basename $$i .c`.$$(SUF):        $$i" >> Makefile.new ; \
+               echo '   $$(CC) -c $$(CFLAGS)' $$i >> Makefile.new ; \
+               $(UTIL_HOME)/lib.bin/cpp -d $(INCLUDES) $$i | sed "s/^/`basename $$i .c`.$$(SUF):       /" >> Makefile.new ; \
+       done
+       mv Makefile Makefile.old
+       mv Makefile.new Makefile
+
+# do not remove the next line
+#DEPENDENCIES
+alloc.$(SUF):  $(SRC_DIR)/alloc.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/alloc.c
+alloc.$(SUF):  $(SRC_DIR)/alloc.h
+alloc.$(SUF):  $(SRC_DIR)/global.h
+alloc.$(SUF):  $(SRC_DIR)/debug.h
+core.$(SUF):   $(SRC_DIR)/core.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/core.c
+core.$(SUF):   $(SRC_DIR)/fra.h
+core.$(SUF):   $(SRC_DIR)/shadow.h
+core.$(SUF):   $(SRC_DIR)/global.h
+core.$(SUF):   $(SRC_DIR)/logging.h
+data.$(SUF):   $(SRC_DIR)/data.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/data.c
+data.$(SUF):   $(SRC_DIR)/shadow.h
+data.$(SUF):   $(SRC_DIR)/mem.h
+data.$(SUF):   $(SRC_DIR)/memdirect.h
+data.$(SUF):   $(SRC_DIR)/alloc.h
+data.$(SUF):   ./warn.h
+data.$(SUF):   $(SRC_DIR)/trap.h
+data.$(SUF):   $(SRC_DIR)/log.h
+data.$(SUF):   $(SRC_DIR)/global.h
+data.$(SUF):   $(SRC_DIR)/nofloat.h
+data.$(SUF):   $(SRC_DIR)/logging.h
+data.$(SUF):   $(TARGET_HOME)/h/em_abs.h
+do_array.$(SUF):       $(SRC_DIR)/do_array.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/do_array.c
+do_array.$(SUF):       $(SRC_DIR)/fra.h
+do_array.$(SUF):       $(SRC_DIR)/text.h
+do_array.$(SUF):       $(SRC_DIR)/mem.h
+do_array.$(SUF):       $(SRC_DIR)/trap.h
+do_array.$(SUF):       $(SRC_DIR)/logging.h
+do_array.$(SUF):       $(SRC_DIR)/log.h
+do_array.$(SUF):       $(SRC_DIR)/global.h
+do_array.$(SUF):       $(TARGET_HOME)/h/em_abs.h
+do_branch.$(SUF):      $(SRC_DIR)/do_branch.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/do_branch.c
+do_branch.$(SUF):      ./warn.h
+do_branch.$(SUF):      $(SRC_DIR)/fra.h
+do_branch.$(SUF):      $(SRC_DIR)/text.h
+do_branch.$(SUF):      $(SRC_DIR)/trap.h
+do_branch.$(SUF):      $(SRC_DIR)/mem.h
+do_branch.$(SUF):      $(SRC_DIR)/logging.h
+do_branch.$(SUF):      $(SRC_DIR)/log.h
+do_branch.$(SUF):      $(SRC_DIR)/global.h
+do_branch.$(SUF):      $(TARGET_HOME)/h/em_abs.h
+do_comp.$(SUF):        $(SRC_DIR)/do_comp.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/do_comp.c
+do_comp.$(SUF):        $(SRC_DIR)/fra.h
+do_comp.$(SUF):        $(SRC_DIR)/text.h
+do_comp.$(SUF):        $(SRC_DIR)/trap.h
+do_comp.$(SUF):        $(SRC_DIR)/shadow.h
+do_comp.$(SUF):        $(SRC_DIR)/mem.h
+do_comp.$(SUF):        ./warn.h
+do_comp.$(SUF):        $(SRC_DIR)/log.h
+do_comp.$(SUF):        $(SRC_DIR)/global.h
+do_comp.$(SUF):        $(SRC_DIR)/nofloat.h
+do_comp.$(SUF):        $(SRC_DIR)/logging.h
+do_comp.$(SUF):        $(TARGET_HOME)/h/em_abs.h
+do_conv.$(SUF):        $(SRC_DIR)/do_conv.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/do_conv.c
+do_conv.$(SUF):        ./warn.h
+do_conv.$(SUF):        $(SRC_DIR)/fra.h
+do_conv.$(SUF):        $(SRC_DIR)/text.h
+do_conv.$(SUF):        $(SRC_DIR)/trap.h
+do_conv.$(SUF):        $(SRC_DIR)/mem.h
+do_conv.$(SUF):        $(SRC_DIR)/logging.h
+do_conv.$(SUF):        $(SRC_DIR)/log.h
+do_conv.$(SUF):        $(SRC_DIR)/global.h
+do_conv.$(SUF):        $(SRC_DIR)/nofloat.h
+do_conv.$(SUF):        $(TARGET_HOME)/h/em_abs.h
+do_fpar.$(SUF):        $(SRC_DIR)/do_fpar.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/do_fpar.c
+do_fpar.$(SUF):        ./warn.h
+do_fpar.$(SUF):        $(SRC_DIR)/fra.h
+do_fpar.$(SUF):        $(SRC_DIR)/text.h
+do_fpar.$(SUF):        $(SRC_DIR)/trap.h
+do_fpar.$(SUF):        $(SRC_DIR)/mem.h
+do_fpar.$(SUF):        $(SRC_DIR)/logging.h
+do_fpar.$(SUF):        $(SRC_DIR)/log.h
+do_fpar.$(SUF):        $(SRC_DIR)/global.h
+do_fpar.$(SUF):        $(SRC_DIR)/nofloat.h
+do_fpar.$(SUF):        $(TARGET_HOME)/h/em_abs.h
+do_incdec.$(SUF):      $(SRC_DIR)/do_incdec.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/do_incdec.c
+do_incdec.$(SUF):      ./warn.h
+do_incdec.$(SUF):      $(SRC_DIR)/fra.h
+do_incdec.$(SUF):      $(SRC_DIR)/text.h
+do_incdec.$(SUF):      $(SRC_DIR)/mem.h
+do_incdec.$(SUF):      $(SRC_DIR)/trap.h
+do_incdec.$(SUF):      $(SRC_DIR)/nofloat.h
+do_incdec.$(SUF):      $(SRC_DIR)/logging.h
+do_incdec.$(SUF):      $(SRC_DIR)/log.h
+do_incdec.$(SUF):      $(SRC_DIR)/global.h
+do_incdec.$(SUF):      $(TARGET_HOME)/h/em_abs.h
+do_intar.$(SUF):       $(SRC_DIR)/do_intar.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/do_intar.c
+do_intar.$(SUF):       $(SRC_DIR)/fra.h
+do_intar.$(SUF):       $(SRC_DIR)/text.h
+do_intar.$(SUF):       ./warn.h
+do_intar.$(SUF):       $(SRC_DIR)/trap.h
+do_intar.$(SUF):       $(SRC_DIR)/mem.h
+do_intar.$(SUF):       $(SRC_DIR)/log.h
+do_intar.$(SUF):       $(SRC_DIR)/global.h
+do_intar.$(SUF):       $(SRC_DIR)/logging.h
+do_intar.$(SUF):       $(TARGET_HOME)/h/em_abs.h
+do_load.$(SUF):        $(SRC_DIR)/do_load.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/do_load.c
+do_load.$(SUF):        ./warn.h
+do_load.$(SUF):        $(SRC_DIR)/rsb.h
+do_load.$(SUF):        $(SRC_DIR)/fra.h
+do_load.$(SUF):        $(SRC_DIR)/text.h
+do_load.$(SUF):        $(SRC_DIR)/trap.h
+do_load.$(SUF):        $(SRC_DIR)/mem.h
+do_load.$(SUF):        $(SRC_DIR)/logging.h
+do_load.$(SUF):        $(SRC_DIR)/log.h
+do_load.$(SUF):        $(SRC_DIR)/global.h
+do_load.$(SUF):        $(TARGET_HOME)/h/em_abs.h
+do_logic.$(SUF):       $(SRC_DIR)/do_logic.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/do_logic.c
+do_logic.$(SUF):       $(SRC_DIR)/fra.h
+do_logic.$(SUF):       $(SRC_DIR)/text.h
+do_logic.$(SUF):       $(SRC_DIR)/trap.h
+do_logic.$(SUF):       $(SRC_DIR)/shadow.h
+do_logic.$(SUF):       $(SRC_DIR)/mem.h
+do_logic.$(SUF):       ./warn.h
+do_logic.$(SUF):       $(SRC_DIR)/log.h
+do_logic.$(SUF):       $(SRC_DIR)/global.h
+do_logic.$(SUF):       $(SRC_DIR)/logging.h
+do_logic.$(SUF):       $(TARGET_HOME)/h/em_abs.h
+do_misc.$(SUF):        $(SRC_DIR)/do_misc.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/do_misc.c
+do_misc.$(SUF):        $(SRC_DIR)/linfil.h
+do_misc.$(SUF):        $(SRC_DIR)/rsb.h
+do_misc.$(SUF):        $(SRC_DIR)/fra.h
+do_misc.$(SUF):        $(SRC_DIR)/read.h
+do_misc.$(SUF):        $(SRC_DIR)/text.h
+do_misc.$(SUF):        $(SRC_DIR)/shadow.h
+do_misc.$(SUF):        $(SRC_DIR)/memdirect.h
+do_misc.$(SUF):        $(SRC_DIR)/mem.h
+do_misc.$(SUF):        ./warn.h
+do_misc.$(SUF):        $(SRC_DIR)/trap.h
+do_misc.$(SUF):        $(SRC_DIR)/log.h
+do_misc.$(SUF):        $(SRC_DIR)/global.h
+do_misc.$(SUF):        $(SRC_DIR)/logging.h
+do_misc.$(SUF):        $(TARGET_HOME)/h/em_abs.h
+do_proc.$(SUF):        $(SRC_DIR)/do_proc.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/do_proc.c
+do_proc.$(SUF):        $(SRC_DIR)/linfil.h
+do_proc.$(SUF):        $(SRC_DIR)/rsb.h
+do_proc.$(SUF):        $(SRC_DIR)/fra.h
+do_proc.$(SUF):        $(SRC_DIR)/proctab.h
+do_proc.$(SUF):        $(SRC_DIR)/text.h
+do_proc.$(SUF):        ./warn.h
+do_proc.$(SUF):        $(SRC_DIR)/trap.h
+do_proc.$(SUF):        $(SRC_DIR)/memdirect.h
+do_proc.$(SUF):        $(SRC_DIR)/shadow.h
+do_proc.$(SUF):        $(SRC_DIR)/mem.h
+do_proc.$(SUF):        $(SRC_DIR)/log.h
+do_proc.$(SUF):        $(SRC_DIR)/global.h
+do_proc.$(SUF):        $(SRC_DIR)/logging.h
+do_proc.$(SUF):        $(TARGET_HOME)/h/em_abs.h
+do_ptrar.$(SUF):       $(SRC_DIR)/do_ptrar.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/do_ptrar.c
+do_ptrar.$(SUF):       $(SRC_DIR)/fra.h
+do_ptrar.$(SUF):       $(SRC_DIR)/text.h
+do_ptrar.$(SUF):       ./warn.h
+do_ptrar.$(SUF):       $(SRC_DIR)/trap.h
+do_ptrar.$(SUF):       $(SRC_DIR)/mem.h
+do_ptrar.$(SUF):       $(SRC_DIR)/logging.h
+do_ptrar.$(SUF):       $(SRC_DIR)/log.h
+do_ptrar.$(SUF):       $(SRC_DIR)/global.h
+do_ptrar.$(SUF):       $(SRC_DIR)/segcheck.h
+do_ptrar.$(SUF):       $(TARGET_HOME)/h/em_abs.h
+do_sets.$(SUF):        $(SRC_DIR)/do_sets.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/do_sets.c
+do_sets.$(SUF):        $(SRC_DIR)/fra.h
+do_sets.$(SUF):        $(SRC_DIR)/text.h
+do_sets.$(SUF):        $(SRC_DIR)/mem.h
+do_sets.$(SUF):        $(SRC_DIR)/trap.h
+do_sets.$(SUF):        $(SRC_DIR)/logging.h
+do_sets.$(SUF):        $(SRC_DIR)/log.h
+do_sets.$(SUF):        $(SRC_DIR)/global.h
+do_sets.$(SUF):        $(TARGET_HOME)/h/em_abs.h
+do_store.$(SUF):       $(SRC_DIR)/do_store.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/do_store.c
+do_store.$(SUF):       ./warn.h
+do_store.$(SUF):       $(SRC_DIR)/fra.h
+do_store.$(SUF):       $(SRC_DIR)/text.h
+do_store.$(SUF):       $(SRC_DIR)/trap.h
+do_store.$(SUF):       $(SRC_DIR)/mem.h
+do_store.$(SUF):       $(SRC_DIR)/logging.h
+do_store.$(SUF):       $(SRC_DIR)/log.h
+do_store.$(SUF):       $(SRC_DIR)/global.h
+do_store.$(SUF):       $(TARGET_HOME)/h/em_abs.h
+do_unsar.$(SUF):       $(SRC_DIR)/do_unsar.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/do_unsar.c
+do_unsar.$(SUF):       $(SRC_DIR)/fra.h
+do_unsar.$(SUF):       $(SRC_DIR)/text.h
+do_unsar.$(SUF):       ./warn.h
+do_unsar.$(SUF):       $(SRC_DIR)/trap.h
+do_unsar.$(SUF):       $(SRC_DIR)/mem.h
+do_unsar.$(SUF):       $(SRC_DIR)/log.h
+do_unsar.$(SUF):       $(SRC_DIR)/global.h
+do_unsar.$(SUF):       $(SRC_DIR)/logging.h
+do_unsar.$(SUF):       $(TARGET_HOME)/h/em_abs.h
+dump.$(SUF):   $(SRC_DIR)/dump.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/dump.c
+dump.$(SUF):   $(SRC_DIR)/rsb.h
+dump.$(SUF):   $(SRC_DIR)/linfil.h
+dump.$(SUF):   $(SRC_DIR)/shadow.h
+dump.$(SUF):   $(SRC_DIR)/proctab.h
+dump.$(SUF):   $(SRC_DIR)/text.h
+dump.$(SUF):   $(SRC_DIR)/fra.h
+dump.$(SUF):   $(SRC_DIR)/mem.h
+dump.$(SUF):   $(SRC_DIR)/memdirect.h
+dump.$(SUF):   $(SRC_DIR)/log.h
+dump.$(SUF):   $(SRC_DIR)/global.h
+dump.$(SUF):   $(SRC_DIR)/logging.h
+dump.$(SUF):   $(TARGET_HOME)/h/em_abs.h
+disassemble.$(SUF):    $(SRC_DIR)/disassemble.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/disassemble.c
+disassemble.$(SUF):    ./switch/PrCases
+disassemble.$(SUF):    $(SRC_DIR)/alloc.h
+disassemble.$(SUF):    $(SRC_DIR)/proctab.h
+disassemble.$(SUF):    $(SRC_DIR)/memdirect.h
+disassemble.$(SUF):    $(SRC_DIR)/opcode.h
+disassemble.$(SUF):    $(SRC_DIR)/global.h
+fra.$(SUF):    $(SRC_DIR)/fra.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/fra.c
+fra.$(SUF):    $(SRC_DIR)/alloc.h
+fra.$(SUF):    $(SRC_DIR)/fra.h
+fra.$(SUF):    $(SRC_DIR)/shadow.h
+fra.$(SUF):    $(SRC_DIR)/mem.h
+fra.$(SUF):    $(SRC_DIR)/global.h
+fra.$(SUF):    $(SRC_DIR)/logging.h
+global.$(SUF): $(SRC_DIR)/global.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/global.c
+global.$(SUF): $(SRC_DIR)/global.h
+init.$(SUF):   $(SRC_DIR)/init.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/init.c
+init.$(SUF):   $(SRC_DIR)/read.h
+init.$(SUF):   $(SRC_DIR)/trap.h
+init.$(SUF):   $(SRC_DIR)/shadow.h
+init.$(SUF):   $(SRC_DIR)/mem.h
+init.$(SUF):   ./warn.h
+init.$(SUF):   $(SRC_DIR)/alloc.h
+init.$(SUF):   $(SRC_DIR)/log.h
+init.$(SUF):   $(SRC_DIR)/global.h
+init.$(SUF):   $(SRC_DIR)/logging.h
+init.$(SUF):   $(TARGET_HOME)/h/em_abs.h
+io.$(SUF):     $(SRC_DIR)/io.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/io.c
+io.$(SUF):     $(SRC_DIR)/linfil.h
+io.$(SUF):     $(SRC_DIR)/mem.h
+io.$(SUF):     $(SRC_DIR)/global.h
+io.$(SUF):     $(SRC_DIR)/logging.h
+log.$(SUF):    $(SRC_DIR)/log.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/log.c
+log.$(SUF):    $(SRC_DIR)/linfil.h
+log.$(SUF):    $(SRC_DIR)/global.h
+log.$(SUF):    $(SRC_DIR)/logging.h
+m_ioctl.$(SUF):        $(SRC_DIR)/m_ioctl.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/m_ioctl.c
+m_ioctl.$(SUF):        ./warn.h
+m_ioctl.$(SUF):        $(SRC_DIR)/mem.h
+m_ioctl.$(SUF):        $(SRC_DIR)/global.h
+m_ioctl.$(SUF):        $(SRC_DIR)/v7ioctl.h
+m_ioctl.$(SUF):        $(TARGET_HOME)/config/local.h
+m_ioctl.$(SUF):        $(SRC_DIR)/sysidf.h
+m_sigtrp.$(SUF):       $(SRC_DIR)/m_sigtrp.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/m_sigtrp.c
+m_sigtrp.$(SUF):       $(SRC_DIR)/trap.h
+m_sigtrp.$(SUF):       ./warn.h
+m_sigtrp.$(SUF):       $(SRC_DIR)/logging.h
+m_sigtrp.$(SUF):       $(SRC_DIR)/log.h
+m_sigtrp.$(SUF):       $(SRC_DIR)/global.h
+main.$(SUF):   $(SRC_DIR)/main.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/main.c
+main.$(SUF):   $(SRC_DIR)/rsb.h
+main.$(SUF):   $(SRC_DIR)/opcode.h
+main.$(SUF):   $(SRC_DIR)/read.h
+main.$(SUF):   $(SRC_DIR)/text.h
+main.$(SUF):   ./warn.h
+main.$(SUF):   $(SRC_DIR)/trap.h
+main.$(SUF):   $(SRC_DIR)/log.h
+main.$(SUF):   $(SRC_DIR)/global.h
+main.$(SUF):   $(SRC_DIR)/nofloat.h
+main.$(SUF):   $(SRC_DIR)/logging.h
+main.$(SUF):   $(SRC_DIR)/e.out.h
+main.$(SUF):   $(TARGET_HOME)/h/em_abs.h
+moncalls.$(SUF):       $(SRC_DIR)/moncalls.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/moncalls.c
+moncalls.$(SUF):       $(SRC_DIR)/mem.h
+moncalls.$(SUF):       ./warn.h
+moncalls.$(SUF):       $(SRC_DIR)/trap.h
+moncalls.$(SUF):       $(SRC_DIR)/global.h
+moncalls.$(SUF):       $(TARGET_HOME)/h/em_abs.h
+moncalls.$(SUF):       $(SRC_DIR)/shadow.h
+moncalls.$(SUF):       $(SRC_DIR)/alloc.h
+moncalls.$(SUF):       $(SRC_DIR)/logging.h
+moncalls.$(SUF):       $(SRC_DIR)/log.h
+moncalls.$(SUF):       $(TARGET_HOME)/config/local.h
+moncalls.$(SUF):       $(SRC_DIR)/sysidf.h
+monstruct.$(SUF):      $(SRC_DIR)/monstruct.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/monstruct.c
+monstruct.$(SUF):      $(SRC_DIR)/monstruct.h
+monstruct.$(SUF):      $(SRC_DIR)/mem.h
+monstruct.$(SUF):      $(SRC_DIR)/global.h
+monstruct.$(SUF):      $(SRC_DIR)/v7ioctl.h
+monstruct.$(SUF):      $(TARGET_HOME)/config/local.h
+monstruct.$(SUF):      $(SRC_DIR)/sysidf.h
+proctab.$(SUF):        $(SRC_DIR)/proctab.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/proctab.c
+proctab.$(SUF):        $(SRC_DIR)/proctab.h
+proctab.$(SUF):        $(SRC_DIR)/alloc.h
+proctab.$(SUF):        $(SRC_DIR)/log.h
+proctab.$(SUF):        $(SRC_DIR)/global.h
+proctab.$(SUF):        $(SRC_DIR)/logging.h
+read.$(SUF):   $(SRC_DIR)/read.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/read.c
+read.$(SUF):   $(SRC_DIR)/text.h
+read.$(SUF):   $(SRC_DIR)/read.h
+read.$(SUF):   $(SRC_DIR)/shadow.h
+read.$(SUF):   $(SRC_DIR)/mem.h
+read.$(SUF):   ./warn.h
+read.$(SUF):   $(SRC_DIR)/log.h
+read.$(SUF):   $(SRC_DIR)/global.h
+read.$(SUF):   $(SRC_DIR)/nofloat.h
+read.$(SUF):   $(SRC_DIR)/logging.h
+read.$(SUF):   $(TARGET_HOME)/h/as_spec.h
+read.$(SUF):   $(TARGET_HOME)/h/em_spec.h
+read.$(SUF):   $(TARGET_HOME)/config/local.h
+rsb.$(SUF):    $(SRC_DIR)/rsb.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/rsb.c
+rsb.$(SUF):    ./warn.h
+rsb.$(SUF):    $(SRC_DIR)/shadow.h
+rsb.$(SUF):    $(SRC_DIR)/linfil.h
+rsb.$(SUF):    $(SRC_DIR)/proctab.h
+rsb.$(SUF):    $(SRC_DIR)/rsb.h
+rsb.$(SUF):    $(SRC_DIR)/mem.h
+rsb.$(SUF):    $(SRC_DIR)/global.h
+rsb.$(SUF):    $(SRC_DIR)/logging.h
+segment.$(SUF):        $(SRC_DIR)/segment.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/segment.c
+segment.$(SUF):        $(SRC_DIR)/alloc.h
+segment.$(SUF):        $(SRC_DIR)/mem.h
+segment.$(SUF):        $(SRC_DIR)/global.h
+segment.$(SUF):        $(SRC_DIR)/segcheck.h
+stack.$(SUF):  $(SRC_DIR)/stack.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/stack.c
+stack.$(SUF):  $(SRC_DIR)/rsb.h
+stack.$(SUF):  $(SRC_DIR)/shadow.h
+stack.$(SUF):  $(SRC_DIR)/mem.h
+stack.$(SUF):  $(SRC_DIR)/memdirect.h
+stack.$(SUF):  $(SRC_DIR)/alloc.h
+stack.$(SUF):  $(SRC_DIR)/trap.h
+stack.$(SUF):  ./warn.h
+stack.$(SUF):  $(SRC_DIR)/log.h
+stack.$(SUF):  $(SRC_DIR)/global.h
+stack.$(SUF):  $(SRC_DIR)/nofloat.h
+stack.$(SUF):  $(SRC_DIR)/logging.h
+stack.$(SUF):  $(TARGET_HOME)/h/em_abs.h
+switch.$(SUF): $(SRC_DIR)/switch.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/switch.c
+switch.$(SUF): ./switch/DoCases
+switch.$(SUF): ./warn.h
+switch.$(SUF): $(SRC_DIR)/trap.h
+switch.$(SUF): $(SRC_DIR)/text.h
+switch.$(SUF): $(SRC_DIR)/opcode.h
+switch.$(SUF): $(SRC_DIR)/global.h
+switch.$(SUF): $(TARGET_HOME)/h/em_abs.h
+tally.$(SUF):  $(SRC_DIR)/tally.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/tally.c
+tally.$(SUF):  $(SRC_DIR)/alloc.h
+tally.$(SUF):  $(SRC_DIR)/linfil.h
+tally.$(SUF):  $(SRC_DIR)/global.h
+text.$(SUF):   $(SRC_DIR)/text.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/text.c
+text.$(SUF):   ./warn.h
+text.$(SUF):   $(SRC_DIR)/proctab.h
+text.$(SUF):   $(SRC_DIR)/read.h
+text.$(SUF):   $(SRC_DIR)/text.h
+text.$(SUF):   $(SRC_DIR)/trap.h
+text.$(SUF):   $(SRC_DIR)/alloc.h
+text.$(SUF):   $(SRC_DIR)/global.h
+text.$(SUF):   $(TARGET_HOME)/h/em_abs.h
+trap.$(SUF):   $(SRC_DIR)/trap.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/trap.c
+trap.$(SUF):   ./trap_msg
+trap.$(SUF):   $(SRC_DIR)/fra.h
+trap.$(SUF):   $(SRC_DIR)/rsb.h
+trap.$(SUF):   $(SRC_DIR)/linfil.h
+trap.$(SUF):   $(SRC_DIR)/shadow.h
+trap.$(SUF):   $(SRC_DIR)/mem.h
+trap.$(SUF):   ./warn.h
+trap.$(SUF):   $(SRC_DIR)/trap.h
+trap.$(SUF):   $(SRC_DIR)/log.h
+trap.$(SUF):   $(SRC_DIR)/global.h
+trap.$(SUF):   $(SRC_DIR)/logging.h
+trap.$(SUF):   $(TARGET_HOME)/h/em_abs.h
+warn.$(SUF):   $(SRC_DIR)/warn.c
+        $(CC) -c $(CFLAGS) $(SRC_DIR)/warn.c
+warn.$(SUF):   ./warn_msg
+warn.$(SUF):   $(SRC_DIR)/linfil.h
+warn.$(SUF):   ./warn.h
+warn.$(SUF):   $(SRC_DIR)/alloc.h
+warn.$(SUF):   $(SRC_DIR)/log.h
+warn.$(SUF):   $(SRC_DIR)/global.h
+warn.$(SUF):   $(SRC_DIR)/logging.h
index 53c5f51..091212b 100644 (file)
@@ -1,4 +1,4 @@
-Makefile
+proto.make
 WRONG
 ack.out.5
 archive.c
diff --git a/util/led/proto.make b/util/led/proto.make
new file mode 100644 (file)
index 0000000..a453ca3
--- /dev/null
@@ -0,0 +1,177 @@
+# $Header$
+
+#PARAMS                do not remove this line!
+
+SRC_DIR = $(SRC_HOME)/util/led
+LIBDIR= $(TARGET_HOME)/lib.bin
+MODLIBDIR = $(TARGET_HOME)/modules/lib
+PREFLAGS=  -I$(TARGET_HOME)/h -I$(TARGET_HOME)/config -DNDEBUG -DNASSERT
+CFLAGS = $(PREFLAGS) $(COPTIONS)
+LINTFLAGS = $(PREFLAGS) $(LINTOPTIONS)
+LDFLAGS        = $(LDOPTIONS)
+LDLIBS = $(MODLIBDIR)/libstring.$(LIBSUF) $(MODLIBDIR)/libobject.$(LIBSUF)
+LINTLIBS = \
+       $(UTIL_HOME)/modules/lib/$(LINTPREF)string.$(LINTSUF) \
+       $(UTIL_HOME)/modules/lib/$(LINTPREF)object.$(LINTSUF)
+
+#      Some convenient macro definitions.
+
+CFILES = \
+       $(SRC_DIR)/archive.c\
+       $(SRC_DIR)/error.c\
+       $(SRC_DIR)/extract.c\
+       $(SRC_DIR)/finish.c\
+       $(SRC_DIR)/main.c\
+       $(SRC_DIR)/memory.c\
+       $(SRC_DIR)/output.c\
+       $(SRC_DIR)/read.c\
+       $(SRC_DIR)/relocate.c\
+       $(SRC_DIR)/save.c\
+       $(SRC_DIR)/scan.c\
+       $(SRC_DIR)/sym.c\
+       $(SRC_DIR)/write.c
+
+HFILES = \
+       $(SRC_DIR)/assert.h \
+       $(SRC_DIR)/const.h \
+       $(SRC_DIR)/debug.h \
+       $(SRC_DIR)/defs.h \
+       $(SRC_DIR)/memory.h \
+       $(SRC_DIR)/orig.h \
+       $(SRC_DIR)/scan.h
+OFILES = \
+       archive.$(SUF) error.$(SUF) extract.$(SUF) finish.$(SUF) main.$(SUF) \
+       memory.$(SUF) output.$(SUF) read.$(SUF) relocate.$(SUF) save.$(SUF) \
+       scan.$(SUF) sym.$(SUF) write.$(SUF)
+
+#      Things that can be made.
+
+led:   $(OFILES)
+       $(CC) $(LDFLAGS) $(OFILES) $(LDLIBS) -o led
+
+install:led
+       rm -f $(LIBDIR)/em_led $(TARGET_HOME)/man/led.6 $(TARGET_HOME)/man/ack.out.5
+       cp led $(LIBDIR)/em_led
+       cp led.6 $(TARGET_HOME)/man/led.6
+       cp ack.out.5 $(TARGET_HOME)/man/ack.out.5
+
+cmp:   led
+       -cmp led $(LIBDIR)/em_led
+       -cmp led.6 $(TARGET_HOME)/man/led.6
+       -cmp ack.out.5 $(TARGET_HOME)/man/ack.out.5
+
+lint:
+       lint $(LINTFLAGS) $(CFILES) $(LINTLIBS)
+
+pr:
+       @pr $(PRFLAGS) $(SRC_DIR)/proto.make $(HFILES) $(CFILES)
+
+opr:   
+       make pr | opr
+
+clean:
+       rm -f Out *.$(SUF) led
+
+depend:
+       sed '/^#DEPENDENCIES/,$$d' Makefile >Makefile.new
+       echo '#DEPENDENCIES' >>Makefile.new
+       for i in $(CFILES) ; do \
+               echo "`basename $$i .c`.$$(SUF):        $$i" >> Makefile.new ; \
+               echo '  $$(CC) -c $$(CFLAGS)' $$i >> Makefile.new ; \
+               $(UTIL_HOME)/lib.bin/cpp -d $(PREFLAGS) $$i | sed "s/^/`basename $$i .c`.$$(SUF):       /" >> Makefile.new ; \
+       done
+       mv Makefile Makefile.old
+       mv Makefile.new Makefile
+
+# do not remove the next line
+#DEPENDENCIES
+archive.$(SUF):        $(SRC_DIR)/archive.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/archive.c
+archive.$(SUF):        $(SRC_DIR)/memory.h
+archive.$(SUF):        $(SRC_DIR)/defs.h
+archive.$(SUF):        $(SRC_DIR)/debug.h
+archive.$(SUF):        $(SRC_DIR)/const.h
+archive.$(SUF):        $(TARGET_HOME)/h/ranlib.h
+archive.$(SUF):        $(TARGET_HOME)/h/out.h
+archive.$(SUF):        $(TARGET_HOME)/h/arch.h
+error.$(SUF):  $(SRC_DIR)/error.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/error.c
+error.$(SUF):  $(SRC_DIR)/const.h
+error.$(SUF):  $(TARGET_HOME)/h/out.h
+extract.$(SUF):        $(SRC_DIR)/extract.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/extract.c
+extract.$(SUF):        $(SRC_DIR)/scan.h
+extract.$(SUF):        $(SRC_DIR)/orig.h
+extract.$(SUF):        $(SRC_DIR)/memory.h
+extract.$(SUF):        $(SRC_DIR)/defs.h
+extract.$(SUF):        $(SRC_DIR)/debug.h
+extract.$(SUF):        $(SRC_DIR)/const.h
+extract.$(SUF):        $(TARGET_HOME)/h/out.h
+finish.$(SUF): $(SRC_DIR)/finish.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/finish.c
+finish.$(SUF): $(SRC_DIR)/scan.h
+finish.$(SUF): $(SRC_DIR)/orig.h
+finish.$(SUF): $(SRC_DIR)/memory.h
+finish.$(SUF): $(SRC_DIR)/defs.h
+finish.$(SUF): $(SRC_DIR)/const.h
+finish.$(SUF): $(TARGET_HOME)/h/out.h
+main.$(SUF):   $(SRC_DIR)/main.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/main.c
+main.$(SUF):   $(SRC_DIR)/orig.h
+main.$(SUF):   $(SRC_DIR)/memory.h
+main.$(SUF):   $(SRC_DIR)/defs.h
+main.$(SUF):   $(SRC_DIR)/debug.h
+main.$(SUF):   $(SRC_DIR)/const.h
+main.$(SUF):   $(TARGET_HOME)/h/out.h
+memory.$(SUF): $(SRC_DIR)/memory.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/memory.c
+memory.$(SUF): $(TARGET_HOME)/h/local.h
+memory.$(SUF): $(SRC_DIR)/mach.c
+memory.$(SUF): $(SRC_DIR)/memory.h
+memory.$(SUF): $(SRC_DIR)/debug.h
+memory.$(SUF): $(SRC_DIR)/assert.h
+memory.$(SUF): $(SRC_DIR)/const.h
+memory.$(SUF): $(TARGET_HOME)/h/out.h
+output.$(SUF): $(SRC_DIR)/output.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/output.c
+output.$(SUF): $(SRC_DIR)/memory.h
+output.$(SUF): $(SRC_DIR)/const.h
+output.$(SUF): $(TARGET_HOME)/h/out.h
+read.$(SUF):   $(SRC_DIR)/read.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/read.c
+relocate.$(SUF):       $(SRC_DIR)/relocate.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/relocate.c
+relocate.$(SUF):       $(SRC_DIR)/orig.h
+relocate.$(SUF):       $(SRC_DIR)/defs.h
+relocate.$(SUF):       $(SRC_DIR)/debug.h
+relocate.$(SUF):       $(SRC_DIR)/const.h
+relocate.$(SUF):       $(TARGET_HOME)/h/out.h
+save.$(SUF):   $(SRC_DIR)/save.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/save.c
+save.$(SUF):   $(SRC_DIR)/memory.h
+save.$(SUF):   $(SRC_DIR)/assert.h
+save.$(SUF):   $(SRC_DIR)/const.h
+save.$(SUF):   $(TARGET_HOME)/h/out.h
+save.$(SUF):   $(TARGET_HOME)/h/arch.h
+scan.$(SUF):   $(SRC_DIR)/scan.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/scan.c
+scan.$(SUF):   $(SRC_DIR)/debug.h
+scan.$(SUF):   $(SRC_DIR)/scan.h
+scan.$(SUF):   $(SRC_DIR)/memory.h
+scan.$(SUF):   $(SRC_DIR)/assert.h
+scan.$(SUF):   $(SRC_DIR)/const.h
+scan.$(SUF):   $(TARGET_HOME)/h/ranlib.h
+scan.$(SUF):   $(TARGET_HOME)/h/out.h
+scan.$(SUF):   $(TARGET_HOME)/h/arch.h
+sym.$(SUF):    $(SRC_DIR)/sym.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/sym.c
+sym.$(SUF):    $(SRC_DIR)/debug.h
+sym.$(SUF):    $(SRC_DIR)/memory.h
+sym.$(SUF):    $(SRC_DIR)/const.h
+sym.$(SUF):    $(TARGET_HOME)/h/out.h
+write.$(SUF):  $(SRC_DIR)/write.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/write.c
+write.$(SUF):  $(SRC_DIR)/memory.h
+write.$(SUF):  $(SRC_DIR)/assert.h
+write.$(SUF):  $(SRC_DIR)/const.h
+write.$(SUF):  $(TARGET_HOME)/h/out.h
index 374c59f..c9c3be1 100644 (file)
@@ -1,4 +1,4 @@
-Makefile
+proto.make
 convert.c
 em_decode.6
 esize.1
diff --git a/util/misc/proto.make b/util/misc/proto.make
new file mode 100644 (file)
index 0000000..4496866
--- /dev/null
@@ -0,0 +1,85 @@
+# $Header$
+
+#PARAMS                do not remove this line!
+
+h=$(TARGET_HOME)/h
+l=$(TARGET_HOME)/lib.bin
+ml=$(TARGET_HOME)/modules/lib
+mh=$(TARGET_HOME)/modules/h
+ul=$(UTIL_HOME)/lib.bin
+uml=$(UTIL_HOME)/modules/lib
+
+SRC_DIR=$(SRC_HOME)/util/misc
+
+DEC_PATH=decode
+ENC_PATH=encode
+DATA_PATH=$l/em_data.$(LIBSUF)
+DECLIBS=$(ml)/libread_emkV.$(LIBSUF) $(ml)/libeme.$(LIBSUF)\
+       $(ml)/liballoc.$(LIBSUF) $(ml)/libprint.$(LIBSUF)\
+       $(ml)/libstring.$(LIBSUF) $(ml)/libsystem.$(LIBSUF)
+ENCLIBS=$(ml)/libread_emeV.$(LIBSUF) $(ml)/libemk.$(LIBSUF) \
+       $(ml)/liballoc.$(LIBSUF) $(ml)/libprint.$(LIBSUF) \
+       $(ml)/libstring.$(LIBSUF) $(ml)/libsystem.$(LIBSUF)
+LINTLIBS= $(ul)/$(LINTPREF)em_data.$(LINTSUF) \
+       $(uml)/$(LINTPREF)read_emkV.$(LINTSUF) \
+       $(uml)/$(LINTPREF)eme.$(LINTSUF) \
+       $(uml)/$(LINTPREF)alloc.$(LINTSUF) \
+       $(uml)/$(LINTPREF)print.$(LINTSUF) \
+       $(uml)/$(LINTPREF)string.$(LINTSUF) \
+       $(uml)/$(LINTPREF)system.$(LINTSUF)
+HFILES=$h/em_mnem.h $h/em_spec.h $h/em_pseu.h $h/em_flag.h $h/em_ptyp.h  \
+       $h/em_mes.h $(mh)/em.h $(mh)/em_comp.h
+
+CFLAGS=$(COPTIONS) -I$(mh) -I$h
+LDFLAGS = $(LDOPTIONS)
+LINTFLAGS = $(LINTOPTIONS) -I$(mh) -I$h
+
+all:            $(DEC_PATH) $(ENC_PATH) esize
+
+$(DEC_PATH):    decode.$(SUF)
+               $(CC) $(LDFLAGS) -o $(DEC_PATH) decode.$(SUF) $(DECLIBS) $(DATA_PATH)
+
+$(ENC_PATH):    encode.$(SUF)
+               $(CC) $(LDFLAGS) -o $(ENC_PATH) encode.$(SUF) $(ENCLIBS) $(DATA_PATH)
+
+esize:         esize.$(SUF)
+               $(CC) $(LDFLAGS) -o esize esize.$(SUF)
+
+convert.$(SUF):        $(HFILES) $(SRC_DIR)/convert.c
+               $(CC) -c $(CFLAGS) $(SRC_DIR)/convert.c
+
+esize.$(SUF):  $(SRC_DIR)/esize.c
+               $(CC) -c $(CFLAGS) $(SRC_DIR)/esize.c
+
+encode.$(SUF): convert.$(SUF)
+               cp convert.$(SUF) encode.$(SUF)
+
+decode.$(SUF): convert.$(SUF)
+               cp convert.$(SUF) decode.$(SUF)
+
+clean:
+               rm -f $(DEC_PATH) $(ENC_PATH) esize *.$(SUF) *.old
+
+install :       all
+               rm -f $l/em_$(DEC_PATH) $l/em_$(ENC_PATH) $(TARGET_HOME)/bin/esize $(TARGET_HOME)/man/em_decode.6 $(TARGET_HOME)/man/esize.1
+               cp $(DEC_PATH) $l/em_$(DEC_PATH)
+               cp $(ENC_PATH) $l/em_$(ENC_PATH)
+               cp esize $(TARGET_HOME)/bin/esize
+               cp $(SRC_DIR)/em_decode.6 $(TARGET_HOME)/man/em_decode.6
+               cp $(SRC_DIR)/esize.1 $(TARGET_HOME)/man/esize.1
+
+cmp :           all
+               -cmp $(DEC_PATH) $l/em_$(DEC_PATH)
+               -cmp $(ENC_PATH) $l/em_$(ENC_PATH)
+               -cmp esize $(TARGET_HOME)/bin/esize
+               -cmp $(SRC_DIR)/em_decode.6 $(TARGET_HOME)/man/em_decode.6
+               -cmp $(SRC_DIR)/esize.1 $(TARGET_HOME)/man/esize.1
+
+opr:
+               make pr ^ opr
+pr:
+               @pr -n $(SRC_DIR)/proto.make $(SRC_DIR)/convert.c $(SRC_DIR)/esize.c
+
+lint:
+               $(LINT) $(LINTFLAGS) $(SRC_DIR)/esize.c
+               $(LINT) $(LINTFLAGS) $(SRC_DIR)/convert.c $(LINTLIBS)
index ecae6d4..a45f72b 100644 (file)
@@ -1,4 +1,4 @@
-Makefile
+proto.make
 assert.h
 cgg.y
 coerc.c
diff --git a/util/ncgg/proto.make b/util/ncgg/proto.make
new file mode 100644 (file)
index 0000000..a59ba61
--- /dev/null
@@ -0,0 +1,258 @@
+# Header: Makefile,v 0.8 87/11/16 10:35:32 ceriel Exp $
+
+#PARAMS                do not remove this line!
+
+CFILES=        cgg.c $(SRC_DIR)/subr.c $(SRC_DIR)/main.c $(SRC_DIR)/coerc.c \
+       enterkeyw.c $(SRC_DIR)/error.c $(SRC_DIR)/emlookup.c $(SRC_DIR)/expr.c \
+       $(SRC_DIR)/instruct.c $(SRC_DIR)/iocc.c $(SRC_DIR)/lookup.c \
+       $(SRC_DIR)/output.c $(SRC_DIR)/set.c $(SRC_DIR)/strlookup.c \
+       $(SRC_DIR)/var.c $(SRC_DIR)/hall.c
+OFILES= cgg.$(SUF) subr.$(SUF) main.$(SUF) coerc.$(SUF) enterkeyw.$(SUF) \
+       error.$(SUF) emlookup.$(SUF) expr.$(SUF) instruct.$(SUF) iocc.$(SUF) \
+       lookup.$(SUF) set.$(SUF) strlookup.$(SUF) var.$(SUF) hall.$(SUF)
+SOURCES=$(SRC_DIR)/*.h $(SRC_DIR)/cgg.y $(SRC_DIR)/scan.l \
+       $(SRC_DIR)/cvtkeywords $(SRC_DIR)/keywords $(SRC_DIR)/coerc.c \
+       $(SRC_DIR)/emlookup.c $(SRC_DIR)/error.c $(SRC_DIR)/expr.c \
+       $(SRC_DIR)/hall.c $(SRC_DIR)/instruct.c $(SRC_DIR)/iocc.c \
+       $(SRC_DIR)/lookup.c $(SRC_DIR)/main.c $(SRC_DIR)/output.c \
+       $(SRC_DIR)/set.c $(SRC_DIR)/strlookup.c $(SRC_DIR)/subr.c \
+       $(SRC_DIR)/var.c
+
+SRC_DIR=$(SRC_HOME)/util/ncgg
+EMH=$(TARGET_HOME)/h
+MANDIR=$(TARGET_HOME)/man
+INCLUDES=-I$(EMH) -I$(SRC_DIR) -I.
+CFLAGS=$(INCLUDES) $(COPTIONS)
+YFLAGS=-d
+LDFLAGS=$(LDOPTIONS)
+LINTFLAGS=$(INCLUDES) $(LINTOPTIONS)
+
+
+cgg:   cgg.$(SUF) $(OFILES) output.$(SUF)
+       $(CC) $(LDFLAGS) $(OFILES) output.$(SUF) $(TARGET_HOME)/lib.bin/em_data.$(LIBSUF) -o cgg
+
+install:       cgg
+       rm -f $(TARGET_HOME)/lib.bin/ncgg
+       cp cgg $(TARGET_HOME)/lib.bin/ncgg
+       rm -f $(MANDIR)/ncgg.6
+       cp $(SRC_DIR)/ncgg.6 $(MANDIR)/ncgg.6
+
+cmp:   cgg
+       -cmp cgg $(TARGET_HOME)/lib.bin/ncgg
+       -cmp $(SRC_DIR)/ncgg.6 $(MANDIR)/ncgg.6
+
+debugcgg:      cgg.$(SUF) $(OFILES) debugoutput.$(SUF)
+       $(CC) $(LDFLAGS) $(OFILES) debugoutput.$(SUF) $(TARGET_HOME)/lib.bin/em_data.$(LIBSUF) -o cgg
+
+cgg.c: $(SRC_DIR)/cgg.y
+       yacc $(YFLAGS) $(SRC_DIR)/cgg.y && mv y.tab.c cgg.c
+
+enterkeyw.c:   $(SRC_DIR)/cvtkeywords $(SRC_DIR)/keywords y.tab.h
+       $(SRC_DIR)/cvtkeywords $(SRC_DIR)/keywords
+
+debugoutput.$(SUF):    debugoutput.c
+       $(CC) $(CFLAGS) -DCODEDEBUG -c debugoutput.c
+
+debugoutput.c: $(SRC_DIR)/output.c
+       cp $(SRC_DIR)/output.c debugoutput.c
+
+lint:  $(CFILES)
+       $(LINT) $(LINTFLAGS) $(CFILES)
+
+clean:
+       rm -f cgg.c scan.c y.output y.tab.h enterkeyw.c debugoutput.c
+       rm -f $(OFILES) output.$(SUF) debugoutput.$(SUF) cgg lint
+
+scan.c:        $(SRC_DIR)/scan.l
+       flex -st $(SRC_DIR)/scan.l > scan.c
+
+pr:
+       @pr $(SOURCES)
+
+opr:
+       -make pr|opr
+
+depend: $(CFILES) scan.c
+       sed '/^#DEPENDENCIES/,$$d' Makefile >Makefile.new
+       echo '#DEPENDENCIES' >>Makefile.new
+       for i in $(CFILES) ; do \
+               echo "`basename $$i .c`.$$(SUF):        $$i" >> Makefile.new ; \
+               echo '  $$(CC) -c $$(CFLAGS)' $$i >> Makefile.new ; \
+               $(UTIL_HOME)/lib.bin/cpp -d $(INCLUDES) $$i | sed "s/^/`basename $$i .c`.$$(SUF):       /" >> Makefile.new ; \
+       done
+       mv Makefile Makefile.old
+       mv Makefile.new Makefile
+
+#DEPENDENCIES
+cgg.$(SUF):    cgg.c
+       $(CC) -c $(CFLAGS) cgg.c
+cgg.$(SUF):    scan.c
+cgg.$(SUF):    $(TARGET_HOME)/h/em_reg.h
+cgg.$(SUF):    $(TARGET_HOME)/h/cgg_cg.h
+cgg.$(SUF):    $(SRC_DIR)/extern.h
+cgg.$(SUF):    $(SRC_DIR)/expr.h
+cgg.$(SUF):    $(SRC_DIR)/cost.h
+cgg.$(SUF):    $(SRC_DIR)/instruct.h
+cgg.$(SUF):    $(SRC_DIR)/iocc.h
+cgg.$(SUF):    $(SRC_DIR)/set.h
+cgg.$(SUF):    $(SRC_DIR)/lookup.h
+cgg.$(SUF):    $(SRC_DIR)/varinfo.h
+cgg.$(SUF):    $(TARGET_HOME)/h/em_spec.h
+cgg.$(SUF):    $(TARGET_HOME)/h/local.h
+cgg.$(SUF):    $(SRC_DIR)/param.h
+subr.$(SUF):   $(SRC_DIR)/subr.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/subr.c
+subr.$(SUF):   $(SRC_DIR)/extern.h
+subr.$(SUF):   $(TARGET_HOME)/h/cgg_cg.h
+subr.$(SUF):   $(SRC_DIR)/regvar.h
+subr.$(SUF):   $(SRC_DIR)/token.h
+subr.$(SUF):   $(SRC_DIR)/cost.h
+subr.$(SUF):   $(SRC_DIR)/instruct.h
+subr.$(SUF):   $(SRC_DIR)/varinfo.h
+subr.$(SUF):   $(SRC_DIR)/set.h
+subr.$(SUF):   $(SRC_DIR)/expr.h
+subr.$(SUF):   $(SRC_DIR)/property.h
+subr.$(SUF):   $(SRC_DIR)/lookup.h
+subr.$(SUF):   $(SRC_DIR)/reg.h
+subr.$(SUF):   $(TARGET_HOME)/h/em_spec.h
+subr.$(SUF):   $(TARGET_HOME)/h/local.h
+subr.$(SUF):   $(SRC_DIR)/param.h
+main.$(SUF):   $(SRC_DIR)/main.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/main.c
+coerc.$(SUF):  $(SRC_DIR)/coerc.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/coerc.c
+coerc.$(SUF):  $(SRC_DIR)/extern.h
+coerc.$(SUF):  $(SRC_DIR)/pseudo.h
+coerc.$(SUF):  $(TARGET_HOME)/h/cgg_cg.h
+coerc.$(SUF):  $(SRC_DIR)/iocc.h
+coerc.$(SUF):  $(SRC_DIR)/varinfo.h
+coerc.$(SUF):  $(SRC_DIR)/cost.h
+coerc.$(SUF):  $(SRC_DIR)/token.h
+coerc.$(SUF):  $(SRC_DIR)/reg.h
+coerc.$(SUF):  $(SRC_DIR)/property.h
+coerc.$(SUF):  $(SRC_DIR)/set.h
+coerc.$(SUF):  $(TARGET_HOME)/h/em_spec.h
+coerc.$(SUF):  $(TARGET_HOME)/h/local.h
+coerc.$(SUF):  $(SRC_DIR)/param.h
+coerc.$(SUF):  $(SRC_DIR)/assert.h
+enterkeyw.$(SUF):      enterkeyw.c
+       $(CC) -c $(CFLAGS) enterkeyw.c
+enterkeyw.$(SUF):      $(SRC_DIR)/lookup.h
+error.$(SUF):  $(SRC_DIR)/error.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/error.c
+emlookup.$(SUF):       $(SRC_DIR)/emlookup.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/emlookup.c
+emlookup.$(SUF):       $(TARGET_HOME)/h/em_flag.h
+emlookup.$(SUF):       $(SRC_DIR)/expr.h
+emlookup.$(SUF):       $(TARGET_HOME)/h/em_spec.h
+emlookup.$(SUF):       $(TARGET_HOME)/h/local.h
+emlookup.$(SUF):       $(SRC_DIR)/param.h
+expr.$(SUF):   $(SRC_DIR)/expr.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/expr.c
+expr.$(SUF):   $(SRC_DIR)/extern.h
+expr.$(SUF):   $(TARGET_HOME)/h/cgg_cg.h
+expr.$(SUF):   $(SRC_DIR)/regvar.h
+expr.$(SUF):   $(SRC_DIR)/expr.h
+expr.$(SUF):   $(SRC_DIR)/property.h
+expr.$(SUF):   $(SRC_DIR)/cost.h
+expr.$(SUF):   $(SRC_DIR)/token.h
+expr.$(SUF):   $(SRC_DIR)/lookup.h
+expr.$(SUF):   $(SRC_DIR)/reg.h
+expr.$(SUF):   $(SRC_DIR)/set.h
+expr.$(SUF):   $(TARGET_HOME)/h/em_spec.h
+expr.$(SUF):   $(TARGET_HOME)/h/local.h
+expr.$(SUF):   $(SRC_DIR)/param.h
+expr.$(SUF):   $(SRC_DIR)/assert.h
+instruct.$(SUF):       $(SRC_DIR)/instruct.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/instruct.c
+instruct.$(SUF):       $(SRC_DIR)/extern.h
+instruct.$(SUF):       $(TARGET_HOME)/h/cgg_cg.h
+instruct.$(SUF):       $(SRC_DIR)/iocc.h
+instruct.$(SUF):       $(SRC_DIR)/expr.h
+instruct.$(SUF):       $(SRC_DIR)/set.h
+instruct.$(SUF):       $(SRC_DIR)/varinfo.h
+instruct.$(SUF):       $(SRC_DIR)/pseudo.h
+instruct.$(SUF):       $(SRC_DIR)/cost.h
+instruct.$(SUF):       $(SRC_DIR)/instruct.h
+instruct.$(SUF):       $(TARGET_HOME)/h/em_spec.h
+instruct.$(SUF):       $(TARGET_HOME)/h/local.h
+instruct.$(SUF):       $(SRC_DIR)/param.h
+iocc.$(SUF):   $(SRC_DIR)/iocc.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/iocc.c
+iocc.$(SUF):   $(SRC_DIR)/extern.h
+iocc.$(SUF):   $(SRC_DIR)/regvar.h
+iocc.$(SUF):   $(TARGET_HOME)/h/cgg_cg.h
+iocc.$(SUF):   $(SRC_DIR)/iocc.h
+iocc.$(SUF):   $(SRC_DIR)/property.h
+iocc.$(SUF):   $(SRC_DIR)/cost.h
+iocc.$(SUF):   $(SRC_DIR)/token.h
+iocc.$(SUF):   $(SRC_DIR)/lookup.h
+iocc.$(SUF):   $(SRC_DIR)/expr.h
+iocc.$(SUF):   $(SRC_DIR)/set.h
+iocc.$(SUF):   $(TARGET_HOME)/h/em_spec.h
+iocc.$(SUF):   $(TARGET_HOME)/h/local.h
+iocc.$(SUF):   $(SRC_DIR)/param.h
+iocc.$(SUF):   $(SRC_DIR)/assert.h
+lookup.$(SUF): $(SRC_DIR)/lookup.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/lookup.c
+lookup.$(SUF): $(SRC_DIR)/lookup.h
+lookup.$(SUF): $(TARGET_HOME)/h/em_spec.h
+lookup.$(SUF): $(TARGET_HOME)/h/local.h
+lookup.$(SUF): $(SRC_DIR)/param.h
+lookup.$(SUF): $(SRC_DIR)/assert.h
+output.$(SUF): $(SRC_DIR)/output.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/output.c
+output.$(SUF): $(SRC_DIR)/extern.h
+output.$(SUF): $(SRC_DIR)/regvar.h
+output.$(SUF): $(SRC_DIR)/pseudo.h
+output.$(SUF): $(TARGET_HOME)/h/cgg_cg.h
+output.$(SUF): $(SRC_DIR)/lookup.h
+output.$(SUF): $(SRC_DIR)/instruct.h
+output.$(SUF): $(SRC_DIR)/set.h
+output.$(SUF): $(SRC_DIR)/cost.h
+output.$(SUF): $(SRC_DIR)/token.h
+output.$(SUF): $(SRC_DIR)/property.h
+output.$(SUF): $(SRC_DIR)/reg.h
+output.$(SUF): $(TARGET_HOME)/h/em_spec.h
+output.$(SUF): $(TARGET_HOME)/h/local.h
+output.$(SUF): $(SRC_DIR)/param.h
+output.$(SUF): $(SRC_DIR)/varinfo.h
+output.$(SUF): $(SRC_DIR)/assert.h
+set.$(SUF):    $(SRC_DIR)/set.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/set.c
+set.$(SUF):    $(SRC_DIR)/extern.h
+set.$(SUF):    $(TARGET_HOME)/h/cgg_cg.h
+set.$(SUF):    $(SRC_DIR)/reg.h
+set.$(SUF):    $(SRC_DIR)/lookup.h
+set.$(SUF):    $(SRC_DIR)/cost.h
+set.$(SUF):    $(SRC_DIR)/token.h
+set.$(SUF):    $(SRC_DIR)/set.h
+set.$(SUF):    $(SRC_DIR)/property.h
+set.$(SUF):    $(TARGET_HOME)/h/em_spec.h
+set.$(SUF):    $(TARGET_HOME)/h/local.h
+set.$(SUF):    $(SRC_DIR)/param.h
+strlookup.$(SUF):      $(SRC_DIR)/strlookup.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/strlookup.c
+strlookup.$(SUF):      $(TARGET_HOME)/h/em_spec.h
+strlookup.$(SUF):      $(TARGET_HOME)/h/local.h
+strlookup.$(SUF):      $(SRC_DIR)/param.h
+var.$(SUF):    $(SRC_DIR)/var.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/var.c
+var.$(SUF):    $(TARGET_HOME)/h/cgg_cg.h
+var.$(SUF):    $(SRC_DIR)/lookup.h
+var.$(SUF):    $(SRC_DIR)/instruct.h
+var.$(SUF):    $(SRC_DIR)/set.h
+var.$(SUF):    $(SRC_DIR)/cost.h
+var.$(SUF):    $(SRC_DIR)/token.h
+var.$(SUF):    $(SRC_DIR)/property.h
+var.$(SUF):    $(SRC_DIR)/reg.h
+var.$(SUF):    $(TARGET_HOME)/h/em_spec.h
+var.$(SUF):    $(TARGET_HOME)/h/local.h
+var.$(SUF):    $(SRC_DIR)/param.h
+hall.$(SUF):   $(SRC_DIR)/hall.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/hall.c
+hall.$(SUF):   $(SRC_DIR)/set.h
+hall.$(SUF):   $(TARGET_HOME)/h/em_spec.h
+hall.$(SUF):   $(TARGET_HOME)/h/local.h
+hall.$(SUF):   $(SRC_DIR)/param.h
+hall.$(SUF):   $(SRC_DIR)/assert.h
index 3a3a401..ff12f27 100644 (file)
@@ -1,4 +1,4 @@
-Makefile
+proto.make
 alloc.c
 alloc.h
 assert.h
diff --git a/util/opt/proto.make b/util/opt/proto.make
new file mode 100644 (file)
index 0000000..ab4d704
--- /dev/null
@@ -0,0 +1,303 @@
+# $Header$
+
+#PARAMS                do not remove this line!
+
+SRC_DIR = $(SRC_HOME)/util/opt
+
+CFILES=        $(SRC_DIR)/main.c $(SRC_DIR)/getline.c $(SRC_DIR)/lookup.c \
+       $(SRC_DIR)/var.c $(SRC_DIR)/process.c $(SRC_DIR)/backward.c \
+       $(SRC_DIR)/util.c $(SRC_DIR)/alloc.c $(SRC_DIR)/putline.c \
+       $(SRC_DIR)/cleanup.c $(SRC_DIR)/peephole.c $(SRC_DIR)/flow.c \
+       $(SRC_DIR)/reg.c $(SRC_DIR)/tes.c pop_push.c
+
+OFILES=        main.$(SUF) getline.$(SUF) lookup.$(SUF) var.$(SUF) process.$(SUF) backward.$(SUF) util.$(SUF)\
+       alloc.$(SUF) putline.$(SUF) cleanup.$(SUF) peephole.$(SUF) flow.$(SUF) tes.$(SUF) pop_push.$(SUF)
+ONOGLOB=regnoglob.$(SUF)
+OGLOB=regglob.$(SUF)
+
+LIBS=  $(TARGET_HOME)/lib.bin/em_data.$(LIBSUF)
+ULIBS= $(UTIL_HOME)/lib.bin/em_data.$(ULIBSUF)
+INCLUDES=-I$(TARGET_HOME)/h -I$(SRC_DIR) -I.
+UINCLUDES=-I$(TARGET_HOME)/h -I$(SRC_DIR) -I.
+CFLAGS= -DNDEBUG $(INCLUDES) $(COPTIONS)
+UCFLAGS= -DNDEBUG $(INCLUDES) $(UCOPTIONS)
+LDFLAGS=$(LDOPTIONS)
+ULDFLAGS=$(ULDOPTIONS)
+LINTFLAGS=$(INCLUDES) -DNDEBUG $(LINTOPTIONS)
+CPP=$(UTIL_HOME)/lib.bin/cpp
+
+all:   opt opt2
+
+opt:   $(OFILES) $(ONOGLOB) pattern.$(SUF) $(LIBS)
+       $(CC) $(LDFLAGS) $(CFLAGS) $(OFILES) $(ONOGLOB) pattern.$(SUF) $(LIBS) -o opt
+
+opt2:  $(OFILES) $(OGLOB) pattern.$(SUF) $(LIBS)
+       $(CC) $(LDFLAGS) $(CFLAGS) $(OFILES) $(OGLOB) pattern.$(SUF) $(LIBS) -o opt2
+
+test:  opt testopt
+       testopt
+
+cmp:   all
+       -cmp opt $(TARGET_HOMTARGET_HOME)/lib.bin/em_opt
+       -cmp opt2 $(TARGET_HOME)/lib.bin/em_opt2
+       -cmp $(SRC_DIR)/em_opt.6 $(TARGET_HOME)/man/em_opt.6
+
+install:all
+       rm -f $(TARGET_HOME)/lib.bin/em_opt
+       cp opt $(TARGET_HOME)/lib.bin/em_opt
+       rm -f $(TARGET_HOME)/lib.bin/em_opt2
+       cp opt2 $(TARGET_HOME)/lib.bin/em_opt2
+       rm -f $(TARGET_HOME)/man/em_opt.6
+       cp $(SRC_DIR)/em_opt.6 $(TARGET_HOME)/man/em_opt.6
+
+pattern.c:     $(SRC_DIR)/patterns mktab
+       $(CPP) $(SRC_DIR)/patterns | mktab > pattern.c
+
+mktab: mktab.$(USUF) $(ULIBS)
+       $(UCC) $(ULDFLAGS) mktab.$(USUF) $(ULIBS) -o mktab
+
+mktab.$(USUF): scan.c $(SRC_DIR)/optim.h $(SRC_DIR)/param.h $(SRC_DIR)/pattern.h $(SRC_DIR)/types.h mktab.c
+       $(UCC) -c $(UCFLAGS) mktab.c
+
+mktab.c:       $(SRC_DIR)/mktab.y
+       yacc $(SRC_DIR)/mktab.y && mv y.tab.c mktab.c
+
+pop_push.c pop_push.h: $(SRC_HOME)/etc/em_table $(SRC_DIR)/pop_push.awk
+       awk -f $(SRC_DIR)/pop_push.awk < $(SRC_HOME)/etc/em_table > pop_push.c
+
+regglob.c:     $(SRC_DIR)/reg.c
+       echo '#define GLOBAL_OPT' > regglob.c
+       cat $(SRC_DIR)/reg.c >> regglob.c
+
+regnoglob.c:   $(SRC_DIR)/reg.c
+       cp $(SRC_DIR)/reg.c regnoglob.c
+
+depend: pattern.c pop_push.c regglob.c regnoglob.c
+       sed '/^#DEPENDENCIES/,$$d' Makefile >Makefile.new
+       echo '#DEPENDENCIES' >>Makefile.new
+       for i in $(CFILES) pattern.c regglob.c regnoglob.c ; do \
+               echo "`basename $$i .c`.$$(SUF):        $$i" >> Makefile.new ; \
+               echo '  $$(CC) -c $$(CFLAGS)' $$i >> Makefile.new ; \
+               $(UTIL_HOME)/lib.bin/cpp -d $(INCLUDES) $$i | sed "s/^/`basename $$i .c`.$$(SUF):       /" >> Makefile.new ; \
+       done
+       mv Makefile Makefile.old
+       mv Makefile.new Makefile
+
+lint:  $(CFILES) pattern.c
+       $(LINT) $(LINTFLAGS) $(CFILES) pattern.c $(UTIL_HOME)/lib.bin/$(LINTPREF)em_data.$(LINTSUF)
+
+opr:
+       make pr | opr
+
+pr:
+       @pr -n $(SRC_DIR)/proto.make $(SRC_DIR)/*.h $(CFILES) $(SRC_DIR)/mktab.y $(SRC_DIR)/scan.l $(SRC_DIR)/patterns
+
+clean:
+       rm -f *.$(SUF) opt mktab mktab.c scan.c pattern.c opt2 Out \
+               pop_push.c pop_push.h regglob.c regnoglob.c *.old
+
+scan.c:        $(SRC_DIR)/scan.l
+       flex -st $(SRC_DIR)/scan.l > scan.c
+
+# the next lines are generated automatically
+#DEPENDENCIES
+main.$(SUF):   $(SRC_DIR)/main.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/main.c
+main.$(SUF):   $(SRC_DIR)/ext.h
+main.$(SUF):   $(TARGET_HOME)/h/em_spec.h
+main.$(SUF):   $(SRC_DIR)/alloc.h
+main.$(SUF):   $(SRC_DIR)/tes.h
+main.$(SUF):   $(SRC_DIR)/types.h
+main.$(SUF):   $(SRC_DIR)/param.h
+getline.$(SUF):        $(SRC_DIR)/getline.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/getline.c
+getline.$(SUF):        $(SRC_DIR)/ext.h
+getline.$(SUF):        $(TARGET_HOME)/h/em_mes.h
+getline.$(SUF):        $(TARGET_HOME)/h/em_flag.h
+getline.$(SUF):        $(TARGET_HOME)/h/em_pseu.h
+getline.$(SUF):        $(TARGET_HOME)/h/em_spec.h
+getline.$(SUF):        $(SRC_DIR)/proinf.h
+getline.$(SUF):        $(SRC_DIR)/alloc.h
+getline.$(SUF):        $(SRC_DIR)/lookup.h
+getline.$(SUF):        $(SRC_DIR)/line.h
+getline.$(SUF):        $(SRC_DIR)/tes.h
+getline.$(SUF):        $(SRC_DIR)/types.h
+getline.$(SUF):        $(SRC_DIR)/param.h
+lookup.$(SUF): $(SRC_DIR)/lookup.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/lookup.c
+lookup.$(SUF): $(SRC_DIR)/proinf.h
+lookup.$(SUF): $(SRC_DIR)/alloc.h
+lookup.$(SUF): $(SRC_DIR)/lookup.h
+lookup.$(SUF): $(SRC_DIR)/tes.h
+lookup.$(SUF): $(SRC_DIR)/types.h
+lookup.$(SUF): $(SRC_DIR)/param.h
+var.$(SUF):    $(SRC_DIR)/var.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/var.c
+var.$(SUF):    $(SRC_DIR)/proinf.h
+var.$(SUF):    $(SRC_DIR)/lookup.h
+var.$(SUF):    $(SRC_DIR)/tes.h
+var.$(SUF):    $(SRC_DIR)/types.h
+var.$(SUF):    $(SRC_DIR)/param.h
+process.$(SUF):        $(SRC_DIR)/process.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/process.c
+process.$(SUF):        $(SRC_DIR)/ext.h
+process.$(SUF):        $(SRC_DIR)/proinf.h
+process.$(SUF):        $(SRC_DIR)/lookup.h
+process.$(SUF):        $(SRC_DIR)/line.h
+process.$(SUF):        $(SRC_DIR)/alloc.h
+process.$(SUF):        $(TARGET_HOME)/h/em_pseu.h
+process.$(SUF):        $(TARGET_HOME)/h/em_spec.h
+process.$(SUF):        $(SRC_DIR)/assert.h
+process.$(SUF):        $(SRC_DIR)/tes.h
+process.$(SUF):        $(SRC_DIR)/types.h
+process.$(SUF):        $(SRC_DIR)/param.h
+backward.$(SUF):       $(SRC_DIR)/backward.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/backward.c
+backward.$(SUF):       $(SRC_DIR)/ext.h
+backward.$(SUF):       $(TARGET_HOME)/h/em_mes.h
+backward.$(SUF):       $(TARGET_HOME)/h/em_mnem.h
+backward.$(SUF):       $(TARGET_HOME)/h/em_pseu.h
+backward.$(SUF):       $(TARGET_HOME)/h/em_spec.h
+backward.$(SUF):       $(SRC_DIR)/proinf.h
+backward.$(SUF):       $(SRC_DIR)/alloc.h
+backward.$(SUF):       $(SRC_DIR)/lookup.h
+backward.$(SUF):       $(SRC_DIR)/line.h
+backward.$(SUF):       $(SRC_DIR)/assert.h
+backward.$(SUF):       $(SRC_DIR)/tes.h
+backward.$(SUF):       $(SRC_DIR)/types.h
+backward.$(SUF):       $(SRC_DIR)/param.h
+util.$(SUF):   $(SRC_DIR)/util.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/util.c
+util.$(SUF):   $(SRC_DIR)/ext.h
+util.$(SUF):   $(SRC_DIR)/optim.h
+util.$(SUF):   $(SRC_DIR)/proinf.h
+util.$(SUF):   $(SRC_DIR)/lookup.h
+util.$(SUF):   $(SRC_DIR)/assert.h
+util.$(SUF):   $(SRC_DIR)/tes.h
+util.$(SUF):   $(SRC_DIR)/types.h
+util.$(SUF):   $(SRC_DIR)/param.h
+alloc.$(SUF):  $(SRC_DIR)/alloc.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/alloc.c
+alloc.$(SUF):  $(SRC_DIR)/proinf.h
+alloc.$(SUF):  $(SRC_DIR)/lookup.h
+alloc.$(SUF):  $(SRC_DIR)/line.h
+alloc.$(SUF):  $(SRC_DIR)/alloc.h
+alloc.$(SUF):  $(SRC_DIR)/assert.h
+alloc.$(SUF):  $(SRC_DIR)/tes.h
+alloc.$(SUF):  $(SRC_DIR)/types.h
+alloc.$(SUF):  $(SRC_DIR)/param.h
+putline.$(SUF):        $(SRC_DIR)/putline.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/putline.c
+putline.$(SUF):        $(SRC_DIR)/ext.h
+putline.$(SUF):        $(SRC_DIR)/optim.h
+putline.$(SUF):        $(SRC_DIR)/proinf.h
+putline.$(SUF):        $(SRC_DIR)/lookup.h
+putline.$(SUF):        $(SRC_DIR)/line.h
+putline.$(SUF):        $(SRC_DIR)/alloc.h
+putline.$(SUF):        $(TARGET_HOME)/h/em_flag.h
+putline.$(SUF):        $(TARGET_HOME)/h/em_mnem.h
+putline.$(SUF):        $(TARGET_HOME)/h/em_pseu.h
+putline.$(SUF):        $(TARGET_HOME)/h/em_spec.h
+putline.$(SUF):        $(SRC_DIR)/assert.h
+putline.$(SUF):        $(SRC_DIR)/tes.h
+putline.$(SUF):        $(SRC_DIR)/types.h
+putline.$(SUF):        $(SRC_DIR)/param.h
+cleanup.$(SUF):        $(SRC_DIR)/cleanup.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/cleanup.c
+cleanup.$(SUF):        $(SRC_DIR)/ext.h
+cleanup.$(SUF):        $(SRC_DIR)/lookup.h
+cleanup.$(SUF):        $(TARGET_HOME)/h/em_mes.h
+cleanup.$(SUF):        $(TARGET_HOME)/h/em_spec.h
+cleanup.$(SUF):        $(TARGET_HOME)/h/em_pseu.h
+cleanup.$(SUF):        $(SRC_DIR)/assert.h
+cleanup.$(SUF):        $(SRC_DIR)/types.h
+cleanup.$(SUF):        $(SRC_DIR)/param.h
+peephole.$(SUF):       $(SRC_DIR)/peephole.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/peephole.c
+peephole.$(SUF):       $(SRC_DIR)/ext.h
+peephole.$(SUF):       $(SRC_DIR)/optim.h
+peephole.$(SUF):       $(TARGET_HOME)/h/em_mnem.h
+peephole.$(SUF):       $(TARGET_HOME)/h/em_spec.h
+peephole.$(SUF):       $(SRC_DIR)/pattern.h
+peephole.$(SUF):       $(SRC_DIR)/alloc.h
+peephole.$(SUF):       $(SRC_DIR)/proinf.h
+peephole.$(SUF):       $(SRC_DIR)/lookup.h
+peephole.$(SUF):       $(SRC_DIR)/line.h
+peephole.$(SUF):       $(SRC_DIR)/assert.h
+peephole.$(SUF):       $(SRC_DIR)/tes.h
+peephole.$(SUF):       $(SRC_DIR)/types.h
+peephole.$(SUF):       $(SRC_DIR)/param.h
+flow.$(SUF):   $(SRC_DIR)/flow.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/flow.c
+flow.$(SUF):   $(SRC_DIR)/ext.h
+flow.$(SUF):   $(SRC_DIR)/optim.h
+flow.$(SUF):   $(SRC_DIR)/proinf.h
+flow.$(SUF):   $(SRC_DIR)/line.h
+flow.$(SUF):   $(SRC_DIR)/alloc.h
+flow.$(SUF):   $(TARGET_HOME)/h/em_mnem.h
+flow.$(SUF):   $(TARGET_HOME)/h/em_spec.h
+flow.$(SUF):   $(TARGET_HOME)/h/em_flag.h
+flow.$(SUF):   $(SRC_DIR)/tes.h
+flow.$(SUF):   $(SRC_DIR)/types.h
+flow.$(SUF):   $(SRC_DIR)/param.h
+reg.$(SUF):    $(SRC_DIR)/reg.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/reg.c
+reg.$(SUF):    $(SRC_DIR)/ext.h
+reg.$(SUF):    $(TARGET_HOME)/h/em_mes.h
+reg.$(SUF):    $(TARGET_HOME)/h/em_pseu.h
+reg.$(SUF):    $(TARGET_HOME)/h/em_spec.h
+reg.$(SUF):    $(SRC_DIR)/alloc.h
+reg.$(SUF):    $(SRC_DIR)/proinf.h
+reg.$(SUF):    $(SRC_DIR)/tes.h
+reg.$(SUF):    $(SRC_DIR)/line.h
+reg.$(SUF):    $(SRC_DIR)/types.h
+reg.$(SUF):    $(SRC_DIR)/param.h
+reg.$(SUF):    $(SRC_DIR)/assert.h
+tes.$(SUF):    $(SRC_DIR)/tes.c
+       $(CC) -c $(CFLAGS) $(SRC_DIR)/tes.c
+tes.$(SUF):    ./pop_push.h
+tes.$(SUF):    $(SRC_DIR)/ext.h
+tes.$(SUF):    $(SRC_DIR)/line.h
+tes.$(SUF):    $(SRC_DIR)/proinf.h
+tes.$(SUF):    $(SRC_DIR)/alloc.h
+tes.$(SUF):    $(SRC_DIR)/tes.h
+tes.$(SUF):    $(SRC_DIR)/types.h
+tes.$(SUF):    $(SRC_DIR)/assert.h
+tes.$(SUF):    $(SRC_DIR)/param.h
+tes.$(SUF):    $(TARGET_HOME)/h/em_pseu.h
+tes.$(SUF):    $(TARGET_HOME)/h/em_mnem.h
+tes.$(SUF):    $(TARGET_HOME)/h/em_spec.h
+pop_push.$(SUF):       pop_push.c
+       $(CC) -c $(CFLAGS) pop_push.c
+pop_push.$(SUF):       pop_push.h
+pattern.$(SUF):        pattern.c
+       $(CC) -c $(CFLAGS) pattern.c
+pattern.$(SUF):        $(SRC_DIR)/pattern.h
+pattern.$(SUF):        $(SRC_DIR)/types.h
+pattern.$(SUF):        $(SRC_DIR)/param.h
+regglob.$(SUF):        regglob.c
+       $(CC) -c $(CFLAGS) regglob.c
+regglob.$(SUF):        $(SRC_DIR)/ext.h
+regglob.$(SUF):        $(TARGET_HOME)/h/em_mes.h
+regglob.$(SUF):        $(TARGET_HOME)/h/em_pseu.h
+regglob.$(SUF):        $(TARGET_HOME)/h/em_spec.h
+regglob.$(SUF):        $(SRC_DIR)/alloc.h
+regglob.$(SUF):        $(SRC_DIR)/proinf.h
+regglob.$(SUF):        $(SRC_DIR)/tes.h
+regglob.$(SUF):        $(SRC_DIR)/line.h
+regglob.$(SUF):        $(SRC_DIR)/types.h
+regglob.$(SUF):        $(SRC_DIR)/param.h
+regglob.$(SUF):        $(SRC_DIR)/assert.h
+regnoglob.$(SUF):      regnoglob.c
+       $(CC) -c $(CFLAGS) regnoglob.c
+regnoglob.$(SUF):      $(SRC_DIR)/ext.h
+regnoglob.$(SUF):      $(TARGET_HOME)/h/em_mes.h
+regnoglob.$(SUF):      $(TARGET_HOME)/h/em_pseu.h
+regnoglob.$(SUF):      $(TARGET_HOME)/h/em_spec.h
+regnoglob.$(SUF):      $(SRC_DIR)/alloc.h
+regnoglob.$(SUF):      $(SRC_DIR)/proinf.h
+regnoglob.$(SUF):      $(SRC_DIR)/tes.h
+regnoglob.$(SUF):      $(SRC_DIR)/line.h
+regnoglob.$(SUF):      $(SRC_DIR)/types.h
+regnoglob.$(SUF):      $(SRC_DIR)/param.h
+regnoglob.$(SUF):      $(SRC_DIR)/assert.h