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 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924
|
#
# Maverick Model 3D Makefile
#
# GNU Make required
#
# mingw.org's mingw32-make.exe on Windows doesn't have uname
ifdef MINGW32_MAKE
COMPILE_PLATFORM=mingw32
COMPILE_ARCH=x86
else
COMPILE_PLATFORM=$(shell uname|sed -e s/_.*//|tr '[:upper:]' '[:lower:]'|sed -e 's/\//_/g')
COMPILE_ARCH=$(shell uname -m | sed -e s/i.86/x86/)
ifeq ($(COMPILE_PLATFORM),sunos)
# Solaris uname and GNU uname differ
COMPILE_ARCH=$(shell uname -p | sed -e s/i.86/x86/)
endif
endif
#############################################################################
#
# If you require a different configuration from the defaults below, create a
# new file named "Makefile.local" in the same directory as this file and define
# your parameters there. This allows you to change configuration without
# causing problems with keeping up to date with the repository.
#
#############################################################################
-include Makefile.local
ifeq ($(COMPILE_PLATFORM),cygwin)
PLATFORM=mingw32
endif
ifndef PLATFORM
PLATFORM=$(COMPILE_PLATFORM)
endif
export PLATFORM
ifeq ($(PLATFORM),mingw32)
MINGW=1
endif
ifeq ($(PLATFORM),mingw64)
MINGW=1
endif
ifeq ($(COMPILE_ARCH),powerpc)
COMPILE_ARCH=ppc
endif
ifeq ($(COMPILE_ARCH),powerpc64)
COMPILE_ARCH=ppc64
endif
ifndef ARCH
ARCH=$(COMPILE_ARCH)
endif
export ARCH
ifneq ($(PLATFORM),$(COMPILE_PLATFORM))
CROSS_COMPILING=1
else
CROSS_COMPILING=0
ifneq ($(ARCH),$(COMPILE_ARCH))
CROSS_COMPILING=1
endif
endif
export CROSS_COMPILING
ifndef V
V=
endif
ifndef BUILD
BUILD=build
endif
bin_path=$(shell which $(1) 2> /dev/null)
BUILDSUB=${PLATFORM}-${ARCH}
B=${BUILD}/${BUILDSUB}
INSTALL=install
ifdef MINGW32_MAKE
MKDIR=mkdir
else
MKDIR=mkdir -p
endif
#############################################################################
# SETUP AND BUILD -- MINGW
#############################################################################
ifdef MINGW
ifndef QTDIR
ifneq ($(CROSS_COMPILING),1)
QTDIR=C:/Qt/5.11.1/mingw53_32
ifdef MINGW32_MAKE
CC=C:\Qt\Tools\mingw530_32\bin\i686-w64-mingw32-gcc.exe
CXX=C:\Qt\Tools\mingw530_32\bin\i686-w64-mingw32-g++.exe
endif
endif
endif
ifdef QTDIR
ifndef QT_BIN_DIR
QT_BIN_DIR=${QTDIR}/bin
endif
ifndef QT_INCLUDE_DIR
QT_INCLUDE_DIR=${QTDIR}/include
endif
ifndef QT_LIB_DIR
QT_LIB_DIR=${QTDIR}/lib
endif
endif
ifndef QT_BIN_DIR
$(error Need to specify QT_BIN_DIR with native Qt5 executables for uic, moc, rcc, and lrelease)
endif
ifndef QT_INCLUDE_DIR
$(error Need to specify QT_INCLUDE_DIR with MinGW Qt5 headers)
endif
ifndef QT_LIB_DIR
$(error Need to specify QT_LIB_DIR with MinGW Qt5 libs)
endif
ifeq ($(CROSS_COMPILING),1)
# If CC is already set to something generic, we probably want to use
# something more specific
ifneq ($(findstring $(strip $(CC)),cc gcc),)
CC=
endif
ifneq ($(findstring $(strip $(CXX)),g++),)
CXX=
endif
# We need to figure out the correct gcc and windres
ifeq ($(ARCH),x86_64)
MINGW_PREFIXES=x86_64-w64-mingw32 amd64-mingw32msvc
endif
ifeq ($(ARCH),x86)
MINGW_PREFIXES=i686-w64-mingw32 i586-mingw32msvc i686-pc-mingw32
endif
ifndef CC
CC=$(strip $(foreach MINGW_PREFIX, $(MINGW_PREFIXES), \
$(call bin_path, $(MINGW_PREFIX)-gcc)))
endif
ifndef CXX
CXX=$(strip $(foreach MINGW_PREFIX, $(MINGW_PREFIXES), \
$(call bin_path, $(MINGW_PREFIX)-g++)))
endif
ifndef WINDRES
WINDRES=$(strip $(foreach MINGW_PREFIX, $(MINGW_PREFIXES), \
$(call bin_path, $(MINGW_PREFIX)-windres)))
endif
TOOLS_BINEXT=
else
# Some MinGW installations define CC to cc, but don't actually provide cc,
# so check that CC points to a real binary and use gcc if it doesn't
ifeq ($(call bin_path, $(CC)),)
CC=gcc
endif
ifndef CXX
CC=g++
endif
ifndef WINDRES
WINDRES=windres
endif
TOOLS_BINEXT=.exe
endif
ifeq ($(CC),)
$(error Cannot find a suitable cross compiler for $(PLATFORM))
endif
ifdef MINGW32_MAKE
# mingw32 windres needs absolute path to compiler for using as a preprocessor
ifeq ("$(wildcard $(CC))","")
# $(error CC must be absolute path to gcc)
endif
endif
ifndef QT_LIBS
QT_LIBS=-lQt5Core -lQt5Gui -lQt5Widgets -lQt5OpenGL
endif
LINK=-L${QT_LIB_DIR} ${QT_LIBS} -mwindows -lshlwapi -lopengl32 -lglu32 -static-libgcc -static-libstdc++
# Qt5 requires C++11
BASE_FLAGS+=-std=c++11
BASE_FLAGS+=-DWIN32
BINEXT=.${ARCH}.exe
else # ifeq mingw
#############################################################################
# SETUP AND BUILD -- MAC OS X
#############################################################################
ifeq ($(PLATFORM),darwin)
ifndef PREFIX
PREFIX=/usr/local
endif
ifndef QTDIR
QTDIR=/usr/local/Cellar/qt/5.11.1
endif
ifndef QT_BIN_DIR
QT_BIN_DIR=${QTDIR}/bin
endif
ifndef QT_INCLUDE_DIR
QT_INCLUDE_DIR=${QTDIR}/include
endif
ifndef QT_LIB_DIR
QT_LIB_DIR=${QTDIR}/lib
endif
ifndef QT_FRAMEWORKS_DIR
QT_FRAMEWORKS_DIR=${QTDIR}/Frameworks
endif
ifndef QT_LIBS
QT_LIBS=-framework QtCore -framework QtGui -framework QtWidgets -framework QtOpenGL
endif
LINK=-F${QT_FRAMEWORKS_DIR} -L${QT_LIB_DIR} ${QT_LIBS} -framework OpenGl
# Qt5 requires C++11
BASE_FLAGS+=-std=c++11 -stdlib=libc++
ifeq ($(ARCH),x86)
BASE_FLAGS += -m32
endif
BASE_FLAGS += -DPREFIX="\"$(PREFIX)\"" -DIS_OSX
BINEXT=.${ARCH}
TOOLS_BINEXT=
else # ifeq darwin
#############################################################################
# SETUP AND BUILD -- LINUX
#############################################################################
ifndef PREFIX
PREFIX=/usr/local
endif
ifdef QTDIR
ifndef QT_BIN_DIR
QT_BIN_DIR=${QTDIR}/bin
endif
ifndef QT_INCLUDE_DIR
QT_INCLUDE_DIR=${QTDIR}/include
endif
ifndef QT_LIB_DIR
QT_LIB_DIR=${QTDIR}/lib
endif
else
ifndef QT_BIN_DIR
ifeq ($(ARCH),x86)
QT_BIN_DIR=/usr/lib/i386-linux-gnu/qt5/bin
else
QT_BIN_DIR=/usr/lib/$(ARCH)-linux-gnu/qt5/bin
endif
endif
ifndef QT_INCLUDE_DIR
ifeq ($(ARCH),x86)
QT_INCLUDE_DIR=/usr/include/i386-linux-gnu/qt5
else
QT_INCLUDE_DIR=/usr/include/$(ARCH)-linux-gnu/qt5
endif
endif
ifndef QT_LIB_DIR
ifeq ($(ARCH),x86)
QT_LIB_DIR=/usr/lib/i386-linux-gnu
else
QT_LIB_DIR=/usr/lib/$(ARCH)-linux-gnu
endif
endif
endif
ifndef QT_LIBS
QT_LIBS=-lQt5Core -lQt5Gui -lQt5Widgets -lQt5OpenGL
endif
LINK=-L${QT_LIB_DIR} ${QT_LIBS} -lGLU -lGL -ldl
ifeq ($(ARCH),x86)
# linux32 make ...
BASE_FLAGS += -m32
else
ifeq ($(ARCH),ppc64)
BASE_FLAGS += -m64
endif
endif
BASE_FLAGS += -DPREFIX="\"$(PREFIX)\""
BINEXT=.${ARCH}
TOOLS_BINEXT=
endif # darwin
endif # mingw
ifndef QT_BIN_DIR
$(error QT_BIN_DIR is not set)
endif
ifndef QT_INCLUDE_DIR
$(error QT_INCLUDE_DIR is not set)
endif
ifndef UIC
UIC=${QT_BIN_DIR}/uic${TOOLS_BINEXT}
endif
ifndef MOC
MOC=${QT_BIN_DIR}/moc${TOOLS_BINEXT}
endif
ifndef RCC
RCC=${QT_BIN_DIR}/rcc${TOOLS_BINEXT}
endif
ifndef LRELEASE
LRELEASE=${QT_BIN_DIR}/lrelease${TOOLS_BINEXT}
endif
ifndef WINDEPLOYQT
WINDEPLOYQT=${QT_BIN_DIR}/windeployqt${TOOLS_BINEXT}
endif
# Use debug or release cflags
#CXXFLAGS=-Wall -g -ggdb
CXXFLAGS=-O2 -s
CXXFLAGS+=${BASE_FLAGS} -fno-math-errno -I${QT_INCLUDE_DIR} -DMM3D_EDIT -I. -I./src -I./src/libmm3d -I./src/mm3dcore -I./src/depui -I./src/qtui -I./src/implui -I./src/commands -I./src/tools -I${B}/depui -I${B}/qtui -I${B}/implui -I${B}/commands
ifndef MINGW
# not for mingw because warning: -fPIC ignored for target (all code is position independent)
CXXFLAGS+=-fPIC
endif
DEFS=
BIN=${B}
LIB_OBJ= \
${B}/libmm3d/bsptree.o \
${B}/libmm3d/cal3dfilter.o \
${B}/libmm3d/cmdlinemgr.o \
${B}/libmm3d/cobfilter.o \
${B}/libmm3d/datadest.o \
${B}/libmm3d/datasource.o \
${B}/libmm3d/filedatadest.o \
${B}/libmm3d/filedatasource.o \
${B}/libmm3d/memdatadest.o \
${B}/libmm3d/memdatasource.o \
${B}/libmm3d/dxffilter.o \
${B}/libmm3d/filefactory.o \
${B}/libmm3d/filtermgr.o \
${B}/libmm3d/glmath.o \
${B}/libmm3d/iqefilter.o \
${B}/libmm3d/log.o \
${B}/libmm3d/lwofilter.o \
${B}/libmm3d/md2filter.o \
${B}/libmm3d/md3filter.o \
${B}/libmm3d/mesh.o \
${B}/libmm3d/misc.o \
${B}/libmm3d/mlocale.o \
${B}/libmm3d/mm3dfilter.o \
${B}/libmm3d/mm3dport.o \
${B}/libmm3d/mm3dreg.o \
${B}/libmm3d/model.o \
${B}/libmm3d/model_anim.o \
${B}/libmm3d/model_bool.o \
${B}/libmm3d/model_copy.o \
${B}/libmm3d/model_draw.o \
${B}/libmm3d/model_group.o \
${B}/libmm3d/model_influence.o \
${B}/libmm3d/model_inner.o \
${B}/libmm3d/model_insert.o \
${B}/libmm3d/model_meta.o \
${B}/libmm3d/model_ops.o \
${B}/libmm3d/model_print.o \
${B}/libmm3d/model_proj.o \
${B}/libmm3d/model_select.o \
${B}/libmm3d/model_texture.o \
${B}/libmm3d/modelfilter.o \
${B}/libmm3d/modelstatus.o \
${B}/libmm3d/modelundo.o \
${B}/libmm3d/modelutil.o \
${B}/libmm3d/ms3dfilter.o \
${B}/libmm3d/msg.o \
${B}/libmm3d/objfilter.o \
${B}/libmm3d/pcxtex.o \
${B}/libmm3d/rawtex.o \
${B}/libmm3d/smdfilter.o \
${B}/libmm3d/texmgr.o \
${B}/libmm3d/texscale.o \
${B}/libmm3d/texture.o \
${B}/libmm3d/tgatex.o \
${B}/libmm3d/triprim.o \
${B}/libmm3d/txtfilter.o \
${B}/libmm3d/undo.o \
${B}/libmm3d/undomgr.o \
${B}/libmm3d/weld.o \
MM3D_UI= \
${B}/qtui/alignwin.base.h \
${B}/qtui/animconvertwin.base.h \
${B}/qtui/animexportwin.base.h \
${B}/qtui/animsetwin.base.h \
${B}/qtui/animwidget.base.h \
${B}/qtui/autoassignjointwin.base.h \
${B}/qtui/backgroundselect.base.h \
${B}/qtui/backgroundwin.base.h \
${B}/qtui/boolwin.base.h \
${B}/qtui/contextgroup.base.h \
${B}/qtui/contextinfluences.base.h \
${B}/qtui/contextname.base.h \
${B}/qtui/contextposition.base.h \
${B}/qtui/contextprojection.base.h \
${B}/qtui/contextrotation.base.h \
${B}/qtui/extrudewin.base.h \
${B}/qtui/groupclean.base.h \
${B}/qtui/groupwin.base.h \
${B}/qtui/helpwin.base.h \
${B}/qtui/jointwin.base.h \
${B}/qtui/painttexturewin.base.h \
${B}/qtui/pointwin.base.h \
${B}/qtui/projectionwin.base.h \
${B}/qtui/keyvaluewin.base.h \
${B}/qtui/mapdirection.base.h \
${B}/qtui/mergewin.base.h \
${B}/qtui/metawin.base.h \
${B}/qtui/modelview.base.h \
${B}/qtui/newanim.base.h \
${B}/qtui/cal3dprompt.base.h \
${B}/qtui/iqeprompt.base.h \
${B}/qtui/ms3dprompt.base.h \
${B}/qtui/objprompt.base.h \
${B}/qtui/smdprompt.base.h \
${B}/qtui/pluginwin.base.h \
${B}/qtui/rgbawin.base.h \
${B}/qtui/statusbar.base.h \
${B}/qtui/texturecoord.base.h \
${B}/qtui/textwin.base.h \
${B}/qtui/texwin.base.h \
${B}/qtui/transformwin.base.h \
${B}/qtui/valuewin.base.h \
${B}/qtui/viewportsettings.base.h \
\
${B}/qtui/resources.cpp
MM3D_MOC= \
${B}/implui/alignwin.moc.cc \
${B}/implui/aboutwin.moc.cc \
${B}/implui/animconvertwin.moc.cc \
${B}/implui/animexportwin.moc.cc \
${B}/implui/animsetwin.moc.cc \
${B}/implui/animwidget.moc.cc \
${B}/implui/animwin.moc.cc \
${B}/implui/autoassignjointwin.moc.cc \
${B}/implui/backgroundselect.moc.cc \
${B}/implui/backgroundwin.moc.cc \
${B}/implui/boolpanel.moc.cc \
${B}/implui/boolwin.moc.cc \
${B}/implui/contextinfluences.moc.cc \
${B}/implui/contextname.moc.cc \
${B}/implui/contextpanel.moc.cc \
${B}/implui/contextposition.moc.cc \
${B}/implui/contextprojection.moc.cc \
${B}/implui/contextrotation.moc.cc \
${B}/tools/cubetoolwidget.moc.cc \
${B}/tools/cylindertoolwidget.moc.cc \
${B}/tools/ellipsetoolwidget.moc.cc \
${B}/depui/errorobj.moc.cc \
${B}/implui/extrudewin.moc.cc \
${B}/implui/groupclean.moc.cc \
${B}/implui/groupwin.moc.cc \
${B}/implui/helpwin.moc.cc \
${B}/implui/jointwin.moc.cc \
${B}/implui/painttexturewin.moc.cc \
${B}/implui/pointwin.moc.cc \
${B}/implui/projectionwin.moc.cc \
${B}/implui/keyvaluewin.moc.cc \
${B}/implui/licensewin.moc.cc \
${B}/implui/mergewin.moc.cc \
${B}/implui/metawin.moc.cc \
${B}/implui/mview.moc.cc \
${B}/depui/modelviewport.moc.cc \
${B}/implui/newanim.moc.cc \
${B}/implui/cal3dprompt.moc.cc \
${B}/implui/iqeprompt.moc.cc \
${B}/implui/ms3dprompt.moc.cc \
${B}/implui/objprompt.moc.cc \
${B}/implui/smdprompt.moc.cc \
${B}/implui/pluginwin.moc.cc \
${B}/tools/polytoolwidget.moc.cc \
${B}/tools/projtoolwidget.moc.cc \
${B}/implui/rgbawin.moc.cc \
${B}/tools/scaletoolwidget.moc.cc \
${B}/tools/selectfacetoolwidget.moc.cc \
${B}/implui/spherifywin.moc.cc \
${B}/implui/statusbar.moc.cc \
${B}/depui/textureframe.moc.cc \
${B}/implui/texturecoord.moc.cc \
${B}/depui/texwidget.moc.cc \
${B}/implui/texwin.moc.cc \
${B}/implui/transformwin.moc.cc \
${B}/implui/valuewin.moc.cc \
${B}/implui/viewportsettings.moc.cc \
${B}/implui/viewpanel.moc.cc \
${B}/implui/viewwin.moc.cc \
MM3D_MOC_OBJ= \
${B}/implui/alignwin.moc.o \
${B}/implui/aboutwin.moc.o \
${B}/implui/animconvertwin.moc.o \
${B}/implui/animexportwin.moc.o \
${B}/implui/animsetwin.moc.o \
${B}/implui/animwidget.moc.o \
${B}/implui/animwin.moc.o \
${B}/implui/autoassignjointwin.moc.o \
${B}/implui/backgroundselect.moc.o \
${B}/implui/backgroundwin.moc.o \
${B}/implui/boolpanel.moc.o \
${B}/implui/boolwin.moc.o \
${B}/implui/contextgroup.moc.o \
${B}/implui/contextinfluences.moc.o \
${B}/implui/contextname.moc.o \
${B}/implui/contextpanel.moc.o \
${B}/implui/contextposition.moc.o \
${B}/implui/contextprojection.moc.o \
${B}/implui/contextrotation.moc.o \
${B}/tools/cubetoolwidget.moc.o \
${B}/tools/cylindertoolwidget.moc.o \
${B}/tools/ellipsetoolwidget.moc.o \
${B}/tools/rotatetoolwidget.moc.o \
${B}/tools/torustoolwidget.moc.o \
${B}/tools/toolwidget.moc.o \
${B}/depui/errorobj.moc.o \
${B}/implui/extrudewin.moc.o \
${B}/implui/groupclean.moc.o \
${B}/implui/groupwin.moc.o \
${B}/implui/helpwin.moc.o \
${B}/implui/jointwin.moc.o \
${B}/implui/painttexturewin.moc.o \
${B}/implui/pointwin.moc.o \
${B}/implui/projectionwin.moc.o \
${B}/implui/keyvaluewin.moc.o \
${B}/implui/licensewin.moc.o \
${B}/implui/mapdirection.moc.o \
${B}/implui/mergewin.moc.o \
${B}/implui/metawin.moc.o \
${B}/implui/mview.moc.o \
${B}/depui/modelviewport.moc.o \
${B}/implui/newanim.moc.o \
${B}/implui/cal3dprompt.moc.o \
${B}/implui/iqeprompt.moc.o \
${B}/implui/ms3dprompt.moc.o \
${B}/implui/objprompt.moc.o \
${B}/implui/smdprompt.moc.o \
${B}/implui/pluginwin.moc.o \
${B}/tools/polytoolwidget.moc.o \
${B}/tools/projtoolwidget.moc.o \
${B}/implui/rgbawin.moc.o \
${B}/tools/scaletoolwidget.moc.o \
${B}/tools/selectfacetoolwidget.moc.o \
${B}/implui/spherifywin.moc.o \
${B}/implui/statusbar.moc.o \
${B}/depui/textureframe.moc.o \
${B}/implui/texturecoord.moc.o \
${B}/depui/texwidget.moc.o \
${B}/implui/texwin.moc.o \
${B}/implui/transformwin.moc.o \
${B}/implui/valuewin.moc.o \
${B}/implui/viewportsettings.moc.o \
${B}/implui/viewpanel.moc.o \
${B}/implui/viewwin.moc.o \
MM3D_OBJ= \
${B}/src/3dm.o \
${B}/mm3dcore/3dmprefs.o \
${B}/implui/aboutwin.o \
${B}/mm3dcore/align.o \
${B}/commands/aligncmd.o \
${B}/implui/alignwin.o \
${B}/mm3dcore/allocstats.o \
${B}/implui/animconvertwin.o \
${B}/implui/animexportwin.o \
${B}/implui/animsetwin.o \
${B}/implui/animwidget.o \
${B}/implui/animwin.o \
${B}/tools/atrfartool.o \
${B}/tools/atrneartool.o \
${B}/implui/autoassignjointwin.o \
${B}/implui/backgroundselect.o \
${B}/implui/backgroundwin.o \
${B}/implui/boolpanel.o \
${B}/implui/boolwin.o \
${B}/implui/contextgroup.o \
${B}/implui/contextinfluences.o \
${B}/implui/contextname.o \
${B}/implui/contextpanel.o \
${B}/implui/contextposition.o \
${B}/implui/contextprojection.o \
${B}/implui/contextrotation.o \
${B}/mm3dcore/contextwidget.o \
${B}/mm3dcore/contextpanelobserver.o \
${B}/tools/bgmovetool.o \
${B}/tools/bgscaletool.o \
${B}/mm3dcore/bounding.o \
${B}/mm3dcore/cmdline.o \
${B}/mm3dcore/cmdmgr.o \
${B}/mm3dcore/command.o \
${B}/commands/capcmd.o \
${B}/commands/copycmd.o \
${B}/tools/cubetool.o \
${B}/tools/cubetoolwidget.o \
${B}/tools/cylindertool.o \
${B}/tools/cylindertoolwidget.o \
${B}/mm3dcore/decal.o \
${B}/mm3dcore/decalmgr.o \
${B}/commands/deletecmd.o \
${B}/commands/dupcmd.o \
${B}/commands/edgedivcmd.o \
${B}/commands/edgeturncmd.o \
${B}/tools/ellipsetool.o \
${B}/tools/ellipsetoolwidget.o \
${B}/tools/extrudetool.o \
${B}/depui/errorobj.o \
${B}/commands/extrudecmd.o \
${B}/implui/extrudewin.o \
${B}/commands/faceoutcmd.o \
${B}/commands/flattencmd.o \
${B}/commands/flipcmd.o \
${B}/implui/groupclean.o \
${B}/implui/groupwin.o \
${B}/implui/helpwin.o \
${B}/commands/hidecmd.o \
${B}/commands/invertcmd.o \
${B}/commands/invnormalcmd.o \
${B}/tools/jointtool.o \
${B}/tools/pointtool.o \
${B}/tools/projtool.o \
${B}/implui/jointwin.o \
${B}/implui/painttexturewin.o \
${B}/implui/pointwin.o \
${B}/implui/projectionwin.o \
${B}/implui/keycfg.o \
${B}/implui/keyvaluewin.o \
${B}/implui/licensewin.o \
${B}/mm3dcore/luaif.o \
${B}/mm3dcore/luascript.o \
${B}/commands/makefacecmd.o \
${B}/implui/mapdirection.o \
${B}/implui/mergewin.o \
${B}/implui/metawin.o \
${B}/tools/movetool.o \
${B}/implui/msgqt.o \
${B}/implui/mview.o \
${B}/depui/modelviewport.o \
${B}/commands/pastecmd.o \
${B}/mm3dcore/pluginmgr.o \
${B}/implui/newanim.o \
${B}/implui/cal3dprompt.o \
${B}/implui/iqeprompt.o \
${B}/implui/ms3dprompt.o \
${B}/implui/objprompt.o \
${B}/implui/smdprompt.o \
${B}/implui/pluginwin.o \
${B}/tools/polytool.o \
${B}/tools/polytoolwidget.o \
${B}/tools/projtoolwidget.o \
${B}/mm3dcore/prefparse.o \
${B}/mm3dcore/prefs.o \
${B}/implui/qtmain.o \
${B}/implui/qttex.o \
${B}/tools/rectangletool.o \
${B}/qtui/resources.o \
${B}/implui/rgbawin.o \
${B}/mm3dcore/rotatepoint.o \
${B}/commands/rotatetexcmd.o \
${B}/tools/rotatetool.o \
${B}/tools/scaletool.o \
${B}/tools/scaletoolwidget.o \
${B}/tools/selectfacetoolwidget.o \
${B}/mm3dcore/scriptif.o \
${B}/tools/selectbonetool.o \
${B}/tools/selectpointtool.o \
${B}/tools/selectprojtool.o \
${B}/tools/selectconnectedtool.o \
${B}/tools/selectfacetool.o \
${B}/tools/selectgrouptool.o \
${B}/tools/selectvertextool.o \
${B}/tools/sheartool.o \
${B}/commands/selectfreecmd.o \
${B}/commands/simplifycmd.o \
${B}/commands/snapcmd.o \
${B}/commands/spherifycmd.o \
${B}/implui/spherifywin.o \
${B}/implui/statusbar.o \
${B}/src/stdcmds.o \
${B}/src/stdfilters.o \
${B}/src/stdtexfilters.o \
${B}/src/stdtools.o \
${B}/commands/subdividecmd.o \
${B}/mm3dcore/sysconf.o \
${B}/depui/textureframe.o \
${B}/implui/texturecoord.o \
${B}/mm3dcore/texturetest.o \
${B}/depui/texwidget.o \
${B}/implui/texwin.o \
${B}/implui/transformwin.o \
${B}/implui/transimp.o \
${B}/libmm3d/translate.o \
${B}/mm3dcore/tool.o \
${B}/mm3dcore/toolbox.o \
${B}/mm3dcore/toolpoly.o \
${B}/tools/rotatetoolwidget.o \
${B}/tools/torustool.o \
${B}/tools/torustoolwidget.o \
${B}/tools/toolwidget.o \
${B}/commands/unweldcmd.o \
${B}/implui/valuewin.o \
${B}/tools/vertextool.o \
${B}/tools/dragvertextool.o \
${B}/implui/viewportsettings.o \
${B}/implui/viewpanel.o \
${B}/implui/viewwin.o \
${B}/implui/viewwin_influences.o \
${B}/commands/weldcmd.o
QMFILES = \
${B}/i18n/mm3d_de.qm \
${B}/i18n/mm3d_fr.qm \
${B}/i18n/mm3d_sk.qm \
${B}/i18n/mm3d_ref.qm \
${B}/i18n/mm3d_bork.qm
ifeq (${V},1)
echo_cmd=@:
Q=
else
echo_cmd=@echo
Q=@
endif
define DO_CC
$(echo_cmd) "CC $<"
$(Q)${CC} ${DEFS} -c $< -o $@ ${CXXFLAGS}
endef
define DO_CXX
$(echo_cmd) "CXX $<"
$(Q)${CXX} ${DEFS} -c $< -o $@ ${CXXFLAGS}
endef
define DO_UIC
$(echo_cmd) "UIC $<"
$(Q)${UIC} $< -o $@
endef
define DO_MOC
$(echo_cmd) "MOC $<"
$(Q)${MOC} $< -o $@
endef
define DO_LRELEASE
$(echo_cmd) "LRELEASE $<"
$(Q)${LRELEASE} $< -qm $@
endef
.PHONY: all mm3d_ui mm3d_moc mm3d clean
all: makedirs mm3d_ui mm3d_moc mm3d qmfiles
# mingw.org's mingw32-make.exe uses Window's command processing and mkdir
makedirs:
ifdef MINGW32_MAKE
@IF NOT EXIST "${BUILD}\${BUILDSUB}" ${MKDIR} "${BUILD}\${BUILDSUB}"
@IF NOT EXIST "${BUILD}\${BUILDSUB}\src" ${MKDIR} "${BUILD}\${BUILDSUB}\src"
@IF NOT EXIST "${BUILD}\${BUILDSUB}\depui" ${MKDIR} "${BUILD}\${BUILDSUB}\depui"
@IF NOT EXIST "${BUILD}\${BUILDSUB}\implui" ${MKDIR} "${BUILD}\${BUILDSUB}\implui"
@IF NOT EXIST "${BUILD}\${BUILDSUB}\qtui" ${MKDIR} "${BUILD}\${BUILDSUB}\qtui"
@IF NOT EXIST "${BUILD}\${BUILDSUB}\tools" ${MKDIR} "${BUILD}\${BUILDSUB}\tools"
@IF NOT EXIST "${BUILD}\${BUILDSUB}\libmm3d" ${MKDIR} "${BUILD}\${BUILDSUB}\libmm3d"
@IF NOT EXIST "${BUILD}\${BUILDSUB}\mm3dcore" ${MKDIR} "${BUILD}\${BUILDSUB}\mm3dcore"
@IF NOT EXIST "${BUILD}\${BUILDSUB}\commands" ${MKDIR} "${BUILD}\${BUILDSUB}\commands"
@IF NOT EXIST "${BUILD}\${BUILDSUB}\i18n" ${MKDIR} "${BUILD}\${BUILDSUB}\i18n"
else
@${MKDIR} "${B}"
@${MKDIR} "${B}/src"
@${MKDIR} "${B}/depui"
@${MKDIR} "${B}/implui"
@${MKDIR} "${B}/qtui"
@${MKDIR} "${B}/tools"
@${MKDIR} "${B}/libmm3d"
@${MKDIR} "${B}/mm3dcore"
@${MKDIR} "${B}/commands"
@${MKDIR} "${B}/i18n"
endif
mm3d_ui: ${MM3D_UI}
mm3d_moc: ${MM3D_MOC}
qmfiles: ${QMFILES}
$(BIN)/mm3d${BINEXT}: ${MM3D_MOC_OBJ} ${LIB_OBJ} ${MM3D_OBJ}
$(echo_cmd) "LINKING $(BIN)/mm3d${BINEXT}"
ifdef MINGW
ifdef MINGW32_MAKE
$(Q)${WINDRES} --preprocessor="$(CC) -E -xc-header -DRC_INVOKED" src/win_resource.rc ${B}/src/win_resource.o
else
$(Q)${WINDRES} src/win_resource.rc ${B}/src/win_resource.o
endif
$(Q)${CXX} ${CXXFLAGS} ${DEFS} -o $(BIN)/mm3d${BINEXT} ${MM3D_OBJ} ${MM3D_MOC_OBJ} ${LIB_OBJ} ${B}/src/win_resource.o ${LINK}
else
$(Q)${CXX} ${CXXFLAGS} ${DEFS} -o $(BIN)/mm3d${BINEXT} ${MM3D_OBJ} ${MM3D_MOC_OBJ} ${LIB_OBJ} ${LINK}
endif
mm3d: $(BIN)/mm3d${BINEXT}
# FIXME: html docs are only created by autotools build system
#$(INSTALL) -d "$(PREFIX)/share/doc/mm3d/html/"
#$(INSTALL) -d "$(PREFIX)/share/doc/mm3d/html/olh_images/screencaps/"
#$(INSTALL) -d "$(PREFIX)/share/doc/mm3d/html/olh_images/tools/"
#${INSTALL} -m 0644 doc/html/*.html "$(PREFIX)/share/doc/mm3d/html/"
#${INSTALL} -m 0644 doc/html/olh_images/screencaps/*.png "$(PREFIX)/share/doc/mm3d/html/olh_images/screencaps/"
#${INSTALL} -m 0644 doc/html/olh_images/tools/*.png "$(PREFIX)/share/doc/mm3d/html/olh_images/tools/"
#${INSTALL} -m 0644 doc/html/olh_images/tools/*.jpg "$(PREFIX)/share/doc/mm3d/html/olh_images/tools/"
# make install doesn't work for mingw32-make.exe because it's case insenitive and autotools requires INSTALL file.
install: deploy
deploy:
ifdef MINGW
ifdef MINGW32_MAKE
@IF NOT EXIST "${BUILD}\${BUILDSUB}\install" ${MKDIR} "${BUILD}\${BUILDSUB}\install"
@IF NOT EXIST "${BUILD}\${BUILDSUB}\install\doc" ${MKDIR} "${BUILD}\${BUILDSUB}\install\doc"
@IF NOT EXIST "${BUILD}\${BUILDSUB}\install\doc\html" ${MKDIR} "${BUILD}\${BUILDSUB}\install\doc\html"
@IF NOT EXIST "${BUILD}\${BUILDSUB}\install\i18n" ${MKDIR} "${BUILD}\${BUILDSUB}\install\i18n"
@IF NOT EXIST "${BUILD}\${BUILDSUB}\install\plugins" ${MKDIR} "${BUILD}\${BUILDSUB}\install\plugins"
@IF NOT EXIST "${BUILD}\${BUILDSUB}\install\plugins\1.3" ${MKDIR} "${BUILD}\${BUILDSUB}\install\plugins\1.3"
@copy "$(BUILD)\$(BUILDSUB)\mm3d${BINEXT}" "$(BUILD)\$(BUILDSUB)\install"
@copy "$(BUILD)\$(BUILDSUB)\i18n\*.qm" "$(BUILD)\$(BUILDSUB)\install\i18n"
@$(WINDEPLOYQT) --compiler-runtime "$(BUILD)\$(BUILDSUB)\install"
else
@$(MKDIR) "$(B)/install"
@$(MKDIR) "$(B)/install/doc/html"
@$(MKDIR) "$(B)/install/i18n"
@$(MKDIR) "$(B)/install/plugins/1.3"
@cp "$(B)/mm3d${BINEXT}" "$(B)/install"
@cp $(QMFILES) "$(B)/install/i18n"
@$(WINDEPLOYQT) --compiler-runtime "$(B)/install"
endif
else
$(INSTALL) -d "$(PREFIX)/bin"
$(INSTALL) -m 0755 $(BIN)/mm3d${BINEXT} "$(PREFIX)/bin/mm3d"
$(INSTALL) -d "$(PREFIX)/share/mm3d/i18n/"
${INSTALL} -m 0644 $(QMFILES) "$(PREFIX)/share/mm3d/i18n/"
$(INSTALL) -d "$(PREFIX)/share/applications/"
$(INSTALL) -d "$(PREFIX)/share/mimelnk/application/"
$(INSTALL) -d "$(PREFIX)/share/pixmaps/"
${INSTALL} -m 0644 desktop/mm3d.desktop "$(PREFIX)/share/applications/"
${INSTALL} -m 0644 desktop/x-mm3d.desktop "$(PREFIX)/share/mimelnk/application/"
${INSTALL} -m 0644 desktop/*.png "$(PREFIX)/share/pixmaps/"
${INSTALL} -m 0644 desktop/*.xpm "$(PREFIX)/share/pixmaps/"
$(INSTALL) -d "$(PREFIX)/share/man/man1/"
${INSTALL} -m 0644 man/mm3d.1 "$(PREFIX)/share/man/man1/"
$(INSTALL) -d "$(PREFIX)/share/mm3d/plugins/1.3"
endif
installer: mm3d
makensis mm3d-win32-installer.nsi
${B}/%.o: src/%.c
$(DO_CC)
${B}/%.o: src/%.cc
$(DO_CXX)
${B}/src/%.o: src/%.cc
$(DO_CXX)
${B}/qtui/%.base.h: src/qtui/%.ui
$(DO_UIC)
${B}/implui/%.moc.cc: src/implui/%.h
$(DO_MOC)
${B}/tools/%.moc.cc: src/tools/%.h
$(DO_MOC)
${B}/depui/%.moc.cc: src/depui/%.h
$(DO_MOC)
${B}/qtui/resources.cpp: src/qtui/resources.qrc src/qtui/images/zoomin.xpm src/qtui/images/zoomout.xpm
$(echo_cmd) "RCC $<"
$(Q)${RCC} --name qtuiResources $< -o $@
${B}/i18n/%.qm: i18n/%.ts
$(DO_LRELEASE)
clean:
$(Q)rm -f ${LIB_OBJ}
$(Q)rm -f ${MM3D_UI}
$(Q)rm -f ${MM3D_MOC}
$(Q)rm -f ${QMFILES}
$(Q)rm -f ${MM3D_OBJ}
$(Q)rm -f ${MM3D_MOC_OBJ}
$(Q)rm -f $(BIN)/mm3d${BINEXT}
|