forked from romses/mod_vstatus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.win
68 lines (57 loc) · 1.89 KB
/
Makefile.win
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
##----------------------------------------------------------------------------
# Created with genmake.pl v1.1 on Sun Aug 20 00:39:43 2017
# genmake.pl home: http://muquit.com/muquit/software/
# Copryright: GNU GPL (http://www.gnu.org/copyleft/gpl.html)
##----------------------------------------------------------------------------
!IF "$(APACHE)" == ""
!MESSAGE Usage
!MESSAGE ------------------------------------------------------------
!MESSAGE example:
!MESSAGE nmake /f makefile.win APACHE=\path\to\Apache VC=9 ARCH=x64
!MESSAGE
!MESSAGE Arguments
!MESSAGE
!MESSAGE APACHE (required)
!MESSAGE ARCH (optional) defaults to x86
!MESSAGE VC (optional) defaults to C89 code (VC<14)
!MESSAGE BRANDING (optional) Adds "Win32 Binary by Distro Name"
!MESSAGE to files VersionInfo (Win64 on x64 builds)
!MESSAGE
!ERROR
!ENDIF
CC= cl
LINKER=link -nologo
RC=rc
MT=mt /nologo
LIBRARY= mod_vstatus.so
SRCS = mod_vstatus.c
RSRC = mod_vstatus.rc
RRES = mod_vstatus.res
OBJS = mod_vstatus.obj
!IF "$(BRANDING)" == ""
# Do nothing
!ELSE
BRAND = -D_BRANDING="$(BRANDING)"
!ENDIF
!IF ("$(ARCH)" == "x64" || "$(ARCH)" == "X64" )
CFLAGS= /nologo /O2 /MD /W3 -DWIN32 -D_WIN32 -D_WIN64 /c
ARCH=X64
RCVARS=-D_WIN64 $(BRAND)
!ELSE
ARCH=X86
CFLAGS= /nologo /O2 /MD /W3 -DWIN32 -D_WIN32 /c
RCVARS=-D_WIN32 $(BRAND)
!ENDIF
RCVARS=-r $(RCVARS) $(RSRC)
DEFINES= -I. -I$(APACHE)\include $(CFLAGS)
DEPS = kernel32.lib $(RRES) libhttpd.lib libapr-1.lib libaprutil-1.lib /libpath:$(APACHE)\lib
all: obj dll
obj:
$(CC) $(DEFINES) -c $(SRCS)
$(RC) $(RCVARS)
dll:
$(LINKER) /dll $(DEPS) /manifest /OUT:$(LIBRARY) $(OBJS)
!IF EXIST $(LIBRARY).manifest $(MT) -manifest $(LIBRARY).manifest \
-outputresource:$(LIBRARY);2
clean:
del $(OBJS) $(LIBRARY) $(RRES) *.lib *.exp *.manifest