2013-11-13 05:33:23 +00:00
|
|
|
# This is an NMAKE-compatible makefile.
|
2013-08-27 20:44:48 +00:00
|
|
|
# SolveSpace may be built using Microsoft Visual Studio 2003 or newer.
|
|
|
|
# (MSVC++ 6.0 is not supported.)
|
|
|
|
|
2013-11-13 05:33:23 +00:00
|
|
|
# Comment out this line to compile without the SpaceWare input library.
|
|
|
|
#
|
2013-09-20 19:25:14 +00:00
|
|
|
HAVE_SPACEWARE_INPUT = 1
|
|
|
|
|
2013-11-13 05:33:23 +00:00
|
|
|
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.
|
|
|
|
#
|
2013-11-13 07:20:31 +00:00
|
|
|
CXXFLAGS = /nologo /W3 /MT /Isrc /Iextlib\libpng /Iextlib\si /Iextlib\zlib /Zi /EHs # /O2
|
2008-03-25 10:02:13 +00:00
|
|
|
|
2013-11-13 07:20:31 +00:00
|
|
|
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
|
2008-03-25 10:02:13 +00:00
|
|
|
|
2013-11-13 07:20:31 +00:00
|
|
|
OBJDIR = obj
|
2008-03-25 10:02:13 +00:00
|
|
|
|
2013-08-27 20:44:48 +00:00
|
|
|
W32OBJS = $(OBJDIR)\freeze.obj \
|
|
|
|
$(OBJDIR)\w32main.obj \
|
|
|
|
$(OBJDIR)\w32util.obj
|
2008-03-25 10:02:13 +00:00
|
|
|
|
2013-11-13 05:33:23 +00:00
|
|
|
SSOBJS = $(OBJDIR)\bsp.obj \
|
2009-12-04 08:08:41 +00:00
|
|
|
$(OBJDIR)\clipboard.obj \
|
2013-08-27 20:44:48 +00:00
|
|
|
$(OBJDIR)\confscreen.obj \
|
2008-04-14 10:28:32 +00:00
|
|
|
$(OBJDIR)\constraint.obj \
|
2009-01-03 12:31:19 +00:00
|
|
|
$(OBJDIR)\constrainteq.obj \
|
2013-08-27 20:44:48 +00:00
|
|
|
$(OBJDIR)\describescreen.obj \
|
2008-06-06 08:14:37 +00:00
|
|
|
$(OBJDIR)\draw.obj \
|
2008-04-14 10:28:32 +00:00
|
|
|
$(OBJDIR)\drawconstraint.obj \
|
2013-08-27 20:44:48 +00:00
|
|
|
$(OBJDIR)\drawentity.obj \
|
|
|
|
$(OBJDIR)\entity.obj \
|
|
|
|
$(OBJDIR)\export.obj \
|
|
|
|
$(OBJDIR)\exportstep.obj \
|
|
|
|
$(OBJDIR)\exportvector.obj \
|
|
|
|
$(OBJDIR)\expr.obj \
|
2008-04-18 11:11:48 +00:00
|
|
|
$(OBJDIR)\file.obj \
|
2013-08-27 20:44:48 +00:00
|
|
|
$(OBJDIR)\generate.obj \
|
|
|
|
$(OBJDIR)\glhelper.obj \
|
|
|
|
$(OBJDIR)\graphicswin.obj \
|
|
|
|
$(OBJDIR)\group.obj \
|
|
|
|
$(OBJDIR)\groupmesh.obj \
|
2008-05-22 10:28:28 +00:00
|
|
|
$(OBJDIR)\mesh.obj \
|
2013-08-27 20:44:48 +00:00
|
|
|
$(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 \
|
2008-06-30 09:09:17 +00:00
|
|
|
$(OBJDIR)\ttf.obj \
|
2013-08-27 20:44:48 +00:00
|
|
|
$(OBJDIR)\undoredo.obj \
|
|
|
|
$(OBJDIR)\util.obj \
|
|
|
|
$(OBJDIR)\view.obj
|
2008-03-25 10:02:13 +00:00
|
|
|
|
2013-08-27 20:44:48 +00:00
|
|
|
SRFOBJS = $(OBJDIR)\boolean.obj \
|
2009-03-29 06:05:28 +00:00
|
|
|
$(OBJDIR)\curve.obj \
|
2013-08-27 20:44:48 +00:00
|
|
|
$(OBJDIR)\merge.obj \
|
|
|
|
$(OBJDIR)\ratpoly.obj \
|
|
|
|
$(OBJDIR)\raycast.obj \
|
2009-03-29 06:05:28 +00:00
|
|
|
$(OBJDIR)\surface.obj \
|
2009-01-27 07:59:58 +00:00
|
|
|
$(OBJDIR)\surfinter.obj \
|
2013-08-27 20:44:48 +00:00
|
|
|
$(OBJDIR)\triangulate.obj
|
2009-01-15 03:55:42 +00:00
|
|
|
|
2008-07-18 09:50:52 +00:00
|
|
|
RES = $(OBJDIR)\resource.res
|
|
|
|
|
2008-02-09 13:52:01 +00:00
|
|
|
LIBS = user32.lib gdi32.lib comctl32.lib advapi32.lib shell32.lib opengl32.lib glu32.lib \
|
2013-11-13 05:23:06 +00:00
|
|
|
extlib\libpng\libpng.lib extlib\zlib\zlib.lib
|
2008-03-25 10:02:13 +00:00
|
|
|
|
2013-11-13 05:33:23 +00:00
|
|
|
# Note that the Perl scripts require the GD module.
|
|
|
|
#
|
|
|
|
#PERL = perl
|
2013-08-27 20:44:48 +00:00
|
|
|
|
2013-09-20 19:25:14 +00:00
|
|
|
!IFDEF HAVE_SPACEWARE_INPUT
|
|
|
|
DEFINES = $(DEFINES) -DHAVE_SPACEWARE_INPUT
|
|
|
|
LIBS = $(LIBS) extlib\si\siapp.lib
|
|
|
|
!ENDIF
|
|
|
|
|
2013-08-27 20:44:48 +00:00
|
|
|
all: $(OBJDIR)\solvespace.exe
|
|
|
|
@copy /y $(OBJDIR)\solvespace.exe .
|
|
|
|
@echo solvespace.exe
|
2008-03-25 10:02:13 +00:00
|
|
|
|
|
|
|
clean:
|
2013-12-08 08:32:50 +00:00
|
|
|
-del /Q obj\*
|
|
|
|
-rmdir $(OBJDIR)
|
2013-08-27 20:44:48 +00:00
|
|
|
|
|
|
|
$(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
|
2008-03-25 10:02:13 +00:00
|
|
|
|
2013-11-13 07:20:31 +00:00
|
|
|
{src}.cpp{$(OBJDIR)}.obj::
|
|
|
|
@if not exist $(OBJDIR) mkdir $(OBJDIR)
|
2013-08-27 20:44:48 +00:00
|
|
|
$(CXX) $(CXXFLAGS) $(DEFINES) /c /Fo$(OBJDIR)\ $<
|
2008-03-25 10:02:13 +00:00
|
|
|
|
2013-11-13 07:20:31 +00:00
|
|
|
{src\srf}.cpp{$(OBJDIR)}.obj::
|
|
|
|
@if not exist $(OBJDIR) mkdir $(OBJDIR)
|
2013-08-27 20:44:48 +00:00
|
|
|
$(CXX) $(CXXFLAGS) $(DEFINES) /c /Fo$(OBJDIR)\ $<
|
2008-03-25 10:02:13 +00:00
|
|
|
|
2013-11-13 07:20:31 +00:00
|
|
|
{src\win32}.cpp{$(OBJDIR)}.obj::
|
|
|
|
@if not exist $(OBJDIR) mkdir $(OBJDIR)
|
2013-08-27 20:44:48 +00:00
|
|
|
$(CXX) $(CXXFLAGS) $(DEFINES) /c /Fo$(OBJDIR)\ $<
|
2009-01-15 03:55:42 +00:00
|
|
|
|
2013-11-13 07:20:31 +00:00
|
|
|
$(RES): src\win32\$(@B).rc src\win32\icon.ico
|
|
|
|
@if not exist $(OBJDIR) mkdir $(OBJDIR)
|
|
|
|
$(RC) /fo$@ src\win32\$(@B).rc
|
2008-03-25 10:02:13 +00:00
|
|
|
|
2013-11-13 07:20:31 +00:00
|
|
|
$(OBJDIR)\glhelper.obj: src\bitmapextra.table.h src\bitmapfont.table.h src\font.table.h
|
2008-07-18 09:50:52 +00:00
|
|
|
|
2013-11-13 07:20:31 +00:00
|
|
|
$(OBJDIR)\textwin.obj: src\icons.h
|
2010-04-26 07:52:49 +00:00
|
|
|
|
2013-11-13 07:20:31 +00:00
|
|
|
$(OBJDIR)\toolbar.obj: src\icons.h
|
2010-05-09 18:25:23 +00:00
|
|
|
|
2013-11-13 05:33:23 +00:00
|
|
|
!IFDEF PERL
|
|
|
|
|
2013-11-13 07:20:31 +00:00
|
|
|
src\icons.h: src\icons\*.png src\png2c.pl
|
2013-12-08 08:32:50 +00:00
|
|
|
$(PERL) src\png2c.pl $@ src\icons-proto.h src
|
2010-04-26 07:52:49 +00:00
|
|
|
|
2013-11-13 07:20:31 +00:00
|
|
|
src\bitmapextra.table.h: src\icons\*.png src\pngchar2c.pl
|
2013-12-08 08:32:50 +00:00
|
|
|
$(PERL) src\pngchar2c.pl src >$@.tmp
|
2013-11-13 07:20:31 +00:00
|
|
|
move /y $@.tmp $@
|
2009-01-02 10:38:36 +00:00
|
|
|
|
2013-11-17 04:58:29 +00:00
|
|
|
!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
|