summaryrefslogtreecommitdiff
path: root/web/c_cpp/c2cweb/cweb/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'web/c_cpp/c2cweb/cweb/Makefile')
-rw-r--r--web/c_cpp/c2cweb/cweb/Makefile106
1 files changed, 106 insertions, 0 deletions
diff --git a/web/c_cpp/c2cweb/cweb/Makefile b/web/c_cpp/c2cweb/cweb/Makefile
new file mode 100644
index 0000000000..68d0ca8e18
--- /dev/null
+++ b/web/c_cpp/c2cweb/cweb/Makefile
@@ -0,0 +1,106 @@
+# This file is part of the c2cweb package Version 1.5 (10-Nov-1996)
+
+# GNU Makefile for c2cweb's version of CWEAVE
+
+
+.PHONY: default all debug clean \
+ cweb
+.CAUTIOUS: common.c cweave.c
+
+
+default:
+ @echo " say "
+ @echo ". "
+ @echo " make <TARGET> OS=<SYSTEM> "
+ @echo ". "
+ @echo " SYSTEM can be one of the following: "
+ @echo ". "
+ @echo " unix (gcc) "
+ @echo " os2 bound (emx) "
+ @echo " dos (djgpp) "
+ @echo ". "
+ @echo " TARGET can be one of the following: "
+ @echo ". "
+ @echo " all debug clean "
+
+
+ifdef OS
+
+ ifeq ($(OS),unix)
+ CC = gcc -Wall -O
+ O = .o
+ LIB =
+ EXE =
+ RM = rm -f
+ endif
+
+ ifeq ($(OS),os2)
+ CC = gcc -Wall -Zomf -Zmtd -O
+ O = .obj
+ LIB = cweave.def
+ EXE = .exe
+ RM = del
+ endif
+
+ ifeq ($(OS),dos)
+ CC = gcc -Wall -O
+ O = .o
+ LIB =
+ EXE = .exe
+ RM = del
+ endif
+
+ ifeq ($(OS),bound)
+ CC = gcc -Wall -O
+ O = .o
+ LIB =
+ EXE = .exe
+ RM = del
+ endif
+
+
+ OBJ = common$O cweave$O
+
+
+ %$O: %.c
+ $(CC) $(CFLAGS) -c -o $@ $<
+
+ %.c: %.w %.ch
+ $(CTANGLE) $^ $@
+ %.c: %.w
+ $(CTANGLE) $<
+
+
+ all:
+ $(MAKE) cweb CFLAGS=-s
+
+ debug:
+ $(MAKE) cweb CFLAGS=-g
+
+ # remove the unnecessary files.
+ clean:
+ -$(RM) *$O
+
+
+ cweb: cweave$(EXE)
+
+ cweave$(EXE): $(OBJ)
+ ifeq ($(OS),dos)
+ $(CC) $(CFLAGS) -o $(basename $@) $^
+ strip $(basename $@)
+ coff2exe $(basename $@)
+ -$(RM) $(basename $@)
+ else
+ $(CC) $(CFLAGS) -o $@ $^ $(LIB)
+ endif
+
+ cweave.w: common.h
+ cweave.ch: prod-alt.w
+
+else # ifdef OS
+
+ all debug clean: default
+
+endif
+
+# end of Makefile