-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.vc
47 lines (34 loc) · 1.2 KB
/
Makefile.vc
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
BOINC_BASE = \Work\GitHub\boinc-v2
CPPFLAGS = $(CPPFLAGS) -nologo -c -O1 -GS- -W4
CPPFLAGS = $(CPPFLAGS) -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE
!ifdef VERBOSE
CPPFLAGS = $(CPPFLAGS) -DVERBOSE
!endif
LINKCMD = cl -nologo -Fm -Fe$@ $**
LINKCMD = $(LINKCMD) /link /DYNAMICBASE:NO
# MSVC2010 sets this for 64-bit command prompt. If not, define it on MAKE's command line.
!if "$(PLATFORM)" == "X64"
obj = output_w64
exe = srw_64.exe
BOINC_LIB = $(BOINC_BASE)/win_build/Build/x64/Release
!else
obj = output_w32
exe = srw_32.exe
BOINC_LIB = $(BOINC_BASE)/win_build/Build/Win32/Release
# This will make program built with VC2010 compatible with Windows 2000
EXTRA_OBJ = $(obj)/vc2010_w2k.obj
LINKCMD = $(LINKCMD) /SUBSYSTEM:CONSOLE,5.00
!endif
all: $(obj) $(exe)
$(obj):
md $@
$(exe): $(obj)/wrapper.obj $(EXTRA_OBJ)
$(LINKCMD) $(BOINC_LIB)/libboincapi_staticcrt.LIB $(BOINC_LIB)/libboinc_staticcrt.LIB USER32.LIB ADVAPI32.LIB SHELL32.LIB
$(obj)/wrapper.obj: wrapper.cpp
$(CC) $(CPPFLAGS) -I$(BOINC_BASE)/api -I$(BOINC_BASE)/lib -Fo$@ $**
$(obj)/vc2010_w2k.obj: vc2010_w2k.asm
ml /nologo /c -Fo$@ $**
clean:
-if exist $(obj)\*.obj del $(obj)\*.obj
-if exist *.map del *.map
-if exist *.exe del *.exe