xref: /vim-8.2.3635/src/GvimExt/Makefile (revision e16b00a1)
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
54all: gvimext.dll
55
56gvimext.dll:    gvimext.obj	\
57		gvimext.res
58# $(implib) /NOLOGO -machine:$(CPU) -def:gvimext.def $** -out:gvimext.lib
59# $(link) $(dlllflags) -base:0x1C000000 -out:$*.dll $** $(olelibsdll) shell32.lib gvimext.lib comctl32.lib gvimext.exp
60  $(link) $(lflags) -dll -def:gvimext.def -base:0x1C000000 -out:$*.dll $** $(olelibsdll) shell32.lib comctl32.lib
61  if exist $*.dll.manifest mt -nologo -manifest $*.dll.manifest -outputresource:$*.dll;2
62
63gvimext.obj: gvimext.h
64
65.cpp.obj:
66	$(cc) $(cflags) -DFEAT_GETTEXT $(cvarsmt) $*.cpp
67
68gvimext.res: gvimext.rc
69	$(rc) /nologo $(rcflags) $(rcvars)  gvimext.rc
70
71clean:
72	- if exist gvimext.dll del gvimext.dll
73	- if exist gvimext.lib del gvimext.lib
74	- if exist gvimext.exp del gvimext.exp
75	- if exist gvimext.obj del gvimext.obj
76	- if exist gvimext.res del gvimext.res
77	- if exist gvimext.dll.manifest del gvimext.dll.manifest
78