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.mingw next >
Encoding:
Makefile  |  2000-12-25  |  16.4 KB  |  853 lines

  1. ## Makefile for building the GIMP plug-ins with gcc on Win32.
  2. ## You should use GNU make running on cygwin.
  3. ## Use: make -f makefile.mingw
  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 what's left of the gck library.
  9.  
  10. # This is what I use as installation target, from where the installer-builder
  11. # will pick it up.
  12. DEST = /install/gimp
  13.  
  14. ifndef GIMPTOP
  15. GIMPTOP = ..
  16. endif
  17.  
  18. TOP = ../..
  19.  
  20. include $(GIMPTOP)/build/win32/make.mingw
  21.  
  22. # Possibly override GIMP version from build/win32/module.defs
  23. GIMP_VER = 1.2
  24.  
  25. ################################################################
  26.  
  27. ifndef LIBRARY
  28. ifndef PLUGIN
  29. ifndef MODULE
  30.  
  31. # This part is used when making from the plug-ins directory
  32.  
  33. FROMPLUGINSDIR=YES        # Used to bypass other parts below
  34.  
  35. # List plug-ins. Use several lists just so that this makefile looks more like
  36. # the one used with Microsoft's nmake, which has silly limits.
  37.  
  38. # These are in the common subdirectory
  39. COMMON =             \
  40.     AlienMap        \
  41.     AlienMap2        \
  42.     CEL            \
  43.     CML_explorer        \
  44.     aa            \
  45.     align_layers        \
  46.     animationplay        \
  47.     animoptimize        \
  48.     apply_lens        \
  49.     autocrop        \
  50.     autostretch_hsv        \
  51.     blinds            \
  52.     blur            \
  53.     borderaverage        \
  54.     bumpmap            \
  55.     c_astretch        \
  56.     checkerboard        \
  57.     colorify        \
  58.     compose            \
  59.     convmatrix        \
  60.     csource            \
  61.     cubism            \
  62.     curve_bend        \
  63.     decompose        \
  64.     deinterlace        \
  65.     depthmerge        \
  66.     despeckle        \
  67.     destripe        \
  68.     diffraction        \
  69.     displace        \
  70.     edge            \
  71.     emboss            \
  72.     engrave            \
  73.     exchange        \
  74.     film            \
  75.     flarefx            \
  76.     fractaltrace        \
  77.     gauss_iir        \
  78.     gauss_rle        \
  79.     gbr            \
  80.     gee            \
  81.     gee_zoom        \
  82.     gicon            \
  83.     gif            \
  84.     gifload            \
  85.     gih            \
  86.     glasstile        \
  87.     gqbist            \
  88.     gradmap            \
  89.     grid            \
  90.     gtm            \
  91.     guillotine        \
  92.     gz            \
  93.     header            \
  94.     hot            \
  95.     hrz            \
  96.     illusion        \
  97.     iwarp            \
  98.     jigsaw            \
  99.     jpeg            \
  100.     laplace            \
  101.     lic            \
  102.     mapcolor        \
  103.     max_rgb            \
  104.     mblur            \
  105.     newsprint        \
  106.     nlfilt            \
  107.     noisify            \
  108.     normalize        \
  109.     nova            \
  110.     oilify            \
  111.     papertile        \
  112.     pat            \
  113.     pcx            \
  114.     pix            \
  115.     pixelize        \
  116.     plasma            \
  117.     plugindetails        \
  118.     png            \
  119.     pnm            \
  120.     polar            \
  121.     ps            \
  122.     psd            \
  123.     psp            \
  124.     randomize        \
  125.     ripple            \
  126.     rotate            \
  127.     sample_colorize        \
  128.     scatter_hsv        \
  129.     semiflatten        \
  130.     sharpen            \
  131.     shift            \
  132.     sinus            \
  133.     smooth_palette        \
  134.     snoise            \
  135.     sobel            \
  136.     sparkle            \
  137.     spread            \
  138.     struc            \
  139.     sunras            \
  140.     tga            \
  141.     threshold_alpha        \
  142.     tiff            \
  143.     tile            \
  144.     tileit            \
  145.     tiler            \
  146.     unsharp            \
  147.     video            \
  148.     vinvert            \
  149.     vpropagate        \
  150.     warp            \
  151.     waves            \
  152.     whirlpinch        \
  153.     winclipboard        \
  154.     wind            \
  155.     winprint        \
  156.     wmf            \
  157.     xbm            \
  158.     xwd            \
  159.     zealouscrop
  160.  
  161. # These have own subdirectories each
  162. SEPARATE =             \
  163.     FractalExplorer        \
  164.     Lighting        \
  165.     MapObject        \
  166.     bmp            \
  167.     dbbrowser        \
  168.     faxg3            \
  169.     fits            \
  170.     flame            \
  171.     fp            \
  172.     gfig            \
  173.     gflare            \
  174.     gfli            \
  175.     gimpressionist        \
  176.     gdyntext        \
  177.     ifscompose        \
  178.     imagemap        \
  179.     maze            \
  180.     mosaic            \
  181.     pagecurl        \
  182.     rcm            \
  183.     sel2path        \
  184.     sgi            \
  185.     twain            \
  186.     webbrowser        \
  187.     winsnap
  188.  
  189. # These are unofficial, ie not in the CVS. To build these, you should
  190. # get tml's source snapshot and copy this makefile to the
  191. # ../unofficial-plug-ins directory, go there, and do "make -f
  192. # makefile.mingw unofficial".
  193.  
  194. UNOFFICIAL =             \
  195.     Anamorphose        \
  196.     DigitalSignature    \
  197.     RGB_Displace        \
  198.     ccanalyze        \
  199.     fixer            \
  200.     gimp_ace        \
  201.     guash            \
  202.     homogenizer        \
  203.     kaleidoscope        \
  204.     logconv            \
  205.     sel_gauss        \
  206.     magiceye        \
  207.     mathmap            \
  208.     psd_save        \
  209.     resynthesizer        \
  210.     user_filter
  211.  
  212. # The main target
  213.  
  214. all : ../config.h libs-all common-plugins-all separate-plugins-all
  215.  
  216. ../config.h : ../config.h.win32
  217.     cp $< $@
  218.  
  219. install : libs-install common-plugins-install separate-plugins-install data-install
  220.  
  221. unofficial:
  222.     for d in $(UNOFFICIAL); do $(MAKE) -f makefile.mingw sub-one-separate DIR=$$d TARGET=install EXTRADEFINES=-DGIMP_ENABLE_COMPAT_CRUFT; done
  223.  
  224. clean:: libs-clean common-plugins-clean separate-plugins-clean
  225.  
  226. libs-all :
  227.     $(MAKE) -f makefile.mingw sub-libs TARGET=all
  228.  
  229. libs-install :
  230.     $(MAKE) -f makefile.mingw sub-libs TARGET=install
  231.  
  232. libs-clean :
  233.     $(MAKE) -f makefile.mingw sub-libs TARGET=clean
  234.  
  235. sub-libs:
  236.     cd libgck/gck; $(MAKE) -f ../../makefile.mingw GIMPTOP=../../.. TOP=../../$(TOP) LIBRARY=gck OBJECTS="gckcolor.o" $(TARGET)
  237.  
  238.  
  239.  
  240. common-plugins-all :
  241.     $(MAKE) -f makefile.mingw sub-common-plugins TARGET=all
  242.  
  243. common-plugins-install :
  244.     $(MAKE) -f makefile.mingw sub-common-plugins TARGET=install
  245.  
  246. common-plugins-clean :
  247.     cd common; $(MAKE) -f ../makefile.mingw GIMPTOP=../.. LIBRARY=PLUGIN=dummy clean
  248.  
  249.  
  250.  
  251. sub-common-plugins :
  252.     for d in $(COMMON); do $(MAKE) -f makefile.mingw sub-one-common DIR=$$d TARGET=$(TARGET); done
  253.  
  254. sub-one-common :
  255.     cd common; $(MAKE) -f ../makefile.mingw GIMPTOP=../.. TOP=../$(TOP) PLUGIN=$(DIR) EXTRA_$(DIR)=1 $(TARGET)
  256.  
  257.  
  258.  
  259. separate-plugins-all :
  260.     $(MAKE) -f makefile.mingw sub-separate-plugins TARGET=all
  261.  
  262. separate-plugins-install :
  263.     $(MAKE) -f makefile.mingw sub-separate-plugins TARGET=install
  264.  
  265. separate-plugins-clean :
  266.     $(MAKE) -f makefile.mingw sub-separate-plugins TARGET=clean
  267.  
  268. sub-separate-plugins : sub-script-fu sub-gap
  269.     for d in $(SEPARATE); do $(MAKE) -f makefile.mingw sub-one-separate DIR=$$d TARGET=$(TARGET); done
  270.  
  271. # We must handle script-fu separately because of the dash, sigh
  272. sub-script-fu :
  273.     cd script-fu; $(MAKE) -f ../makefile.mingw GIMPTOP=../.. TOP=../$(TOP) PLUGIN=script-fu EXTRA_script_fu=1 $(TARGET)
  274.  
  275. # Also GAP is special
  276. sub-gap :
  277.     cd gap; $(MAKE) -f ../makefile.mingw GIMPTOP=../.. TOP=../$(TOP) PLUGIN=gap_filter EXTRA_gap_filter=1 $(TARGET)
  278.     cd gap; $(MAKE) -f ../makefile.mingw GIMPTOP=../.. TOP=../$(TOP) PLUGIN=gap_plugins EXTRA_gap_plugins=1 $(TARGET)
  279.  
  280.  
  281. sub-one-separate :
  282.     cd $(DIR); $(MAKE) -f ../makefile.mingw GIMPTOP=../.. TOP=../$(TOP) PLUGIN=$(DIR) EXTRA_$(DIR)=1 $(TARGET)
  283.  
  284.  
  285. data-install : gap-data-install gflare-data-install gimpressionist-data-install guash-data-install script-fu-data-install
  286.  
  287. gap-data-install:
  288.     -mkdir $(DEST)/scripts
  289.     $(INSTALL) gap/*.scm $(DEST)/scripts
  290.     
  291. gflare-data-install:
  292.     -mkdir $(DEST)/gflare
  293.     -$(INSTALL) gflare/gflares/* $(DEST)/gflare
  294.     -rm $(DEST)/gflare/Makefile.am
  295.  
  296. gimpressionist-data-install :
  297.     -mkdir $(DEST)/gimpressionist $(DEST)/gimpressionist/Brushes $(DEST)/gimpressionist/Paper $(DEST)/gimpressionist/Presets
  298.     $(INSTALL) gimpressionist/Brushes/*.p?m $(DEST)/gimpressionist/Brushes
  299.     $(INSTALL) gimpressionist/Paper/*.p?m $(DEST)/gimpressionist/Paper
  300.     -$(INSTALL) gimpressionist/Presets/* $(DEST)/gimpressionist/Presets
  301.     -rm $(DEST)/gimpressionist/Presets/Makefile.am
  302.  
  303. guash-data-install:
  304.  
  305. script-fu-data-install:
  306.     -mkdir $(DEST)/scripts
  307.     $(INSTALL) script-fu/scripts/*.scm $(DEST)/scripts
  308.     rm $(DEST)/scripts/test-sphere.scm
  309.     $(INSTALL) script-fu/scripts/*.jpg $(DEST)/scripts
  310.     for d in FractalExplorer/fractalexplorer-examples/*; do if [ -f $$d ]; then $(INSTALL) $$d $(DEST)/fractalexplorer; fi; done
  311.     rm $(DEST)/fractalexplorer/Makefile.am
  312.  
  313. endif # ifndef MODULE
  314. endif # ifndef PLUGIN
  315. endif # ifndef LIBRARY
  316.  
  317. ################################################################
  318.  
  319. ifndef FROMPLUGINSDIR
  320.  
  321. # This part is used when building individual plug-ins or one of
  322. # the libraries. 
  323.  
  324. ifdef EXTRA_FractalExplorer
  325. OBJECTS = \
  326.     Dialogs.o \
  327.     Events.o \
  328.     FractalExplorer.o \
  329.     Globals.o
  330. endif
  331.  
  332. ifdef EXTRA_Lighting
  333. OBJECTS = \
  334.     lighting_apply.o \
  335.     lighting_image.o \
  336.     lighting_main.o \
  337.     lighting_preview.o \
  338.     lighting_shade.o \
  339.     lighting_ui.o
  340. endif
  341.  
  342. ifdef EXTRA_MapObject
  343. OBJECTS = \
  344.     arcball.o \
  345.     mapobject_apply.o \
  346.     mapobject_image.o \
  347.     mapobject_main.o \
  348.     mapobject_preview.o \
  349.     mapobject_shade.o \
  350.     mapobject_ui.o
  351. endif
  352.  
  353. ifdef EXTRA_aa
  354. EXTRACFLAGS = -I $(TOP)/aalib-1.2
  355. EXTRALIBS = $(TOP)/aalib-1.2/libaa.a
  356. endif
  357.  
  358. ifdef EXTRA_bmp
  359. OBJECTS = \
  360.     bmp.o \
  361.     bmpread.o \
  362.     bmpwrite.o
  363. endif
  364.  
  365. ifdef EXTRA_dbbrowser
  366. OBJECTS = \
  367.     dbbrowser.o \
  368.     dbbrowser_utils.o
  369. endif
  370.  
  371. ifdef EXTRA_faxg3
  372. OBJECTS = \
  373.     faxg3.o \
  374.     g3.o    \
  375.     run_tbl.o
  376. endif
  377.  
  378. ifdef EXTRA_fits
  379. OBJECTS = \
  380.     fits.o \
  381.     fitsrw.o
  382. endif
  383.  
  384. ifdef EXTRA_fixer
  385. OBJECTS = \
  386.     fixer.o
  387. EXTRALIBS = -lstdc++
  388. endif
  389.  
  390. ifdef EXTRA_flame
  391. OBJECTS = \
  392.     cmap.o    \
  393.     flame.o    \
  394.     libifs.o \
  395.     rect.o
  396. endif
  397.  
  398. ifdef EXTRA_fp
  399. OBJECTS = \
  400.     fp.o    \
  401.     fp_gdk.o \
  402.     fp_gtk.o \
  403.     fp_misc.o
  404. endif
  405.  
  406. ifdef EXTRA_gap_filter
  407. OBJECTS = \
  408.     gap_filter_main.o \
  409.     gap_dbbrowser_utils.o \
  410.     gap_filter_foreach.o \
  411.     gap_filter_iterators.o \
  412.     gap_filter_pdb.o \
  413.     gap_filter_codegen.o \
  414.     gap_arr_dialog.o \
  415.     gap_pdb_calls.o
  416. endif
  417.     
  418. ifdef EXTRA_gap_plugins
  419. OBJECTS = \
  420.     gap_main.o \
  421.     gap_mov_exec.o \
  422.     gap_range_ops.o \
  423.     gap_arr_dialog.o \
  424.     gap_mov_dialog.o \
  425.     gap_layer_copy.o \
  426.     gap_split.o \
  427.     gap_resi_dialog.o \
  428.     gap_mpege.o \
  429.     gap_mod_layer.o \
  430.     gap_filter_pdb.o \
  431.     gap_filter_codegen.o \
  432.     gap_dbbrowser_utils.o \
  433.     gap_match.o \
  434.     gap_lib.o \
  435.     gap_exchange_image.o \
  436.     gap_pdb_calls.o \
  437.     resize.o
  438. endif
  439.  
  440. ifdef EXTRA_gdyntext
  441. OBJECTS = \
  442.     charmap.o \
  443.     charmap_window.o \
  444.     font_selection.o \
  445.     gdyntext.o \
  446.     gdyntextcompat.o \
  447.     gdyntext_ui.o \
  448.     message_window.o
  449. endif
  450.  
  451. ifdef EXTRA_gflare
  452. OBJECTS = \
  453.     asupsample.o \
  454.     gflare.o \
  455.     gtkmultioptionmenu.o
  456. endif
  457.  
  458. ifdef EXTRA_gfli
  459. OBJECTS = \
  460.     fli.o \
  461.     gfli.o
  462. endif
  463.  
  464. ifdef EXTRA_helpbrowser
  465. OBJECTS = \
  466.     helpbrowser.o \
  467.     queue.o
  468. endif
  469.  
  470. ifdef EXTRA_homogenizer
  471. OBJECTS = \
  472.     homogenize.o
  473. EXTRALIBS = -lstdc++
  474. endif
  475.  
  476. ifdef EXTRA_ifscompose
  477. OBJECTS = \
  478.     ifscompose.o \
  479.     ifscompose_storage.o \
  480.     ifscompose_utils.o
  481. endif
  482.  
  483. ifdef EXTRA_imagemap
  484. OBJECTS = \
  485.     imap_cmd_copy_object.o \
  486.     imap_about.o \
  487.     imap_browse.o \
  488.     imap_cern_lex.o \
  489.     imap_cern_parse.o \
  490.     imap_circle.o \
  491.     imap_cmd_clear.o \
  492.     imap_cmd_copy.o \
  493.     imap_cmd_create.o \
  494.     imap_cmd_cut.o \
  495.     imap_cmd_cut_object.o \
  496.     imap_cmd_delete.o \
  497.     imap_cmd_delete_point.o \
  498.     imap_cmd_edit_object.o \
  499.     imap_cmd_guides.o \
  500.     imap_cmd_insert_point.o \
  501.     imap_cmd_move.o \
  502.     imap_cmd_move_down.o \
  503.     imap_cmd_move_sash.o \
  504.     imap_cmd_move_selected.o \
  505.     imap_cmd_move_to_front.o \
  506.     imap_cmd_move_up.o \
  507.     imap_cmd_object_down.o \
  508.     imap_cmd_object_move.o \
  509.     imap_cmd_object_up.o \
  510.     imap_cmd_paste.o \
  511.     imap_cmd_select.o \
  512.     imap_cmd_select_all.o \
  513.     imap_cmd_select_next.o \
  514.     imap_cmd_select_prev.o \
  515.     imap_cmd_select_region.o \
  516.     imap_cmd_send_to_back.o \
  517.     imap_cmd_unselect.o \
  518.     imap_cmd_unselect_all.o \
  519.     imap_command.o \
  520.     imap_csim_lex.o \
  521.     imap_csim_parse.o \
  522.     imap_default_dialog.o \
  523.     imap_edit_area_info.o \
  524.     imap_file.o \
  525.     imap_grid.o \
  526.     imap_main.o \
  527.     imap_menu.o \
  528.     imap_menu_funcs.o \
  529.     imap_misc.o \
  530.     imap_mru.o \
  531.     imap_ncsa_lex.o \
  532.     imap_ncsa_parse.o \
  533.     imap_object.o \
  534.     imap_object_popup.o \
  535.     imap_polygon.o \
  536.     imap_popup.o \
  537.     imap_preferences.o \
  538.     imap_preview.o \
  539.     imap_rectangle.o \
  540.     imap_selection.o \
  541.     imap_settings.o \
  542.     imap_source.o \
  543.     imap_statusbar.o \
  544.     imap_string.o \
  545.     imap_table.o \
  546.     imap_toolbar.o \
  547.     imap_tools.o
  548. endif
  549.  
  550. ifdef EXTRA_jpeg
  551. EXTRACFLAGS = $(JPEG_CFLAGS)
  552. EXTRALIBS = $(JPEG_LIBS)
  553. endif
  554.  
  555. ifdef EXTRA_maze
  556. OBJECTS = \
  557.     algorithms.o \
  558.     handy.o \
  559.     maze.o    \
  560.     maze_face.o
  561. endif
  562.  
  563. ifdef EXTRA_mpeg
  564. EXTRACFLAGS = -I$(MPEG)
  565. EXTRALIBS = -L $(MPEG)/release -lmpeg
  566. endif
  567.  
  568. ifdef EXTRA_png
  569. EXTRACFLAGS = $(PNG_CFLAGS)
  570. EXTRALIBS = $(PNG_LIBS)
  571. endif
  572.  
  573. ifdef EXTRA_print
  574. OBJECTS = \
  575.     print.o \
  576.     print-escp2.o \
  577.     print-pcl.o \
  578.     print-ps.o \
  579.     print-util.o
  580. endif
  581.  
  582. ifdef EXTRA_psp
  583. EXTRACFLAGS = $(ZLIB_CFLAGS)
  584. EXTRALIBS = $(ZLIB_LIBS)
  585. endif
  586.  
  587. ifdef EXTRA_rcm
  588. OBJECTS = \
  589.     rcm.o    \
  590.     rcm_callback.o \
  591.     rcm_dialog.o \
  592.     rcm_gdk.o \
  593.     rcm_misc.o
  594. OPTIMIZE = 
  595. endif
  596.  
  597. ifdef EXTRA_resynthesizer
  598. OBJECTS = \
  599.     resynth.o
  600. EXTRALIBS = -lstdc++
  601. endif
  602.  
  603. ifdef EXTRA_script_fu
  604. OBJECTS = \
  605.     interp_md5.o \
  606.     interp_regex.o \
  607.     interp_slib.o \
  608.     interp_sliba.o \
  609.     interp_trace.o \
  610.     script-fu.o \
  611.     script-fu-console.o \
  612.     script-fu-constants.o \
  613.     script-fu-scripts.o \
  614.     regex.o \
  615.     dbbrowser_utils.o
  616.  
  617. EXTRACFLAGS = -DREGEX_MALLOC -I../dbbrowser
  618. HAVE_RESOURCE = YES
  619.  
  620. dbbrowser_utils.c : ../dbbrowser/dbbrowser_utils.c
  621.     cp $< $@
  622. endif
  623.  
  624. ifdef EXTRA_sel2path
  625. OBJECTS = \
  626.     curve.o \
  627.     edge.o \
  628.     fit.o \
  629.     math.o \
  630.     pxl-outline.o \
  631.     sel2path.o \
  632.     sel2path_adv_dialog.o \
  633.     spline.o \
  634.     vector.o
  635. endif
  636.  
  637. ifdef EXTRA_sgi
  638. OBJECTS = \
  639.     sgi.o    \
  640.     sgilib.o
  641. endif
  642.  
  643. ifdef EXTRA_tiff
  644. EXTRACFLAGS = $(TIFF_CFLAGS)
  645. EXTRALIBS = $(TIFF_LIBS)
  646. endif
  647.  
  648. ifdef EXTRA_gimp_ace
  649. EXTRACFLAGS = -DGLACE_GIMP -DPLUGIN_NAME=\"gimp_ace\" -DDATA
  650. OBJECTS = \
  651.     src/dialog.o \
  652.     src/gimp_ace.o \
  653.     src/glace.o \
  654.     src/glaceG.o \
  655.     src/preview.o
  656. endif
  657.  
  658. ifdef EXTRA_gimpressionist
  659. OBJECTS = \
  660.     about.o \
  661.     brush.o \
  662.     color.o \
  663.     general.o \
  664.     gimp.o \
  665.     gimpressionist.o \
  666.     orientation.o \
  667.     orientmap.o \
  668.     paper.o \
  669.     placement.o \
  670.     plasma.o \
  671.     ppmtool.o \
  672.     presets.o \
  673.     preview.o \
  674.     repaint.o \
  675.     size.o \
  676.     sizemap.o
  677. endif
  678.  
  679. ifdef EXTRA_guash
  680. HAVE_RESOURCE = YES
  681. endif
  682.  
  683. ifdef EXTRA_magiceye
  684. OBJECTS = \
  685.     dialog.o \
  686.     magiceye.o
  687. endif
  688.  
  689. ifdef EXTRA_mathmap
  690. OBJECTS = \
  691.     builtins.o \
  692.     builtins_compiler.o \
  693.     cgen.o \
  694.     colorwell.o \
  695.     exprtree.o \
  696.     internals.o \
  697.     jump.o \
  698.     lispreader.o \
  699.     macros.o \
  700.     mathmap.o \
  701.     noise.o \
  702.     overload.o \
  703.     parser.o \
  704.     postfix.o \
  705.     scanner.o \
  706.     tags.o \
  707.     tuples.o \
  708.     userval.o \
  709.     vars.o
  710.  
  711. EXTRACFLAGS = -Drandom=g_random_int
  712.  
  713. parser.c parser.h : parser.y
  714.     bison -p mm -d parser.y
  715.     mv parser.tab.c parser.c
  716.     mv parser.tab.h parser.h
  717.  
  718. scanner.c : scanner.fl parser.h
  719.     flex -Pmm scanner.fl
  720.     mv lex.mm.c scanner.c
  721.  
  722. endif
  723.  
  724. ifdef EXTRA_user_filter
  725.  
  726. uf_lexer.c : uf_lexer.l
  727.     flex -Cem -ouf_lexer.c uf_lexer.l
  728. uf_parser.tab.c: uf_parser.y
  729.     bison --defines --verbose uf_parser.y
  730.  
  731. OBJECTS = \
  732.     libyywrap.o \
  733.     uf_eval.o \
  734.     uf_file.o \
  735.     uf_gui.o \
  736.     uf_lexer.o \
  737.     uf_main.o \
  738.     uf_parser.tab.o
  739. endif
  740.  
  741. ifdef EXTRA_pmosaic
  742. EXTRACFLAGS = $(JPEG_CFLAGS)
  743. EXTRALIBS = $(JPEG_LIBS)
  744. OBJECTS = \
  745.     pmosaic.o \
  746.     pmsc.o
  747. endif
  748.  
  749. ifdef EXTRA_twain
  750. OBJECTS = \
  751.     tw_func.o \
  752.     tw_util.o \
  753.     twain.o
  754. EXTRALIBS = -luser32
  755. endif
  756.  
  757. ifdef EXTRA_winsnap
  758. HAVE_RESOURCE = YES
  759. endif
  760.  
  761. PLUGINDIR = $(GIMPTOP)/plug-ins
  762.  
  763. DEFINES = -DHAVE_CONFIG_H $(EXTRACFLAGS) $(EXTRADEFINES)
  764. INCLUDES = -I . -I $(GIMPTOP) -I $(PLUGINDIR) -I $(PLUGINDIR)/libgck 
  765. DEPCFLAGS = $(GLIB_CFLAGS) $(GTK_CFLAGS) $(INTL_CFLAGS)
  766.  
  767. ################################################################
  768.  
  769. ifdef PLUGIN
  770.  
  771. # This part is used when building individual plug-ins
  772.  
  773. all : $(PLUGIN).exe
  774.  
  775. install : all
  776.     $(INSTALL) $(PLUGIN).exe $(DEST)/plug-ins
  777.  
  778. ifndef OBJECTS
  779. OBJECTS = $(PLUGIN).o
  780. endif
  781.  
  782. ifdef HAVE_RESOURCE
  783. # We have our own resource file (just an icon, usually)
  784. RESOURCE = $(PLUGIN)res.o
  785. else
  786. # Use the Wilber icon otherwise. If gimp.exe eventually gets more resources,
  787. # this will have to be changed.
  788. RESOURCE = ../../app/gimpres.o
  789. endif
  790.  
  791. $(PLUGIN).exe : $(OBJECTS) $(RESOURCE)
  792.     $(CC) $(CFLAGS) -mwindows -o $(PLUGIN).exe $(OBJECTS) $(RESOURCE) -L $(PLUGINDIR)/libgck/gck -lgck -L ../../libgimp -lgimp-$(GIMP_VER) -lgimpui-$(GIMP_VER) $(GTK_LIBS) $(INTL_LIBS) $(GLIB_LIBS) $(EXTRALIBS) $(LDFLAGS)
  793.  
  794. # Kludge to get the path to the win32 headers
  795. WIN32APIHEADERS=$(shell echo "\#include <winver.h>" | $(CC) -M -E - | tail -1 | sed -e 's![\\/]winver.h!!' | tr -d '\015')
  796.  
  797. $(PLUGIN)res.o : $(PLUGIN).rc
  798.     windres --include-dir $(WIN32APIHEADERS) $(PLUGIN).rc $(PLUGIN)res.o
  799.  
  800. endif
  801.  
  802. ################################################################
  803.  
  804. ifdef LIBRARY
  805.  
  806. # This part is used when building a library
  807.  
  808. all : lib$(LIBRARY).a
  809.  
  810. install : all
  811.  
  812. ifndef OBJECTS
  813. OBJECTS = $(LIBRARY).o
  814. endif
  815.  
  816. lib$(LIBRARY).a : $(OBJECTS)
  817.     -rm $@
  818.     ar rc $@ $(OBJECTS)
  819.  
  820. endif
  821.  
  822. ifdef MODULE
  823.  
  824. # This part is used when building a module
  825.  
  826. # (This doesn't work, the only module so far is pygimp, and only Hans Breuer
  827. # builds it, with MSVC.)
  828.  
  829. # Allow building libraries with specific extensions
  830. ifndef MODULE_EXT
  831. MODULE_EXT = dll
  832. endif
  833.  
  834. all : $(MODULE).$(MODULE_EXT)
  835.  
  836. install : all
  837.  
  838. ifndef OBJECTS
  839. OBJECTS = $(MODULE).o
  840. endif
  841.  
  842. $(MODULE).$(MODULE_EXT) : $(OBJECTS) $(MODULE).def
  843.     $(CC) $(CFLAGS) -mwindows -s -o $@ $(OBJECTS) $(LDFLAGS) $(EXTRALIBS) -L ../../libgimp -lgimp-$(GIMP_VER) -lgimpui-$(GIMP_VER) $(GTK_LIBS) $(GLIB_LIBS)
  844. endif
  845.  
  846. endif # ifndef FROMPLUGINSDIR
  847.  
  848. # Hack to get an updated makefile.mingw automatically after updating
  849. # makefile.mingw.in. Only for developer use.
  850. makefile.mingw: makefile.mingw.in
  851.     sed -e 's,@GIMP[_]MAJOR_VERSION@,1,' \
  852.         -e 's,@GIMP[_]MINOR_VERSION@,2,' <$< >$@
  853.