-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.msvc
154 lines (124 loc) · 4.38 KB
/
Makefile.msvc
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# This is an NMAKE-compatible makefile.
# SolveSpace may be built using Microsoft Visual Studio 2003 or newer.
# (MSVC++ 6.0 is not supported.)
# Comment out this line to compile without the SpaceWare input library.
#
HAVE_SPACEWARE_INPUT = 1
DEFINES = \
/D_CRT_SECURE_NO_DEPRECATE \
/D_CRT_SECURE_NO_WARNINGS \
/D_DEBUG \
/D_WIN32_WINNT=0x500 \
/D_WIN32_IE=_WIN32_WINNT \
/DISOLATION_AWARE_ENABLED \
/DWIN32 \
/DWIN32_LEAN_AND_MEAN \
/DPACKAGE_VERSION="\"2.1\""
# We build with /MT for compatibility with the SpaceWare library, and to
# avoid a needless dependency on a C runtime DLL.
#
CXXFLAGS = /nologo /W3 /MT /Isrc /Iextlib\libpng /Iextlib\si /Iextlib\zlib /Zi /EHs # /O2
HEADERS = src\dsc.h \
src\expr.h \
src\polygon.h \
src\sketch.h \
src\solvespace.h \
src\srf\surface.h \
src\ui.h \
src\win32\freeze.h
OBJDIR = obj
W32OBJS = $(OBJDIR)\freeze.obj \
$(OBJDIR)\w32main.obj \
$(OBJDIR)\w32util.obj
SSOBJS = $(OBJDIR)\bsp.obj \
$(OBJDIR)\clipboard.obj \
$(OBJDIR)\confscreen.obj \
$(OBJDIR)\constraint.obj \
$(OBJDIR)\constrainteq.obj \
$(OBJDIR)\describescreen.obj \
$(OBJDIR)\draw.obj \
$(OBJDIR)\drawconstraint.obj \
$(OBJDIR)\drawentity.obj \
$(OBJDIR)\entity.obj \
$(OBJDIR)\export.obj \
$(OBJDIR)\exportstep.obj \
$(OBJDIR)\exportvector.obj \
$(OBJDIR)\expr.obj \
$(OBJDIR)\file.obj \
$(OBJDIR)\generate.obj \
$(OBJDIR)\glhelper.obj \
$(OBJDIR)\graphicswin.obj \
$(OBJDIR)\group.obj \
$(OBJDIR)\groupmesh.obj \
$(OBJDIR)\mesh.obj \
$(OBJDIR)\modify.obj \
$(OBJDIR)\mouse.obj \
$(OBJDIR)\polygon.obj \
$(OBJDIR)\request.obj \
$(OBJDIR)\solvespace.obj \
$(OBJDIR)\style.obj \
$(OBJDIR)\system.obj \
$(OBJDIR)\textscreens.obj \
$(OBJDIR)\textwin.obj \
$(OBJDIR)\toolbar.obj \
$(OBJDIR)\ttf.obj \
$(OBJDIR)\undoredo.obj \
$(OBJDIR)\util.obj \
$(OBJDIR)\view.obj
SRFOBJS = $(OBJDIR)\boolean.obj \
$(OBJDIR)\curve.obj \
$(OBJDIR)\merge.obj \
$(OBJDIR)\ratpoly.obj \
$(OBJDIR)\raycast.obj \
$(OBJDIR)\surface.obj \
$(OBJDIR)\surfinter.obj \
$(OBJDIR)\triangulate.obj
RES = $(OBJDIR)\resource.res
LIBS = user32.lib gdi32.lib comctl32.lib advapi32.lib shell32.lib opengl32.lib glu32.lib \
extlib\libpng\libpng.lib extlib\zlib\zlib.lib
# Note that the Perl scripts require the GD module.
#
#PERL = perl
!IFDEF HAVE_SPACEWARE_INPUT
DEFINES = $(DEFINES) -DHAVE_SPACEWARE_INPUT
LIBS = $(LIBS) extlib\si\siapp.lib
!ENDIF
all: $(OBJDIR)\solvespace.exe
@copy /y $(OBJDIR)\solvespace.exe .
@echo solvespace.exe
clean:
-del /Q obj\*
-rmdir $(OBJDIR)
$(OBJDIR)\solvespace.exe: $(SSOBJS) $(SRFOBJS) $(W32OBJS) $(RES)
$(CXX) $(DEFINES) $(CXXFLAGS) /Fe$(OBJDIR)\solvespace.exe $(SSOBJS) $(SRFOBJS) $(W32OBJS) $(RES) $(LIBS)
editbin /nologo /STACK:8388608 $(OBJDIR)\solvespace.exe
{src}.cpp{$(OBJDIR)}.obj::
@if not exist $(OBJDIR) mkdir $(OBJDIR)
$(CXX) $(CXXFLAGS) $(DEFINES) /c /Fo$(OBJDIR)\ $<
{src\srf}.cpp{$(OBJDIR)}.obj::
@if not exist $(OBJDIR) mkdir $(OBJDIR)
$(CXX) $(CXXFLAGS) $(DEFINES) /c /Fo$(OBJDIR)\ $<
{src\win32}.cpp{$(OBJDIR)}.obj::
@if not exist $(OBJDIR) mkdir $(OBJDIR)
$(CXX) $(CXXFLAGS) $(DEFINES) /c /Fo$(OBJDIR)\ $<
$(RES): src\win32\$(@B).rc src\win32\icon.ico
@if not exist $(OBJDIR) mkdir $(OBJDIR)
$(RC) /fo$@ src\win32\$(@B).rc
$(OBJDIR)\glhelper.obj: src\bitmapextra.table.h src\bitmapfont.table.h src\font.table.h
$(OBJDIR)\textwin.obj: src\icons.h
$(OBJDIR)\toolbar.obj: src\icons.h
!IFDEF PERL
src\icons.h: src\icons\*.png src\png2c.pl
$(PERL) src\png2c.pl $@ src\icons-proto.h src
src\bitmapextra.table.h: src\icons\*.png src\pngchar2c.pl
$(PERL) src\pngchar2c.pl src >$@.tmp
move /y $@.tmp $@
!ELSE IF EXIST(src\built)
src\icons.h: src\built\icons.h src\built\icons-proto.h
copy /y src\built\icons.h $@
copy /y src\built\icons-proto.h src
src\bitmapextra.table.h: src\built\bitmapextra.table.h
copy /y src\built\bitmapextra.table.h $@
src\bitmapfont.table.h: src\built\bitmapfont.table.h
copy /y src\built\bitmapfont.table.h $@
!ENDIF