# 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: -rmdir /s /q $(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 $@ icons-proto.h src\bitmapextra.table.h: src\icons\*.png src\pngchar2c.pl $(PERL) src/pngchar2c.pl >$@.tmp move /y $@.tmp $@ !ENDIF # PERL