gimp/plug-ins/makefile.cygwin

451 lines
10 KiB
Plaintext
Raw Normal View History

# Makefile to build the GIMP plug-ins with cygwin's make and gcc -mno-cygwin
# I don't want to use many hand-written makefiles, so this is quite complex.
# This same makefile is also included by sub-makes called as subroutines.
# Various parts of this file are used when makeing from the plug-ins directory,
# and when building individual plug-ins and the three plug-in libraries.
INSTALL = install
GIMP = /gimp
BIN = $(GIMP)/plug-ins
ifndef LIBRARY
ifndef PLUGIN
# This part is used when making from the plug-ins directory
FROMPLUGINSDIR=YES # Used to bypass other parts below
# List plug-ins. Use several lists just so that this makefile looks more like
# the one used with Microsoft's nmake, which has silly limits.
# The COMMON* ones are in the common subdirectory
COMMON1 = CEL CML_explorer align_layers animationplay animoptimize apply_lens autocrop autostretch_hsv blinds blur bumpmap c_astretch checkerboard colorify compose convmatrix csource cubism curve_bend
COMMON2 = decompose deinterlace depthmerge despeckle destripe diffraction displace edge emboss engrave exchange film flarefx fractaltrace
COMMON3 = gauss_iir gauss_rle gbr gee gicon gif gifload glasstile gqbist gradmap grid gtm guillotine gz header hot hrz illusion iwarp jigsaw jpeg laplace lic
COMMON4 = mapcolor max_rgb mblur newsprint nlfilt noisify normalize nova oilify palette papertile pat pcx pix pixelize plasma plugindetails png pnm polar ps psd randomize ripple rotate rotators
COMMON5 = sample_colorize scatter_hsv semiflatten sharpen shift smooth_palette snoise sobel sparkle spread sunras tga threshold_alpha tiff tile tileit tiler video vinvert vpropagate waves whirlpinch winclipboard wind winprint wmf xbm xwd zealouscrop
# These have own subdirectories each
SEPARATE = AlienMap FractalExplorer Lighting MapObject bmp borderaverage dbbrowser faxg3 fits flame fp gfig gfli ifscompose maze mosaic pagecurl rcm sel2path sgi sinus struc unsharp winsnap
# These are unofficial, ie not in the CVS. To build these, you should
# get tml's source snapshot and copy this makefile to the
# ../unofficial-plug-ins directory, go there, and do "make -f
# makefile.cygwin unofficial".
UNOFFICIAL = Anamorphose RGB_Displace ccanalyze fuse gimp_ace gimpressionist guash user_filter twain
# The main target
all : ../config.h libs-all common-plugins-all separate-plugins-all
../config.h : ../config.h.win32
cp ../config.h.win32 ../config.h
install : libs-install common-plugins-install separate-plugins-install scripts-install
unofficial:
for d in $(UNOFFICIAL); do $(MAKE) -f makefile.cygwin sub-one-separate DIR=$$d TARGET=install; done
-mkdir $(GIMP)/gimpressionist $(GIMP)/gimpressionist/Brushes $(GIMP)/gimpressionist/Paper $(GIMP)/gimpressionist/Presets
$(INSTALL) gimpressionist/Brushes/* $(GIMP)/gimpressionist/Brushes
$(INSTALL) gimpressionist/Paper/* $(GIMP)/gimpressionist/Paper
$(INSTALL) gimpressionist/Presets/* $(GIMP)/gimpressionist/Presets
clean : libs-clean common-plugins-clean separate-plugins-clean
libs-all :
$(MAKE) -f makefile.cygwin sub-libs TARGET=all
libs-install :
$(MAKE) -f makefile.cygwin sub-libs TARGET=install
libs-clean :
$(MAKE) -f makefile.cygwin sub-libs TARGET=clean
sub-libs:
cd megawidget; $(MAKE) -f ../makefile.cygwin TOP=../.. LIBRARY=megawidget $(TARGET)
cd gpc; $(MAKE) -f ../makefile.cygwin TOP=../.. LIBRARY=gpc $(TARGET)
cd libgck/gck; $(MAKE) -f ../../makefile.cygwin TOP=../../.. LIBRARY=gck OBJECTS="gckcolor.o gcklistbox.o gckmath.o gckui.o gckvector.o" $(TARGET)
common-plugins-all :
$(MAKE) -f makefile.cygwin sub-common-plugins TARGET=all
common-plugins-install :
$(MAKE) -f makefile.cygwin sub-common-plugins TARGET=install
common-plugins-clean :
cd common; $(MAKE) -f ../makefile.cygwin LIBRARY=PLUGIN=dummy clean
sub-common-plugins :
for d in $(COMMON1) $(COMMON2) $(COMMON3) $(COMMON4) $(COMMON5); do $(MAKE) -f makefile.cygwin sub-one-common DIR=$$d TARGET=$(TARGET); done
sub-one-common :
cd common; $(MAKE) -f ../makefile.cygwin TOP=../.. PLUGIN=$(DIR) EXTRA_$(DIR)=1 $(TARGET)
separate-plugins-all :
$(MAKE) -f makefile.cygwin sub-separate-plugins TARGET=all
separate-plugins-install :
$(MAKE) -f makefile.cygwin sub-separate-plugins TARGET=install
separate-plugins-clean :
$(MAKE) -f makefile.cygwin sub-separate-plugins TARGET=clean
sub-separate-plugins : sub-script-fu
for d in $(SEPARATE); do $(MAKE) -f makefile.cygwin sub-one-separate DIR=$$d TARGET=$(TARGET); done
# We must handle script-fu separately because of the dash, sigh
sub-script-fu :
cd script-fu; $(MAKE) -f ../makefile.cygwin TOP=../.. PLUGIN=script-fu EXTRA_script_fu=1 $(TARGET)
sub-one-separate :
cd $(DIR); $(MAKE) -f ../makefile.cygwin TOP=../.. PLUGIN=$(DIR) EXTRA_$(DIR)=1 $(TARGET)
scripts-install :
-mkdir $(GIMP)/scripts
$(INSTALL) script-fu/scripts/*.scm $(GIMP)/scripts
$(INSTALL) script-fu/scripts/*.jpg $(GIMP)/scripts
for d in FractalExplorer/fractalexplorer-examples/*; do if [ -f $$d ]; then $(INSTALL) $$d $(GIMP)/fractalexplorer; fi; done
rm $(GIMP)/fractalexplorer/Makefile.am
endif # ifndef PLUGIN
endif # ifndef LIBRARY
ifndef FROMPLUGINSDIR
# This part is used when building individual plug-ins or one of
# the libraries.
ifdef EXTRA_Lighting
OBJECTS = \
lighting_apply.o \
lighting_image.o \
lighting_main.o \
lighting_preview.o \
lighting_shade.o \
lighting_ui.o
endif
ifdef EXTRA_MapObject
OBJECTS = \
arcball.o \
mapobject_apply.o \
mapobject_image.o \
mapobject_main.o \
mapobject_preview.o \
mapobject_shade.o \
mapobject_ui.o
endif
ifdef EXTRA_bmp
OBJECTS = \
bmp.o \
bmpread.o \
bmpwrite.o
endif
ifdef EXTRA_dbbrowser
OBJECTS = \
dbbrowser.o \
dbbrowser_utils.o
endif
ifdef EXTRA_faxg3
OBJECTS = \
faxg3.o \
g3.o \
run_tbl.o
endif
ifdef EXTRA_fits
OBJECTS = \
fits.o \
fitsrw.o
endif
ifdef EXTRA_flame
OBJECTS = \
cmap.o \
flame.o \
libifs.o \
rect.o
endif
ifdef EXTRA_fp
OBJECTS = \
fp.o \
fp_gdk.o \
fp_gtk.o \
fp_hsv.o \
fp_misc.o
endif
ifdef EXTRA_gdyntext
# Doesn't compile yet, though, so not included in list above
OBJECTS = \
charmap.o \
charmap_window.o \
font_selection.o \
gdyntext.o \
gdyntext_ui.o \
message_window.o
endif
ifdef EXTRA_gfli
OBJECTS = \
fli.o \
gfli.o
endif
ifdef EXTRA_ifscompose
OBJECTS = \
ifscompose.o \
ifscompose_storage.o \
ifscompose_utils.o
endif
ifdef EXTRA_jpeg
# Location of jpeg-6b sources
JPEG = $(TOP)/../jpeg-6b
EXTRACFLAGS = -I$(JPEG)
EXTRALIBS = -L $(JPEG) -ljpeg
endif
ifdef EXTRA_maze
OBJECTS = \
algorithms.o \
handy.o \
maze.o \
maze_face.o
endif
ifdef EXTRA_png
# Location of libpng sources
PNG = $(TOP)/../libpng-1.0.3
# And zlib
ZLIB = $(TOP)/../zlib-1.1.3
EXTRACFLAGS = -I$(PNG) -I$(ZLIB)
EXTRALIBS = -L $(PNG) -lpng -L $(ZLIB) -lz
endif
ifdef EXTRA_print
OBJECTS = \
print.o \
print-escp2.o \
print-pcl.o \
print-ps.o \
print-util.o
endif
ifdef EXTRA_rcm
OBJECTS = \
rcm.o \
rcm_callback.o \
rcm_dialog.o \
rcm_gdk.o \
rcm_misc.o
OPTIMIZE =
endif
ifdef EXTRA_script_fu
OBJECTS = \
interp_md5.o \
interp_regex.o \
interp_slib.o \
interp_sliba.o \
interp_trace.o \
script-fu.o \
script-fu-console.o \
script-fu-scripts.o \
regex.o \
../dbbrowser/dbbrowser_utils.o
EXTRACFLAGS = -DREGEX_MALLOC
HAVE_RESOURCE = YES
endif
app/makefile.cygwin app/makefile.msc plug-ins/makefile.cygwin * app/makefile.cygwin * app/makefile.msc * plug-ins/makefile.cygwin * plug-ins/makefile.msc * modules/makefile.cygwin * modules/makefile.msc * tools/gcg/makefile.cygwin: Various updates. GCC-compiled DLL name change. * app/context_manager.c: Include paint_options.h for prototype. * app/gimpimage.c (gimp_image_initialize_projection): Break out of loop as soon as possible. * app/menus.c (menus_last_opened_cmd_callback): Check if referring to entry not in list. * app/module_db.c (valid_module_name): (Win32) Require module DLL names to include name of compiler built with. * app/paths_dialog.c (paths_draw_segment_points): No use to draw lines if we have less that two points. * app/qmask.c: Include stdio.h and floating_sel.h. * libgimp/makefile.cygwin: New file. * libgimp/Makefile.am: Distribute above file. * libgimp/gimp.def: Update. * libgimp/gimpenv.c (gimp_directory): Don't warn about missing home directory on Win32, it is perfectly natural. * plug-ins/sel2path/global.h: Bypass unused declarations, some of which clash with functions in MSVCRT. * plug-ins/sel2path/math.c * modules/colorsel_water.c: Define M_PI if necessary. * plug-ins/sel2path/sel2path.c: Include config.h and glib.h. Define rint() if needed. * plug-ins/sel2path/vector.c: Include glib.h (for hypot() renaming on Win32; In the MS C runtime, as hypot() is non-ANSI, it's called _hypot(), sigh). * plug-ins/sinus/sinus_logo.h: Use indexed format, it is easier on some compilers than the huge string.
1999-07-15 00:02:32 +08:00
ifdef EXTRA_sel2path
OBJECTS = \
curve.o \
edge.o \
fit.o \
math.o \
pxl-outline.o \
sel2path.o \
sel2path_adv_dialog.o \
spline.o \
vector.o
endif
ifdef EXTRA_sgi
OBJECTS = \
sgi.o \
sgilib.o
endif
ifdef EXTRA_tiff
# Location of tiff-3.4 sources
TIFF = $(TOP)/../tiff-v3.4/libtiff
# Location of jpeg-6b sources
JPEG = $(TOP)/../jpeg-6b
# And zlib
ZLIB = $(TOP)/../zlib-1.1.3
EXTRACFLAGS = -I$(TIFF)
EXTRALIBS = -L $(TIFF) -ltiff -L $(JPEG) -ljpeg -L $(ZLIB) -lz -luser32
endif
ifdef EXTRA_unsharp
OBJECTS = \
dialog_f.o \
app/makefile.cygwin app/makefile.msc plug-ins/makefile.cygwin * app/makefile.cygwin * app/makefile.msc * plug-ins/makefile.cygwin * plug-ins/makefile.msc * modules/makefile.cygwin * modules/makefile.msc * tools/gcg/makefile.cygwin: Various updates. GCC-compiled DLL name change. * app/context_manager.c: Include paint_options.h for prototype. * app/gimpimage.c (gimp_image_initialize_projection): Break out of loop as soon as possible. * app/menus.c (menus_last_opened_cmd_callback): Check if referring to entry not in list. * app/module_db.c (valid_module_name): (Win32) Require module DLL names to include name of compiler built with. * app/paths_dialog.c (paths_draw_segment_points): No use to draw lines if we have less that two points. * app/qmask.c: Include stdio.h and floating_sel.h. * libgimp/makefile.cygwin: New file. * libgimp/Makefile.am: Distribute above file. * libgimp/gimp.def: Update. * libgimp/gimpenv.c (gimp_directory): Don't warn about missing home directory on Win32, it is perfectly natural. * plug-ins/sel2path/global.h: Bypass unused declarations, some of which clash with functions in MSVCRT. * plug-ins/sel2path/math.c * modules/colorsel_water.c: Define M_PI if necessary. * plug-ins/sel2path/sel2path.c: Include config.h and glib.h. Define rint() if needed. * plug-ins/sel2path/vector.c: Include glib.h (for hypot() renaming on Win32; In the MS C runtime, as hypot() is non-ANSI, it's called _hypot(), sigh). * plug-ins/sinus/sinus_logo.h: Use indexed format, it is easier on some compilers than the huge string.
1999-07-15 00:02:32 +08:00
dialog_i.o \
unsharp.o
endif
app/makefile.cygwin app/makefile.msc plug-ins/makefile.cygwin * app/makefile.cygwin * app/makefile.msc * plug-ins/makefile.cygwin * plug-ins/makefile.msc * modules/makefile.cygwin * modules/makefile.msc * tools/gcg/makefile.cygwin: Various updates. GCC-compiled DLL name change. * app/context_manager.c: Include paint_options.h for prototype. * app/gimpimage.c (gimp_image_initialize_projection): Break out of loop as soon as possible. * app/menus.c (menus_last_opened_cmd_callback): Check if referring to entry not in list. * app/module_db.c (valid_module_name): (Win32) Require module DLL names to include name of compiler built with. * app/paths_dialog.c (paths_draw_segment_points): No use to draw lines if we have less that two points. * app/qmask.c: Include stdio.h and floating_sel.h. * libgimp/makefile.cygwin: New file. * libgimp/Makefile.am: Distribute above file. * libgimp/gimp.def: Update. * libgimp/gimpenv.c (gimp_directory): Don't warn about missing home directory on Win32, it is perfectly natural. * plug-ins/sel2path/global.h: Bypass unused declarations, some of which clash with functions in MSVCRT. * plug-ins/sel2path/math.c * modules/colorsel_water.c: Define M_PI if necessary. * plug-ins/sel2path/sel2path.c: Include config.h and glib.h. Define rint() if needed. * plug-ins/sel2path/vector.c: Include glib.h (for hypot() renaming on Win32; In the MS C runtime, as hypot() is non-ANSI, it's called _hypot(), sigh). * plug-ins/sinus/sinus_logo.h: Use indexed format, it is easier on some compilers than the huge string.
1999-07-15 00:02:32 +08:00
ifdef EXTRA_gimp_ace
EXTRACFLAGS = -DGLACE_GIMP
OBJECTS = \
gimp_ace.o \
glace.o \
glaceG.o
endif
ifdef EXTRA_gimpressionist
OBJECTS = \
about.o \
app/makefile.cygwin app/makefile.msc plug-ins/makefile.cygwin * app/makefile.cygwin * app/makefile.msc * plug-ins/makefile.cygwin * plug-ins/makefile.msc * modules/makefile.cygwin * modules/makefile.msc * tools/gcg/makefile.cygwin: Various updates. GCC-compiled DLL name change. * app/context_manager.c: Include paint_options.h for prototype. * app/gimpimage.c (gimp_image_initialize_projection): Break out of loop as soon as possible. * app/menus.c (menus_last_opened_cmd_callback): Check if referring to entry not in list. * app/module_db.c (valid_module_name): (Win32) Require module DLL names to include name of compiler built with. * app/paths_dialog.c (paths_draw_segment_points): No use to draw lines if we have less that two points. * app/qmask.c: Include stdio.h and floating_sel.h. * libgimp/makefile.cygwin: New file. * libgimp/Makefile.am: Distribute above file. * libgimp/gimp.def: Update. * libgimp/gimpenv.c (gimp_directory): Don't warn about missing home directory on Win32, it is perfectly natural. * plug-ins/sel2path/global.h: Bypass unused declarations, some of which clash with functions in MSVCRT. * plug-ins/sel2path/math.c * modules/colorsel_water.c: Define M_PI if necessary. * plug-ins/sel2path/sel2path.c: Include config.h and glib.h. Define rint() if needed. * plug-ins/sel2path/vector.c: Include glib.h (for hypot() renaming on Win32; In the MS C runtime, as hypot() is non-ANSI, it's called _hypot(), sigh). * plug-ins/sinus/sinus_logo.h: Use indexed format, it is easier on some compilers than the huge string.
1999-07-15 00:02:32 +08:00
brush.o \
general.o \
gimp.o \
gimpressionist.o \
orientation.o \
orientmap.o \
paper.o \
placement.o \
app/makefile.cygwin app/makefile.msc plug-ins/makefile.cygwin * app/makefile.cygwin * app/makefile.msc * plug-ins/makefile.cygwin * plug-ins/makefile.msc * modules/makefile.cygwin * modules/makefile.msc * tools/gcg/makefile.cygwin: Various updates. GCC-compiled DLL name change. * app/context_manager.c: Include paint_options.h for prototype. * app/gimpimage.c (gimp_image_initialize_projection): Break out of loop as soon as possible. * app/menus.c (menus_last_opened_cmd_callback): Check if referring to entry not in list. * app/module_db.c (valid_module_name): (Win32) Require module DLL names to include name of compiler built with. * app/paths_dialog.c (paths_draw_segment_points): No use to draw lines if we have less that two points. * app/qmask.c: Include stdio.h and floating_sel.h. * libgimp/makefile.cygwin: New file. * libgimp/Makefile.am: Distribute above file. * libgimp/gimp.def: Update. * libgimp/gimpenv.c (gimp_directory): Don't warn about missing home directory on Win32, it is perfectly natural. * plug-ins/sel2path/global.h: Bypass unused declarations, some of which clash with functions in MSVCRT. * plug-ins/sel2path/math.c * modules/colorsel_water.c: Define M_PI if necessary. * plug-ins/sel2path/sel2path.c: Include config.h and glib.h. Define rint() if needed. * plug-ins/sel2path/vector.c: Include glib.h (for hypot() renaming on Win32; In the MS C runtime, as hypot() is non-ANSI, it's called _hypot(), sigh). * plug-ins/sinus/sinus_logo.h: Use indexed format, it is easier on some compilers than the huge string.
1999-07-15 00:02:32 +08:00
plasma.o \
ppmtool.o \
app/makefile.cygwin app/makefile.msc plug-ins/makefile.cygwin * app/makefile.cygwin * app/makefile.msc * plug-ins/makefile.cygwin * plug-ins/makefile.msc * modules/makefile.cygwin * modules/makefile.msc * tools/gcg/makefile.cygwin: Various updates. GCC-compiled DLL name change. * app/context_manager.c: Include paint_options.h for prototype. * app/gimpimage.c (gimp_image_initialize_projection): Break out of loop as soon as possible. * app/menus.c (menus_last_opened_cmd_callback): Check if referring to entry not in list. * app/module_db.c (valid_module_name): (Win32) Require module DLL names to include name of compiler built with. * app/paths_dialog.c (paths_draw_segment_points): No use to draw lines if we have less that two points. * app/qmask.c: Include stdio.h and floating_sel.h. * libgimp/makefile.cygwin: New file. * libgimp/Makefile.am: Distribute above file. * libgimp/gimp.def: Update. * libgimp/gimpenv.c (gimp_directory): Don't warn about missing home directory on Win32, it is perfectly natural. * plug-ins/sel2path/global.h: Bypass unused declarations, some of which clash with functions in MSVCRT. * plug-ins/sel2path/math.c * modules/colorsel_water.c: Define M_PI if necessary. * plug-ins/sel2path/sel2path.c: Include config.h and glib.h. Define rint() if needed. * plug-ins/sel2path/vector.c: Include glib.h (for hypot() renaming on Win32; In the MS C runtime, as hypot() is non-ANSI, it's called _hypot(), sigh). * plug-ins/sinus/sinus_logo.h: Use indexed format, it is easier on some compilers than the huge string.
1999-07-15 00:02:32 +08:00
presets.o \
preview.o \
repaint.o \
size.o \
sizemap.o
app/makefile.cygwin app/makefile.msc plug-ins/makefile.cygwin * app/makefile.cygwin * app/makefile.msc * plug-ins/makefile.cygwin * plug-ins/makefile.msc * modules/makefile.cygwin * modules/makefile.msc * tools/gcg/makefile.cygwin: Various updates. GCC-compiled DLL name change. * app/context_manager.c: Include paint_options.h for prototype. * app/gimpimage.c (gimp_image_initialize_projection): Break out of loop as soon as possible. * app/menus.c (menus_last_opened_cmd_callback): Check if referring to entry not in list. * app/module_db.c (valid_module_name): (Win32) Require module DLL names to include name of compiler built with. * app/paths_dialog.c (paths_draw_segment_points): No use to draw lines if we have less that two points. * app/qmask.c: Include stdio.h and floating_sel.h. * libgimp/makefile.cygwin: New file. * libgimp/Makefile.am: Distribute above file. * libgimp/gimp.def: Update. * libgimp/gimpenv.c (gimp_directory): Don't warn about missing home directory on Win32, it is perfectly natural. * plug-ins/sel2path/global.h: Bypass unused declarations, some of which clash with functions in MSVCRT. * plug-ins/sel2path/math.c * modules/colorsel_water.c: Define M_PI if necessary. * plug-ins/sel2path/sel2path.c: Include config.h and glib.h. Define rint() if needed. * plug-ins/sel2path/vector.c: Include glib.h (for hypot() renaming on Win32; In the MS C runtime, as hypot() is non-ANSI, it's called _hypot(), sigh). * plug-ins/sinus/sinus_logo.h: Use indexed format, it is easier on some compilers than the huge string.
1999-07-15 00:02:32 +08:00
endif
ifdef EXTRA_guash
HAVE_RESOURCE = YES
endif
ifdef EXTRA_user_filter
app/makefile.cygwin app/makefile.msc plug-ins/makefile.cygwin * app/makefile.cygwin * app/makefile.msc * plug-ins/makefile.cygwin * plug-ins/makefile.msc * modules/makefile.cygwin * modules/makefile.msc * tools/gcg/makefile.cygwin: Various updates. GCC-compiled DLL name change. * app/context_manager.c: Include paint_options.h for prototype. * app/gimpimage.c (gimp_image_initialize_projection): Break out of loop as soon as possible. * app/menus.c (menus_last_opened_cmd_callback): Check if referring to entry not in list. * app/module_db.c (valid_module_name): (Win32) Require module DLL names to include name of compiler built with. * app/paths_dialog.c (paths_draw_segment_points): No use to draw lines if we have less that two points. * app/qmask.c: Include stdio.h and floating_sel.h. * libgimp/makefile.cygwin: New file. * libgimp/Makefile.am: Distribute above file. * libgimp/gimp.def: Update. * libgimp/gimpenv.c (gimp_directory): Don't warn about missing home directory on Win32, it is perfectly natural. * plug-ins/sel2path/global.h: Bypass unused declarations, some of which clash with functions in MSVCRT. * plug-ins/sel2path/math.c * modules/colorsel_water.c: Define M_PI if necessary. * plug-ins/sel2path/sel2path.c: Include config.h and glib.h. Define rint() if needed. * plug-ins/sel2path/vector.c: Include glib.h (for hypot() renaming on Win32; In the MS C runtime, as hypot() is non-ANSI, it's called _hypot(), sigh). * plug-ins/sinus/sinus_logo.h: Use indexed format, it is easier on some compilers than the huge string.
1999-07-15 00:02:32 +08:00
uf_lexer.c : uf_lexer.l
flex -Cem -ouf_lexer.c uf_lexer.l
uf_parser.tab.c: uf_parser.y
bison --defines --verbose uf_parser.y
OBJECTS = \
libyywrap.o \
uf_eval.o \
uf_file.o \
uf_gui.o \
uf_lexer.o \
uf_main.o \
uf_parser.tab.o
endif
ifdef EXTRA_twain
OBJECTS = \
tw_func.o \
tw_util.o \
twain.o
EXTRALIBS = -luser32
endif
ifdef EXTRA_winsnap
HAVE_RESOURCE = YES
endif
GIMP_VER = 1.1
GTK_VER = 1.3
GLIB_VER = 1.3
GTK = $(TOP)/../gtk+
GLIB = $(TOP)/../glib
INTL = $(TOP)/../intl
PLUGINDIR = $(TOP)/plug-ins
OPTIMIZE = -O
CC = gcc $(OPTIMIZE) -mno-cygwin -mpentium -fnative-struct
CFLAGS = -DHAVE_CONFIG_H $(EXTRACFLAGS) -I. -I$(TOP) -I$(PLUGINDIR) -I$(PLUGINDIR)/libgck -I$(GLIB) -I$(GTK)/gdk/win32 -I$(GTK) -I$(INTL)
ifdef PLUGIN
# This part is used when building individual plug-ins
all : $(PLUGIN).exe
install : all
$(INSTALL) $(PLUGIN).exe $(BIN)
ifndef OBJECTS
OBJECTS = $(PLUGIN).o
endif
ifdef HAVE_RESOURCE
# We have our own resource file (just an icon, usually)
RESOURCE = $(PLUGIN)res.o
else
# Use the Wilber icon otherwise. If gimp.exe eventually gets more resources,
# this will have to be changed.
RESOURCE = ../../app/gimpres.o
endif
$(PLUGIN).exe : $(OBJECTS) $(RESOURCE)
$(CC) $(CFLAGS) -mwindows -s -o $(PLUGIN).exe $(OBJECTS) $(RESOURCE) -L $(PLUGINDIR)/megawidget -lmegawidget -L $(PLUGINDIR)/gpc -lgpc -L $(PLUGINDIR)/libgck/gck -lgck -L ../../libgimp -lgimp-$(GIMP_VER) -lgimpui-$(GIMP_VER) -L $(GTK)/gtk -lgtk-$(GTK_VER) -L $(GTK)/gdk/win32 -lgdk-$(GTK_VER) -L $(INTL) -lgnu-intl -L $(GLIB) -lglib-$(GLIB_VER) $(EXTRALIBS) $(LDFLAGS)
# Kludge to get the path to the win32 headers
WIN32APIHEADERS = $(shell echo "\#include <winver.h>" | $(CC) -M -E - | tail -1 | sed -e 's!/winver.h!!')
$(PLUGIN)res.o : $(PLUGIN).rc
windres --include-dir $(WIN32APIHEADERS) $(PLUGIN).rc $(PLUGIN)res.o
endif
ifdef LIBRARY
# This part is used when building a library
all : lib$(LIBRARY).a
install : all
ifndef OBJECTS
OBJECTS = $(LIBRARY).o
endif
lib$(LIBRARY).a : $(OBJECTS)
-rm $@
ar rc $@ $(OBJECTS)
endif
.c.o :
$(CC) $(CFLAGS) -c $<
clean :
-rm *.o *.a *.exe
endif # ifndef FROMPLUGINSDIR