# # makefile for vile filters on WIN32 using Microsoft Visual C++ # # $Header: /usr/build/vile/vile/filters/RCS/makefile.wnt,v 1.30 2002/06/30 21:28:26 tom Exp $ # # !include # remove the "#" to get debugging info (and a larger executable) CC_DEBUG = #$(cdebug) LD_DEBUG = #$(ldebug) LEX_OUTPUT_ROOT = lex.yy x = .exe o = .obj # Other vars CON_LDFLAGS = -nologo -pdb:none UTILS = \ vile-crypt$x \ vile-manfilt$x SCRIPTS = \ filters.rc CFLAGS = $(cvarsmt) $(CC_DEBUG) -nologo -DWIN32_LEAN_AND_MEAN -G4 -I. -I.. TMPINCS = \ genmake.exe \ mk-1st.tmp \ mk-2nd.tmp MAKEDEPS = $(TMPINCS) makefile.wnt GENDEPS = makefile.wnt genmake.exe genmake.mak !if "$(RECUR_FILTERS)" == "" # list these on separate lines, otherwise nmake does the last only. all :: $(TMPINCS) dist :: $(TMPINCS) install :: $(TMPINCS) uninstall :: $(TMPINCS) !if "$(FLT)" == "" mk-1st.tmp : $(GENDEPS) mk-1st.bat mk-1st.bat genmake.mak extern $@ mk-2nd.tmp : $(GENDEPS) mk-2nd.bat mk-2nd.bat genmake.mak extern $@ !else mk-1st.tmp : $(GENDEPS) mk-1st.bat mk-1st.bat genmake.mak intern $@ mk-2nd.tmp : $(GENDEPS) mk-2nd.bat mk-2nd.bat genmake.mak intern $@ !endif RECUR_OPTS = RECUR_FILTERS=yes FLT=$(FLT) LEX=$(LEX) -f makefile.wnt $@ -$(MAKEFLAGS) all :: $(MAKE) $(RECUR_OPTS) dist :: $(MAKE) $(RECUR_OPTS) install :: $(MAKE) $(RECUR_OPTS) uninstall :: $(MAKE) $(RECUR_OPTS) !else !include mk-1st.tmp !if "$(FLT)" == "" UTILS = $(UTILS) $(ALL_C) $(ALL_LEX) !else FLTLIB = builtflt.lib FLTOBJ = $(OBJ_C) filters$o !if "$(LEX)" != "" FLTOBJ = $(FLTOBJ) $(OBJ_LEX) !endif all :: genmake.exe genmake.exe: genmake.c $(cc) $(CFLAGS) genmake.c -Fogenmake -link $(CON_LDFLAGS) all :: $(FLTOBJ) $(FLTLIB) $(FLTLIB) : $(MAKEDEPS) $(FLTOBJ) lib -out:$@ @<< $(FLTOBJ) << !endif all :: $(UTILS) dist :: $(UTILS) $(SCRIPTS) - del *.zip zip filters.zip $(UTILS) $(SCRIPTS) dist :: $(KEYS) !copy $** $**words && zip filters.zip $**words && del $**words !if "$(VILE_LIBDIR_PATH)" == "" install :: @ echo Sorry, you have not set VILE_LIBDIR_PATH !else if !exist("$(VILE_LIBDIR_PATH)") install :: $(UTILS) @echo Sorry, these are installed only if VILE_LIBDIR_PATH is a single directory !@echo " $**" !else install :: $(UTILS) echo installing $(UTILS) in $(VILE_LIBDIR_PATH) !copy $** "$(VILE_LIBDIR_PATH)"\$** uninstall :: $(UTILS) echo uninstalling $(UTILS) in $(VILE_LIBDIR_PATH) !erase "$(VILE_LIBDIR_PATH)"\$** !endif !if "$(VILE_STARTUP_PATH)" == "" install :: @echo Sorry, you have not set VILE_STARTUP_PATH !else if !exist("$(VILE_STARTUP_PATH)") install :: $(SCRIPTS) $(KEYS) @echo Sorry, these are installed only if VILE_STARTUP_PATH is a single directory !@echo " $**" !else install :: $(SCRIPTS) echo installing $(SCRIPTS) in $(VILE_STARTUP_PATH) !copy $** "$(VILE_STARTUP_PATH)"\$** uninstall :: $(SCRIPTS) echo uninstalling $(SCRIPTS) in $(VILE_STARTUP_PATH) !erase "$(VILE_STARTUP_PATH)"\$** install :: $(KEYS) echo installing $(KEYS) in $(VILE_STARTUP_PATH) !copy $** "$(VILE_STARTUP_PATH)"\$**words uninstall :: $(KEYS) echo uninstalling $(KEYS) in $(VILE_STARTUP_PATH) !erase "$(VILE_STARTUP_PATH)"\$**words !endif .SUFFIXES: .c .l $o .l$o: $(LEX) $< $(CC) -c $(CPPFLAGS) $(CFLAGS) $(LEX_OUTPUT_ROOT).c -Fo$@ - erase $(LEX_OUTPUT_ROOT).c .c$o: $(cc) $(CFLAGS) -c $< -Fo$@ LF_DEPS = filterio$o filters$o LF_ARGS = $(LF_DEPS) $(LEXLIB) CF_DEPS = filterio$o filters$o CF_ARGS = $(CF_DEPS) !include mk-2nd.tmp vile-crypt$x : ecrypt$o $(link) -out:$@ $(CON_LDFLAGS) ecrypt$o vile-manfilt$x : manfilt$o $(link) -out:$@ $(CON_LDFLAGS) manfilt$o !endif # "$(RECUR_FILTERS)" == "" clean: - del lex.*.c - del *.bak - del *.tmp - del *$x - del *$o - del *.lib distclean: clean - del *.zip