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)" == "arm64") || ("$(PLATFORM)" == "ARM64") 29CPU = ARM64 30! elseif ("$(PLATFORM)" != "x86") && ("$(PLATFORM)" != "X86") 31! error *** ERROR Unknown target platform "$(PLATFORM)". Make aborted. 32! endif 33! endif 34! endif 35!else 36CPU = i386 37!endif 38 39!ifdef SDK_INCLUDE_DIR 40!include $(SDK_INCLUDE_DIR)\Win32.mak 41!elseif "$(USE_WIN32MAK)"=="yes" 42!include <Win32.mak> 43!else 44cc = cl 45link = link 46rc = rc 47cflags = -nologo -c 48lflags = -incremental:no -nologo 49rcflags = /r 50olelibsdll = ole32.lib uuid.lib oleaut32.lib user32.lib gdi32.lib advapi32.lib 51!endif 52 53# include CPUARG 54cflags = $(cflags) $(CPUARG) 55 56SUBSYSTEM = console 57!if "$(SUBSYSTEM_VER)" != "" 58SUBSYSTEM = $(SUBSYSTEM),$(SUBSYSTEM_VER) 59!endif 60 61!if "$(CPU)" == "AMD64" || "$(CPU)" == "ARM64" 62OFFSET = 0x11C000000 63!else 64OFFSET = 0x1C000000 65!endif 66 67all: gvimext.dll 68 69gvimext.dll: gvimext.obj \ 70 gvimext.res 71 $(link) $(lflags) -dll -def:gvimext.def -base:$(OFFSET) -out:$*.dll $** $(olelibsdll) shell32.lib comctl32.lib -subsystem:$(SUBSYSTEM) 72 if exist $*.dll.manifest mt -nologo -manifest $*.dll.manifest -outputresource:$*.dll;2 73 74gvimext.obj: gvimext.h 75 76.cpp.obj: 77 $(cc) $(cflags) -DFEAT_GETTEXT $(cvarsmt) $*.cpp 78 79gvimext.res: gvimext.rc 80 $(rc) /nologo $(rcflags) $(rcvars) gvimext.rc 81 82clean: 83 - if exist gvimext.dll del gvimext.dll 84 - if exist gvimext.lib del gvimext.lib 85 - if exist gvimext.exp del gvimext.exp 86 - if exist gvimext.obj del gvimext.obj 87 - if exist gvimext.res del gvimext.res 88 - if exist gvimext.dll.manifest del gvimext.dll.manifest 89