-
Notifications
You must be signed in to change notification settings - Fork 1
/
makefile.mvc
68 lines (46 loc) · 1.21 KB
/
makefile.mvc
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
# -*- makefile -*-
# Makefile for Mi# -*- makefile -*-
# Makefile for Microsoft Windows with Microsoft Visual C++ 5.0 or higher compiler
!IFNDEF DEBUG
DEBUG=1
!ENDIF
GC_OBJS = gc.obj threadctx.obj
GC_INCS = gc.h threadctx.h gcclasses.h
GC_LIB = gc.lib
GC_EXAMPLES = testgc.exe mallocbench.exe
CC = cl
!IF $(DEBUG)
OPTIMIZATION=-Od
MODEL=-MTd
!ELSE
OPTIMIZATION=-Ox
MODEL=-MTd
!ENDIF
CFLAGS = -c -I. -nologo -Zi -W3 -EHsc $(OPTIMIZATION) $(MODEL)
LD = $(CC)
LDFLAGS = -Zi -nologo $(MODEL)
AR = lib
ARFLAGS =
library: $(GC_LIB)
all: library examples
gc.obj: gc.cpp $(GC_INCS)
$(CC) $(CFLAGS) gc.cpp
threadctx.obj: threadctx.cpp $(GC_INCS)
$(CC) $(CFLAGS) threadctx.cpp
$(GC_LIB): $(GC_OBJS)
$(AR) $(ARFLAGS) /OUT:$(GC_LIB) $(GC_OBJS)
examples: $(GC_EXAMPLES)
testgc.exe: testgc.obj $(GC_LIB)
$(LD) $(LDFLAGS) testgc.obj $(GC_LIB)
testgc.obj: samples/testgc.cpp $(GC_INCS)
$(CC) $(CFLAGS) samples/testgc.cpp
mallocbench.exe: mallocbench.obj $(GC_LIB)
$(LD) $(LDFLAGS) mallocbench.obj $(GC_LIB)
mallocbench.obj: samples/mallocbench.cpp $(GC_INCS)
$(CC) $(CFLAGS) samples/mallocbench.cpp
clean:
-del *.odb,*.exp,*.obj,*.pch,*.pdb,*.ilk,*.ncb,*.opt
zip: clean
cd ..
-del cppgc.zip
zip -r cppgc.zip cppgc