solvespace/Makefile.msvc

113 lines
3.5 KiB
Makefile
Raw Normal View History

# SolveSpace may be built using Microsoft Visual Studio 2003 or newer.
# (MSVC++ 6.0 is not supported.)
HAVE_SPACEWARE_INPUT = 1
Initial Autotools and FLTK support With this commit, SolveSpace gains an Autotools build system and a new platform-dependent backend implemented using the FLTK GUI toolkit. These will allow the application to be built and run on Linux and other Unix-like operating systems, and prospectively, MacOS X. A number of new files have been added: * Makefile.am: Automake makefile template; this contains some experimental support for MinGW and MSVC++ builds that needs further development * ac-aux/ax_fltk.m4: Autoconf M4 macro to locate and query the system's installation of FLTK; this will eventually be contributed to the GNU Autoconf Archive * autogen.sh: Script to bootstrap the Autotools build system, usually for a tree just checked out from source control * configure.ac: Source for the Autoconf configure script; note that this file specifies a version of 2.1, near the top * fltk/fltkmain.cpp: Main FLTK backend implementation * fltk/fltkutil.cpp: Utility functions for the FLTK backend * fltk/xFl_Gl_Window_Group.{H,cxx}: Implementation of a new Fl_Gl_Window_Group widget for FLTK, needed to facilitate drawing FLTK widgets on top of OpenGL graphics as SolveSpace does. This has been submitted to the FLTK project for (hopefully) eventual upstream inclusion: http://www.fltk.org/str.php?L2992 The following minor changes are also a part of this commit: * Makefile.msvc: Define PACKAGE_VERSION=2.1 for the benefit of solvespace.cpp in MSVC++ builds * solvespace.cpp: In the About dialog text, use PACKAGE_VERSION rather than hard-coding the version of the program * solvespace.h: Don't define the C99 integer types if HAVE_C99_INTEGER_TYPES is defined, to facilitate MinGW builds
2013-10-28 05:28:42 +00:00
DEFINES = /D_WIN32_WINNT=0x500 /DISOLATION_AWARE_ENABLED /D_WIN32_IE=0x500 /DWIN32_LEAN_AND_MEAN /DWIN32 /DPACKAGE_VERSION="\"2.1\""
# Use the multi-threaded static libc because libpng and zlib do; not sure if anything bad
# happens if those mix, but don't want to risk it.
CXXFLAGS = /W3 /nologo /MT /D_DEBUG /D_CRT_SECURE_NO_DEPRECATE /D_CRT_SECURE_NO_WARNINGS /I. /Iextlib /Iextlib\libpng /Iextlib\zlib /Zi /EHs # /O2
HEADERS = win32\freeze.h ui.h solvespace.h dsc.h sketch.h expr.h polygon.h srf\surface.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
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\*
$(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
{.}.cpp{$(OBJDIR)}.obj::
$(CXX) $(CXXFLAGS) $(DEFINES) /c /Fo$(OBJDIR)\ $<
{srf}.cpp{$(OBJDIR)}.obj::
$(CXX) $(CXXFLAGS) $(DEFINES) /c /Fo$(OBJDIR)\ $<
{win32}.cpp{$(OBJDIR)}.obj::
$(CXX) $(CXXFLAGS) $(DEFINES) /c /Fo$(OBJDIR)\ $<
$(RES): win32\$(@B).rc icon.ico
$(RC) /fo$@ win32\$(@B).rc
$(OBJDIR)\glhelper.obj: bitmapextra.table.h bitmapfont.table.h font.table.h
$(OBJDIR)\textwin.obj: icons.h
$(OBJDIR)\toolbar.obj: icons.h
icons.h: icons\*.png png2c.pl
$(PERL) png2c.pl $@ icons-proto.h
bitmapextra.table.h: icons\*.png pngchar2c.pl
$(PERL) pngchar2c.pl >tmp.$@
move /y tmp.$@ $@