forked from libxmp/libxmp
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.vc.in
82 lines (71 loc) · 1.84 KB
/
Makefile.vc.in
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Visual Studio makefile for Windows:
# nmake -f Makefile.vc
#
# To disable module depacker functionality:
# nmake -f Makefile.vc USE_DEPACKERS=0
#
# To disable ProWizard:
# nmake -f Makefile.vc USE_PROWIZARD=0
#
# To build the lite version of the library:
# nmake -f Makefile.vc lite
USE_DEPACKERS = 1
USE_PROWIZARD = 1
CC = cl
CFLAGS = /O2 /W3 /MD /Iinclude /DBUILDING_DLL /DWIN32 \
/D_USE_MATH_DEFINES /D_CRT_SECURE_NO_WARNINGS
#CFLAGS = $(CFLAGS) /DDEBUG
LD = link
LDFLAGS = /DLL /RELEASE
DLL = libxmp.dll
DLL_LITE= libxmp-lite.dll
!if $(USE_PROWIZARD)==0
CFLAGS = $(CFLAGS) /DLIBXMP_NO_PROWIZARD
!endif
!if $(USE_DEPACKERS)==0
CFLAGS = $(CFLAGS) /DLIBXMP_NO_DEPACKERS
!endif
OBJS = @OBJS@
PROWIZ_OBJS = @POBJS@
DEPACKER_OBJS = @DOBJS@
ALL_OBJS = $(OBJS)
!if $(USE_PROWIZARD)==1
ALL_OBJS = $(ALL_OBJS) $(PROWIZ_OBJS)
!endif
!if $(USE_DEPACKERS)==1
ALL_OBJS = $(ALL_OBJS) $(DEPACKER_OBJS)
!endif
LITE_OBJS = @LITE_OBJS@
TEST = src\md5.obj test\test.obj
TESTLITE= src\md5.obj test\testlite.obj
.c.obj:
@$(CC) /c /nologo $(CFLAGS) /Fo$*.obj $<
all: $(DLL)
lite: $(DLL_LITE)
# use a temporary response file
$(DLL): $(ALL_OBJS)
$(LD) $(LDFLAGS) /OUT:$(DLL) @<<libxmp.rsp
$(ALL_OBJS)
<<
$(DLL_LITE): $(LITE_OBJS)
$(LD) $(LDFLAGS) /OUT:$(DLL_LITE) @<<libxmplt.rsp
$(LITE_OBJS)
<<
clean:
-del src\*.obj
-del src\loaders\*.obj
-del src\loaders\prowizard\*.obj
-del src\depackers\*.obj
-del src\depackers\lhasa\*.obj
-del src\lite\*.obj
-del test\*.obj
-del test\*.dll test\*.exe
-del *.dll *.lib *.exp
check: $(TEST)
$(LD) /RELEASE /OUT:test\libxmp-test.exe $(TEST) libxmp.lib
copy libxmp.dll test
cd test & libxmp-test
check-lite: $(TESTLITE)
$(LD) /RELEASE /OUT:test\libxmp-lite-test.exe $(TEST) libxmp-lite.lib
copy libxmp-lite.dll test
cd test & libxmp-lite-test