+# msdos versus unix defines
+O = .o
+#PC_O = .obj
+
+X =
+#PC_X = .exe
+
+L =
+#PC_L = -link
+
CC = cc
+#PC_CC = cl
+
+MV = mv
+#PC_MV = rename
+
+RM = rm -f
+#PC_RM= erase
+
+LINT_ARGS =
+#PC_LINT_ARGS = -DLINT_ARGS
+
+DEBUG_FLAGS = -g
+#PC_DEBUG_FLAGS = -Zi -Od
+
+AR = ar
+AR1 = cr
+AR2 =
+AR3 =
+#PC_AR = lib
+#PC_AR1 =
+#PC_AR2 = +
+#PC_AR3 = ";"
+
+RANLIB = ranlib
+#PC_RANLIB = echo "Done with "
+
PRINT = print
-DEFINES =
+DEFINES = ${LINT_ARGS}
INCLUDES = -I.
OPTIMIZE = -O
-OPTIMIZE = -g
+OPTIMIZE = ${DEBUG_FLAGS}
CFLAGS = $(OPTIMIZE) $(INCLUDES) $(DEFINES)
# The source files...
-ALLH = astosc.h ascebc.h disp_asc.h state.h
+ALLH = map3270.ext state.h termin.ext
+
+ALLC = map3270.c mset.c termin.c
+
+# We don't include mset$O here...
+ALLO = map3270$O termin$O
-ALLC = astosc.c map3270.c termin.c asctab.c ebctab.c
+ALLPRINT = default.map ${ALLH} ${ALLC}
-ALLO = astosc.o map3270.o termin.o asctab.o ebctab.o disp_asc.o
+ALLSOURCE = ${ALLPRINT} makefile makefile.mak
.s.o:
/lib/cpp -E $< | as -o $@
-ascii.lib: $(ALLO)
- ar cr ascii.lib $(ALLO)
- ranlib ascii.lib
+.c.obj:
+ ${CC} ${CFLAGS} -c $<
+
+asciilib.a: $(ALLO)
+ ${RM} $@
+ for i in ${ALLO}; do (${AR} ${AR1} $@ ${AR2} $$i${AR3}); done
+ ${RANLIB} $@
clean:
- rm -f $(ALLO) astosc.out disp_asc.out asc_disp.out \
- errs makefile.bak ascii.lib
+ for i in $(ALLO) errs makefile.bak asciilib.a; \
+ do (${RM} $$i); done
+
+sccsclean:
+ -sccs clean
+ -sccs get makefile
+
+sourcelist: ${ALLSOURCE}
+ @for i in ${ALLSOURCE}; \
+ do (echo ${DIRPATH}$$i); done
print:
- ${PRINT} ${ALLH} ${ALLC}
+ ${PRINT} ${ALLPRINT}
tags: ${ALLC} ${ALLH}
ctags -t ${ALLC} ${ALLH}
.DEFAULT:
sccs get $<
-astosc.out: ../ctlr/function.h ../ctlr/hostctlr.h ../ctlr/$(KBD)
- (cd ../tools; make mkastosc $(MFLAGS) )
- -/bin/rm $@
- ../tools/mkastosc < ../ctlr/$(KBD) > $@
-
-asc_disp.out: ../ctlr/ebc_disp.o
- (cd ../tools; make mkastods $(MFLAGS) )
- -/bin/rm $@
- ../tools/mkastods > $@
-
-disp_asc.out: ../ctlr/ebc_disp.o
- (cd ../tools; make mkdstoas $(MFLAGS) )
- -/bin/rm $@
- ../tools/mkdstoas > $@
-
-disp_asc.o: disp_asc.h asc_disp.out disp_asc.out
- -/bin/rm $@ TMPfunc.c
- /bin/echo \#include \"disp_asc.h\" > TMPfunc.c
- /bin/echo \#include \"asc_disp.out\" >> TMPfunc.c
- /bin/echo \#include \"disp_asc.out\" >> TMPfunc.c
- $(CC) $(CFLAGS) -c TMPfunc.c
- -/bin/mv TMPfunc.o $@
-
depend:
grep '^#include' ${ALLC} | grep -v '<' | \
sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' \
- -e 's/\.c/.o/' | \
+ -e 's/\.c/$$O/' | \
awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
else rec = rec " " $$2 } } \
echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
echo '$$r makedep' >>eddep
echo 'w' >>eddep
+ -rm -f makefile.bak
cp makefile makefile.bak
ed - makefile < eddep
rm eddep makedep
# DO NOT DELETE THIS LINE
-astosc.o: ../general/general.h ../ctlr/function.h astosc.h state.h astosc.out
-map3270.o: state.h ../general/globals.h map3270.ext default.map
-termin.o: ../general/general.h ../ctlr/function.h ../ctlr/inbound.ext
-termin.o: ../ctlr/outbound.ext ../telnet.ext termin.ext astosc.h state.h
-termin.o: ../general/globals.h
-asctab.o: ascebc.h
-ebctab.o: ascebc.h
+map3270$O: state.h ../general/globals.h map3270.ext default.map
+mset$O: ../ctlr/function.h state.h ../api/astosc.h ../general/globals.h
+mset$O: map3270.ext
+termin$O: ../general/general.h ../ctlr/function.h ../ctlr/inbound.ext
+termin$O: ../ctlr/outbound.ext ../telnet.ext termin.ext ../api/astosc.h state.h
+termin$O: ../general/globals.h