1# Makefile for GvimExt, using MSVC 2# Options: 3# DEBUG=yes Build debug version (for VC7 and maybe later) 4# CPUARG= /arch:IA32/AVX/etc, call from main makefile to set 5# automatically from CPUNR 6# 7 8TARGETOS = WINNT 9 10!ifndef APPVER 11APPVER = 5.01 12!endif 13 14!if "$(DEBUG)" != "yes" 15NODEBUG = 1 16!endif 17 18!ifdef PROCESSOR_ARCHITECTURE 19# On Windows NT 20! ifndef CPU 21CPU = i386 22! if !defined(PLATFORM) && defined(TARGET_CPU) 23PLATFORM = $(TARGET_CPU) 24! endif 25! ifdef PLATFORM 26! if ("$(PLATFORM)" == "x64") || ("$(PLATFORM)" == "X64") 27CPU = AMD64 28! elseif ("$(PLATFORM)" != "x86") && ("$(PLATFORM)" != "X86") 29! error *** ERROR Unknown target platform "$(PLATFORM)". Make aborted. 30! endif 31! endif 32! endif 33!else 34CPU = i386 35!endif 36 37!ifdef SDK_INCLUDE_DIR 38!include $(SDK_INCLUDE_DIR)\Win32.mak 39!elseif "$(USE_WIN32MAK)"=="yes" 40!include <Win32.mak> 41!else 42cc = cl 43link = link 44rc = rc 45cflags = -nologo -c 46lflags = -incremental:no -nologo 47rcflags = /r 48olelibsdll = ole32.lib uuid.lib oleaut32.lib user32.lib gdi32.lib advapi32.lib 49!endif 50 51# include CPUARG 52cflags = $(cflags) $(CPUARG) 53 54SUBSYSTEM = console 55!if "$(SUBSYSTEM_VER)" != "" 56SUBSYSTEM = $(SUBSYSTEM),$(SUBSYSTEM_VER) 57!endif 58 59all: gvimext.dll 60 61gvimext.dll: gvimext.obj \ 62 gvimext.res 63 $(link) $(lflags) -dll -def:gvimext.def -base:0x1C000000 -out:$*.dll $** $(olelibsdll) shell32.lib comctl32.lib -subsystem:$(SUBSYSTEM) 64 if exist $*.dll.manifest mt -nologo -manifest $*.dll.manifest -outputresource:$*.dll;2 65 66gvimext.obj: gvimext.h 67 68.cpp.obj: 69 $(cc) $(cflags) -DFEAT_GETTEXT $(cvarsmt) $*.cpp 70 71gvimext.res: gvimext.rc 72 $(rc) /nologo $(rcflags) $(rcvars) gvimext.rc 73 74clean: 75 - if exist gvimext.dll del gvimext.dll 76 - if exist gvimext.lib del gvimext.lib 77 - if exist gvimext.exp del gvimext.exp 78 - if exist gvimext.obj del gvimext.obj 79 - if exist gvimext.res del gvimext.res 80 - if exist gvimext.dll.manifest del gvimext.dll.manifest 81