home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2002 April / pcpro0402.iso / essentials / graphics / Gimp / gimp-src-20001226.exe / src / gimp / plug-ins / makefile.msc < prev   
Encoding:
Makefile  |  2000-12-25  |  15.2 KB  |  671 lines

  1. ## WARNING: Outdated.
  2.  
  3. # Makefile to build the GIMP plug-ins with Microsoft nmake and compiler
  4.  
  5. # I don't want to use many hand-written makefiles, so this is quite complex.
  6. # This same makefile is also included by sub-makes called as subroutines.
  7. # Various parts of this file are used when makeing from the plug-ins directory,
  8. # and when building individual plug-ins and the three plug-in libraries.
  9.  
  10. INSTALL = copy
  11.  
  12. # This is what I use as installation target, from where the installer-builder
  13. # will pick it up.
  14. GIMP = C:\install\gimp
  15.  
  16. BIN = $(GIMP)\plug-ins
  17.  
  18. !IFNDEF LIBRARY
  19. !IFNDEF PLUGIN
  20. !IFNDEF MODULE
  21.  
  22. # This part is used when making from the plug-ins directory
  23.  
  24. FROMPLUGINSDIR=YES        # Used to bypass other parts below
  25.  
  26. # List plug-ins. We must use several lists to work around nmake's limits
  27.  
  28. # The COMMON* ones are in the common subdirectory
  29. COMMON1 = CEL CML_explorer align_layers animationplay animoptimize apply_lens autocrop autostretch_hsv blinds blur borderaverage bumpmap c_astretch checkerboard colorify compose convmatrix csource cubism curve_bend
  30. COMMON2 = decompose deinterlace depthmerge despeckle destripe diffraction displace edge emboss engrave exchange film flarefx fractaltrace
  31. COMMON3 = gauss_iir gauss_rle gbr gee gicon gif gifload glasstile gpb gqbist gradmap grid gtm guillotine gz header hot hrz illusion iwarp jigsaw jpeg laplace lic
  32. COMMON4 = mapcolor max_rgb mblur newsprint nlfilt noisify normalize nova oilify papertile pat pcx pix pixelize plasma plugindetails png pnm polar ps psd randomize ripple rotate
  33. COMMON5 = sample_colorize scatter_hsv semiflatten sharpen shift smooth_palette snoise sobel sparkle spheredesigner spread sunras tga threshold_alpha tiff tile tileit tiler unsharp video vinvert vpropagate waves whirlpinch winclipboard wind winprint wmf xbm xwd zealouscrop
  34.  
  35. # These have own subdirectories each
  36. SEPARATE = AlienMap AlienMap2 FractalExplorer Lighting MapObject bmp dbbrowser faxg3 fits flame fp gdyntext gfig gflare gfli gimpressionist ifscompose imagemap maze mosaic pagecurl rcm sel2path sgi sinus struc twain webbrowser winsnap
  37.  
  38. # These are unofficial, ie not in the CVS. To build these, you should
  39. # get tml's source snapshot and copy this makefile to the
  40. # ..\unofficial-plug-ins directory, go there, and do "nmake -f
  41. # makefile.msc unofficial".
  42.  
  43. UNOFFICIAL = Anamorphose DigitalSignature RGB_Displace ccanalyze gimp_ace guash sel_gauss magiceye psd_save user_filter
  44.  
  45. # The main target
  46.  
  47. all : ..\config.h libs-all common-plugins-all separate-plugins-all
  48.  
  49. ..\config.h : ..\config.h.win32
  50.     copy ..\config.h.win32 ..\config.h
  51.  
  52. install : libs-install common-plugins-install separate-plugins-install data-install
  53.  
  54. unofficial:
  55.     for %d in ($(UNOFFICIAL)) do nmake -nologo -f makefile.msc sub-one-separate DIR=%d TARGET=install
  56.  
  57. clean : libs-clean common-plugins-clean separate-plugins-clean
  58.  
  59. libs-all :
  60.     @nmake -nologo -f makefile.msc sub-libs TARGET=all
  61.  
  62. libs-install :
  63.     @nmake -nologo -f makefile.msc sub-libs TARGET=install
  64.  
  65. libs-clean :
  66.     @nmake -nologo -f makefile.msc sub-libs TARGET=clean
  67.  
  68. sub-libs:
  69.     cd libgck\gck
  70.     nmake -nologo -f ..\..\makefile.msc TOP=..\..\.. LIBRARY=gck OBJECTS="gckcolor.obj" $(TARGET)
  71.     cd ..\..
  72.  
  73.  
  74.  
  75. common-plugins-all :
  76.     @nmake -nologo -f makefile.msc sub-common-plugins TARGET=all
  77.  
  78. common-plugins-install :
  79.     @nmake -nologo -f makefile.msc sub-common-plugins TARGET=install
  80.  
  81. common-plugins-clean :
  82.     @nmake -nologo -f makefile.msc sub-common-plugins TARGET=clean
  83.  
  84.  
  85.  
  86. sub-common-plugins :
  87.     for %d in ($(COMMON1)) do nmake -nologo -f makefile.msc sub-one-common DIR=%d TARGET=$(TARGET)
  88.     for %d in ($(COMMON2)) do nmake -nologo -f makefile.msc sub-one-common DIR=%d TARGET=$(TARGET)
  89.     for %d in ($(COMMON3)) do nmake -nologo -f makefile.msc sub-one-common DIR=%d TARGET=$(TARGET)
  90.     for %d in ($(COMMON4)) do nmake -nologo -f makefile.msc sub-one-common DIR=%d TARGET=$(TARGET)
  91.     for %d in ($(COMMON5)) do nmake -nologo -f makefile.msc sub-one-common DIR=%d TARGET=$(TARGET)
  92.  
  93. sub-one-common :
  94.     @cd common
  95.     @nmake -nologo -f ..\makefile.msc TOP=..\.. PLUGIN=$(DIR) EXTRA_$(DIR)=1 $(TARGET)
  96.  
  97.  
  98.  
  99. separate-plugins-all :
  100.     @nmake -nologo -f makefile.msc sub-separate-plugins TARGET=all
  101.  
  102. separate-plugins-install :
  103.     @nmake -nologo -f makefile.msc sub-separate-plugins TARGET=install
  104.  
  105. separate-plugins-clean :
  106.     @nmake -nologo -f makefile.msc sub-separate-plugins TARGET=clean
  107.  
  108.  
  109.  
  110. sub-separate-plugins :
  111.     for %d in ($(SEPARATE)) do nmake -nologo -f makefile.msc sub-one-separate DIR=%d TARGET=$(TARGET)
  112. # We must handle script-fu separately because of the dash, sigh
  113.     @cd script-fu
  114.     @nmake -nologo -f ..\makefile.msc TOP=..\.. PLUGIN=script-fu EXTRA_script_fu=1 $(TARGET)
  115.     @cd ..
  116. # Also GAP is special
  117.     @cd gap
  118.     @nmake -nologo -f ..\makefile.msc TOP=..\.. PLUGIN=gap_filter EXTRA_gap_filter=1 $(TARGET)
  119.     @cd ..
  120.     @cd gap
  121.     @nmake -nologo -f ..\makefile.msc TOP=..\.. PLUGIN=gap_plugins EXTRA_gap_plugins=1 $(TARGET)
  122.     @cd ..
  123.  
  124.  
  125. sub-one-separate :
  126.     cd $(DIR)
  127.     nmake -nologo -f ..\makefile.msc TOP=..\.. PLUGIN=$(DIR) EXTRA_$(DIR)=1 $(TARGET)
  128.  
  129.  
  130. data-install : gimpressionist-data-install guash-data-install
  131.     -md $(GIMP)\scripts
  132.     $(INSTALL) script-fu\scripts\*.scm $(GIMP)\scripts
  133.     $(INSTALL) script-fu\scripts\*.jpg $(GIMP)\scripts
  134.     $(INSTALL) FractalExplorer\fractalexplorer-examples\* $(GIMP)\fractalexplorer
  135.     del $(GIMP)\fractalexplorer\Makefile.am
  136.  
  137. gimpressionist-data-install :
  138.     -md $(GIMP)\gimpressionist
  139.     -md $(GIMP)\gimpressionist\Brushes
  140.     -md $(GIMP)\gimpressionist\Paper
  141.     -md $(GIMP)\gimpressionist\Presets
  142.     $(INSTALL) gimpressionist\Brushes\*.pgm $(GIMP)\gimpressionist\Brushes
  143.     $(INSTALL) gimpressionist\Brushes\*.ppm $(GIMP)\gimpressionist\Brushes
  144.     $(INSTALL) gimpressionist\Paper\*.pgm $(GIMP)\gimpressionist\Paper
  145.     $(INSTALL) gimpressionist\Presets\* $(GIMP)\gimpressionist\Presets
  146.     del $(GIMP)\gimpressionist\Presets\Makefile.am
  147.  
  148. guash-data-install :
  149.  
  150.  
  151. !ENDIF
  152. !ENDIF
  153. !ENDIF
  154.  
  155. !IFNDEF FROMPLUGINSDIR
  156.  
  157. # This part is used when building individual plug-ins or one of
  158. # the libraries. 
  159.  
  160. # If a plug-in has several object files, or needs extra libraries or
  161. # compiler flags, these are in an EXTRA_xxx part.
  162.  
  163. !IFDEF EXTRA_FractalExplorer
  164. OBJECTS = \
  165.     Dialogs.obj \
  166.     Events.obj \
  167.     FractalExplorer.obj \
  168.     Globals.obj
  169. !ENDIF
  170.  
  171. !IFDEF EXTRA_Lighting
  172. OBJECTS = \
  173.     lighting_apply.obj \
  174.     lighting_image.obj \
  175.     lighting_main.obj \
  176.     lighting_preview.obj \
  177.     lighting_shade.obj \
  178.     lighting_ui.obj
  179. !ENDIF
  180.  
  181. !IFDEF EXTRA_MapObject
  182. OBJECTS = \
  183.     arcball.obj \
  184.     mapobject_apply.obj \
  185.     mapobject_image.obj \
  186.     mapobject_main.obj \
  187.     mapobject_preview.obj \
  188.     mapobject_shade.obj \
  189.     mapobject_ui.obj
  190. OPTIMIZE =
  191. !ENDIF
  192.  
  193. !IFDEF EXTRA_bmp
  194. OBJECTS = \
  195.     bmp.obj \
  196.     bmpread.obj \
  197.     bmpwrite.obj
  198. !ENDIF
  199.  
  200. !IFDEF EXTRA_dbbrowser
  201. OBJECTS = \
  202.     dbbrowser.obj \
  203.     dbbrowser_utils.obj
  204. !ENDIF
  205.  
  206. !IFDEF EXTRA_faxg3
  207. OBJECTS = \
  208.     faxg3.obj \
  209.     g3.obj    \
  210.     run_tbl.obj
  211. !ENDIF
  212.  
  213. !IFDEF EXTRA_fits
  214. OBJECTS = \
  215.     fits.obj \
  216.     fitsrw.obj
  217. !ENDIF
  218.  
  219. !IFDEF EXTRA_flame
  220. OBJECTS = \
  221.     cmap.obj \
  222.     flame.obj \
  223.     libifs.obj \
  224.     rect.obj
  225. !ENDIF
  226.  
  227. !IFDEF EXTRA_fp
  228. OBJECTS = \
  229.     fp.obj \
  230.     fp_gdk.obj \
  231.     fp_gtk.obj \
  232.     fp_misc.obj
  233. !ENDIF
  234.  
  235. !IFDEF EXTRA_gap_filter
  236. OBJECTS = \
  237.     gap_filter_main.obj \
  238.     gap_dbbrowser_utils.obj \
  239.     gap_filter_foreach.obj \
  240.     gap_filter_iterators.obj \
  241.     gap_filter_pdb.obj \
  242.     gap_filter_codegen.obj \
  243.     gap_arr_dialog.obj \
  244.     gap_pdb_calls.obj
  245. !ENDIF
  246.     
  247. !IFDEF EXTRA_gap_plugins
  248. OBJECTS = \
  249.     gap_main.obj \
  250.     gap_mov_exec.obj \
  251.     gap_range_ops.obj \
  252.     gap_arr_dialog.obj \
  253.     gap_mov_dialog.obj \
  254.     gap_layer_copy.obj \
  255.     gap_split.obj \
  256.     gap_resi_dialog.obj \
  257.     gap_mpege.obj \
  258.     gap_mod_layer.obj \
  259.     gap_filter_pdb.obj \
  260.     gap_filter_codegen.obj \
  261.     gap_dbbrowser_utils.obj \
  262.     gap_match.obj \
  263.     gap_lib.obj \
  264.     gap_exchange_image.obj \
  265.     gap_pdb_calls.obj \
  266.     resize.obj
  267. !ENDIF
  268.  
  269. !IFDEF EXTRA_gdyntext
  270. OBJECTS = \
  271.     charmap.obj \
  272.     charmap_window.obj \
  273.     font_selection.obj \
  274.     gdyntext.obj \
  275.     gdyntext_ui.obj \
  276.     message_window.obj
  277. !ENDIF
  278.  
  279. !IFDEF EXTRA_gflare
  280. OBJECTS = \
  281.     asupsample.obj \
  282.     gflare.obj \
  283.     gtkmultioptionmenu.obj
  284. !ENDIF
  285.  
  286. !IFDEF EXTRA_gfli
  287. OBJECTS = \
  288.     fli.obj \
  289.     gfli.obj
  290. !ENDIF
  291.  
  292. !IFDEF EXTRA_ifscompose
  293. OBJECTS = \
  294.     ifscompose.obj \
  295.     ifscompose_storage.obj \
  296.     ifscompose_utils.obj
  297. !ENDIF
  298.  
  299. !IFDEF EXTRA_imagemap
  300. OBJECTS = \
  301.     imap_cmd_copy_object.obj \
  302.     imap_about.obj \
  303.     imap_browse.obj \
  304.     imap_cern_lex.obj \
  305.     imap_cern_parse.obj \
  306.     imap_circle.obj \
  307.     imap_cmd_clear.obj \
  308.     imap_cmd_copy.obj \
  309.     imap_cmd_create.obj \
  310.     imap_cmd_cut.obj \
  311.     imap_cmd_cut_object.obj \
  312.     imap_cmd_delete.obj \
  313.     imap_cmd_delete_point.obj \
  314.     imap_cmd_edit_object.obj \
  315.     imap_cmd_guides.obj \
  316.     imap_cmd_insert_point.obj \
  317.     imap_cmd_move.obj \
  318.     imap_cmd_move_down.obj \
  319.     imap_cmd_move_sash.obj \
  320.     imap_cmd_move_selected.obj \
  321.     imap_cmd_move_to_front.obj \
  322.     imap_cmd_move_up.obj \
  323.     imap_cmd_object_down.obj \
  324.     imap_cmd_object_move.obj \
  325.     imap_cmd_object_up.obj \
  326.     imap_cmd_paste.obj \
  327.     imap_cmd_select.obj \
  328.     imap_cmd_select_all.obj \
  329.     imap_cmd_select_next.obj \
  330.     imap_cmd_select_prev.obj \
  331.     imap_cmd_select_region.obj \
  332.     imap_cmd_send_to_back.obj \
  333.     imap_cmd_unselect.obj \
  334.     imap_cmd_unselect_all.obj \
  335.     imap_command.obj \
  336.     imap_csim_lex.obj \
  337.     imap_csim_parse.obj \
  338.     imap_default_dialog.obj \
  339.     imap_edit_area_info.obj \
  340.     imap_file.obj \
  341.     imap_grid.obj \
  342.     imap_main.obj \
  343.     imap_menu.obj \
  344.     imap_menu_funcs.obj \
  345.     imap_misc.obj \
  346.     imap_mru.obj \
  347.     imap_ncsa_lex.obj \
  348.     imap_ncsa_parse.obj \
  349.     imap_object.obj \
  350.     imap_object_popup.obj \
  351.     imap_polygon.obj \
  352.     imap_popup.obj \
  353.     imap_preferences.obj \
  354.     imap_preview.obj \
  355.     imap_rectangle.obj \
  356.     imap_selection.obj \
  357.     imap_settings.obj \
  358.     imap_source.obj \
  359.     imap_statusbar.obj \
  360.     imap_string.obj \
  361.     imap_table.obj \
  362.     imap_toolbar.obj \
  363.     imap_tools.obj
  364. !ENDIF
  365.  
  366. !IFDEF EXTRA_iwarp
  367. OPTIMIZE =
  368. !ENDIF
  369.  
  370. !IFDEF EXTRA_jpeg
  371. EXTRACFLAGS = -I$(JPEG)
  372. EXTRALIBS = $(JPEG)\libjpeg.lib
  373. !ENDIF
  374.  
  375. !IFDEF EXTRA_maze
  376. OBJECTS = \
  377.     algorithms.obj \
  378.     handy.obj \
  379.     maze.obj \
  380.     maze_face.obj
  381. !ENDIF
  382.  
  383. !IFDEF EXTRA_mpeg
  384. EXTRACFLAGS = -I$(MPEG)
  385. EXTRALIBS = $(MPEG)\release\libmpeg.lib
  386. !ENDIF
  387.  
  388. !IFDEF EXTRA_png
  389. EXTRACFLAGS = -I$(PNG) -I$(ZLIB)
  390. EXTRALIBS = $(PNG)\libpng.lib $(ZLIB)\zlib.lib
  391. !ENDIF
  392.  
  393. !IFDEF EXTRA_print
  394. OBJECTS = \
  395.     print.obj \
  396.     print-escp2.obj \
  397.     print-pcl.obj \
  398.     print-ps.obj \
  399.     print-util.obj
  400. !ENDIF
  401.  
  402. !IFDEF EXTRA_psp
  403. EXTRACFLAGS = -I$(ZLIB)
  404. EXTRALIBS = $(ZLIB)\zlib.lib user32.lib
  405. !ENDIF
  406.  
  407. !IFDEF EXTRA_rcm
  408. OBJECTS = \
  409.     rcm.obj \
  410.     rcm_callback.obj \
  411.     rcm_dialog.obj \
  412.     rcm_gdk.obj \
  413.     rcm_misc.obj
  414. OPTIMIZE = 
  415. !ENDIF
  416.  
  417. !IFDEF EXTRA_script_fu
  418. OBJECTS = \
  419.     interp_md5.obj \
  420.     interp_regex.obj \
  421.     interp_slib.obj \
  422.     interp_sliba.obj \
  423.     interp_trace.obj \
  424.     script-fu.obj \
  425.     script-fu-console.obj \
  426.     script-fu-constants.obj \
  427.     script-fu-scripts.obj \
  428.     regex.obj \
  429.     ..\dbbrowser\dbbrowser_utils.obj
  430. EXTRACFLAGS = -DREGEX_MALLOC
  431. HAVE_RESOURCE = YES
  432. !ENDIF
  433.  
  434. !IFDEF EXTRA_sel2path
  435. OBJECTS = \
  436.     curve.obj \
  437.     edge.obj \
  438.     fit.obj \
  439.     math.obj \
  440.     pxl-outline.obj \
  441.     sel2path.obj \
  442.     sel2path_adv_dialog.obj \
  443.     spline.obj \
  444.     vector.obj
  445. !ENDIF
  446.  
  447. !IFDEF EXTRA_sgi
  448. OBJECTS = \
  449.     sgi.obj \
  450.     sgilib.obj
  451. !ENDIF
  452.  
  453. !IFDEF EXTRA_tiff
  454. EXTRACFLAGS = -I$(TIFF)
  455. EXTRALIBS = $(TIFF)\libtiff.lib $(JPEG)\libjpeg.lib $(ZLIB)\zlib.lib user32.lib
  456. !ENDIF
  457.  
  458. !IFDEF EXTRA_gimp_ace
  459. EXTRACFLAGS = -DGLACE_GIMP
  460. OBJECTS = \
  461.     gimp_ace.obj \
  462.     glace.obj \
  463.     glaceG.obj
  464. !ENDIF
  465.  
  466. !IFDEF EXTRA_gimpressionist
  467.  
  468. OBJECTS = \
  469.     about.obj \
  470.     brush.obj \
  471.     color.obj \
  472.     general.obj \
  473.     gimp.obj \
  474.     gimpressionist.obj \
  475.     orientation.obj \
  476.     orientmap.obj \
  477.     paper.obj \
  478.     placement.obj \
  479.     plasma.obj \
  480.     ppmtool.obj \
  481.     presets.obj \
  482.     preview.obj \
  483.     repaint.obj \
  484.     size.obj \
  485.     sizemap.obj
  486. !ENDIF
  487.  
  488. !IFDEF EXTRA_guash
  489. HAVE_RESOURCE = YES
  490. !ENDIF
  491.  
  492. !IFDEF EXTRA_magiceye
  493. OBJECTS = \
  494.     dialog.obj \
  495.     magiceye.obj
  496. !ENDIF
  497.  
  498. !IFDEF EXTRA_user_filter
  499.  
  500. uf_lexer.c : uf_lexer.l
  501.     flex -Cem -ouf_lexer.c uf_lexer.l
  502. uf_parser.tab.c: uf_parser.y
  503.     bison --defines --verbose uf_parser.y
  504.  
  505. OBJECTS = \
  506.     libyywrap.obj \
  507.     uf_eval.obj \
  508.     uf_file.obj \
  509.     uf_gui.obj \
  510.     uf_lexer.obj \
  511.     uf_main.obj \
  512.     uf_parser.tab.obj
  513. !ENDIF
  514.  
  515. !IFDEF EXTRA_pmosaic
  516. EXTRACFLAGS = -I$(JPEG)
  517. EXTRALIBS = $(JPEG)\libjpeg.lib
  518. OBJECTS = \
  519.     pmosaic.obj \
  520.     pmsc.obj
  521. !ENDIF
  522.  
  523. !IFDEF EXTRA_twain
  524. OBJECTS = \
  525.     tw_func.obj \
  526.     tw_util.obj \
  527.     twain.obj
  528. EXTRALIBS = user32.lib
  529. !ENDIF
  530.  
  531. !IFDEF EXTRA_webbrowser
  532. EXTRALIBS = shell32.lib
  533. !ENDIF
  534.  
  535. !IFDEF EXTRA_winprint
  536. EXTRALIBS = user32.lib gdi32.lib comdlg32.lib
  537. !endif
  538.  
  539. !IFDEF EXTRA_winclipboard
  540. EXTRALIBS = user32.lib
  541. !endif
  542.  
  543. !IFDEF EXTRA_winsnap
  544. HAVE_RESOURCE = YES
  545. EXTRALIBS = user32.lib gdi32.lib
  546. !endif
  547.  
  548. GIMP_VER = 1.2
  549. GTK_VER = 1.3
  550. GLIB_VER = 1.3
  551.  
  552. GTK = $(TOP)\..\gtk+
  553. GLIB = $(TOP)\..\glib
  554. INTL = $(TOP)\..\intl
  555.  
  556. # Location of libpng sources
  557. PNG = $(TOP)\..\libpng-1.0.3
  558. # Location of tiff-3.4 sources
  559. TIFF = $(TOP)\..\tiff-v3.4\libtiff
  560. # Location of jpeg-6b sources
  561. JPEG = $(TOP)\..\jpeg-6b
  562. # and zlib
  563. ZLIB = $(TOP)\..\zlib-1.1.3
  564. # and libmpeg
  565. MPEG = $(TOP)\..\mpeg_lib-1.3.0
  566.  
  567. PLUGINDIR = $(TOP)\plug-ins
  568.  
  569. !IFNDEF OPTIMIZE
  570. !IFNDEF DEBUG
  571. OPTIMIZE = -Ox
  572. !ELSE
  573. OPTIMIZE = -Zi
  574. !ENDIF
  575. !ENDIF
  576.  
  577. !IFNDEF DEBUG
  578. LINKDEBUG =
  579. RTL = -MD
  580. !ELSE
  581. LINKDEBUG = /debug
  582. RTL = -MDd
  583. !ENDIF
  584.  
  585. CC = cl -nologo -G5 -GF $(OPTIMIZE) $(RTL) -W2 -Zm200
  586.  
  587. CFLAGS = -DHAVE_CONFIG_H $(EXTRACFLAGS) -I. -I$(TOP) -I$(PLUGINDIR) -I$(PLUGINDIR)\libgck -I$(GLIB) -I$(GTK)\gdk -I$(GTK)\gdk -I$(GTK) -I$(INTL)
  588.  
  589. LDFLAGS = /link /subsystem:windows /machine:ix86 $(LINKDEBUG)
  590.  
  591. !IFDEF PLUGIN
  592.  
  593. # This part is used when building individual plug-ins
  594.  
  595. all : $(PLUGIN).exe
  596.  
  597. install : all
  598.     $(INSTALL) $(PLUGIN).exe $(BIN)
  599.  
  600. !IFNDEF OBJECTS
  601. OBJECTS = $(PLUGIN).obj
  602. !ENDIF
  603.  
  604. !IFDEF HAVE_RESOURCE
  605. # We have our own resource file (just an icon, usually)
  606. RESOURCE = $(PLUGIN).res
  607. !ELSE
  608. # Use the Wilber icon otherwise. If gimp.exe eventually gets more resources,
  609. # this will have to be changed.
  610. RESOURCE = ..\..\app\gimp.res
  611. !ENDIF
  612.  
  613. $(PLUGIN).exe : $(OBJECTS) $(RESOURCE)
  614.     $(CC) $(CFLAGS) -MD -Fe$(PLUGIN).exe $(OBJECTS) $(RESOURCE) $(PLUGINDIR)\libgck\gck\gck.lib ..\..\libgimp\gimp-$(GIMP_VER).lib ..\..\libgimp\gimpui-$(GIMP_VER).lib $(GTK)\gtk\gtk-$(GTK_VER).lib $(GTK)\gdk\gdk-$(GTK_VER).lib $(INTL)\gnu-intl.lib $(GLIB)\glib-$(GLIB_VER).lib $(EXTRALIBS) $(LDFLAGS)
  615.  
  616. $(PLUGIN).res : $(PLUGIN).rc
  617.     rc -r -fo $(PLUGIN).res $(PLUGIN).rc
  618.  
  619. !ENDIF
  620.  
  621. !IFDEF LIBRARY
  622.  
  623. # This part is used when building a library
  624.  
  625. all : $(LIBRARY).lib
  626.  
  627. install : all
  628.  
  629. !IFNDEF OBJECTS
  630. OBJECTS = $(LIBRARY).obj
  631. !ENDIF
  632.  
  633. $(LIBRARY).lib : $(OBJECTS)
  634.     lib /out:$(LIBRARY).lib $(OBJECTS)
  635.  
  636. !ENDIF
  637.  
  638. !IFDEF MODULE
  639.  
  640. # This part is used when building a module
  641.  
  642. # Allow building libraries with specific extensions
  643. !IFNDEF MODULE_EXT
  644. MODULE_EXT = dll
  645. !ENDIF
  646.  
  647. all : $(MODULE).$(MODULE_EXT)
  648.  
  649. install : all
  650.  
  651. !IFNDEF OBJECTS
  652. OBJECTS = $(MODULE).obj
  653. !ENDIF
  654.  
  655. $(MODULE).$(MODULE_EXT) : $(OBJECTS) $(MODULE).def
  656.     $(CC) $(CFLAGS) -LD -Fe$@ $(OBJECTS) $(LDFLAGS) $(EXTRALIBS) ..\..\libgimp\gimp-$(GIMP_VER).lib ..\..\libgimp\gimpui-$(GIMP_VER).lib $(GTK)\gtk\gtk-$(GTK_VER).lib $(GLIB)\gmodule-$(GLIB_VER).lib $(GLIB)\glib-$(GLIB_VER).lib /def:$(MODULE).def
  657. !ENDIF
  658.  
  659. .c.obj :
  660.     $(CC) $(CFLAGS) -c $<
  661.  
  662. clean :
  663.     erase *.obj
  664.     erase *.lib
  665.     erase *.exp
  666.     erase *.exe
  667.     erase *.pdb
  668.     erase *.ilk
  669.  
  670. !ENDIF
  671.