# 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 OS= " @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