-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
66 lines (56 loc) · 1.35 KB
/
Makefile
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
!IF "$(PLATFORM)"=="X64" || "$(PLATFORM)"=="x64"
ARCH=amd64
!ELSE
ARCH=x86
!ENDIF
OUTDIR=bin\$(ARCH)
OBJDIR=obj\$(ARCH)
SRCDIR=src
CC=cl
RD=rd /s /q
RM=del /q
LINKER=link
TARGET=cr.dll
OBJS=\
$(OBJDIR)\dllmain.obj\
$(OBJDIR)\dom.obj\
$(OBJDIR)\layout.obj\
$(OBJDIR)\object.obj\
$(OBJDIR)\oilpan.obj\
$(OBJDIR)\partitions.obj\
$(OBJDIR)\peimage.obj\
$(OBJDIR)\threadstate.obj\
$(OBJDIR)\typeinfo.obj\
LIBS=\
# warning C4100: unreferenced formal parameter
CFLAGS=\
/nologo\
/Zi\
/c\
/Fo"$(OBJDIR)\\"\
/Fd"$(OBJDIR)\\"\
/Od\
/EHsc\
/W4\
/wd4100\
/D_CRT_SECURE_NO_WARNINGS\
LFLAGS=\
/NOLOGO\
/DEBUG\
/SUBSYSTEM:WINDOWS\
/DLL\
/DEF:$(SRCDIR)\cr.def\
all: $(OUTDIR)\$(TARGET)
$(OUTDIR)\$(TARGET): $(OBJS)
@if not exist $(OUTDIR) mkdir $(OUTDIR)
$(LINKER) $(LFLAGS) $(LIBS) /PDB:"$(@R).pdb" /OUT:"$@" $**
{$(SRCDIR)}.cpp{$(OBJDIR)}.obj:
@if not exist $(OBJDIR) mkdir $(OBJDIR)
$(CC) $(CFLAGS) $<
clean:
@if exist $(OBJDIR) $(RD) $(OBJDIR)
@if exist $(OUTDIR)\$(TARGET) $(RM) $(OUTDIR)\$(TARGET)
@if exist $(OUTDIR)\$(TARGET:dll=pdb) $(RM) $(OUTDIR)\$(TARGET:dll=pdb)
@if exist $(OUTDIR)\$(TARGET:dll=lib) $(RM) $(OUTDIR)\$(TARGET:dll=lib)
@if exist $(OUTDIR)\$(TARGET:dll=exp) $(RM) $(OUTDIR)\$(TARGET:dll=exp)
@if exist $(OUTDIR)\$(TARGET:dll=ilk) $(RM) $(OUTDIR)\$(TARGET:dll=ilk)