1999-03-07 20:56:03 +08:00
|
|
|
## Makefile for building gimp.exe with Microsoft C
|
|
|
|
## Use: nmake -f makefile.msc
|
|
|
|
|
|
|
|
# Change this to wherever you want to install gimp.exe.
|
2000-04-24 04:27:41 +08:00
|
|
|
# This is what I use as installation target, from where the installer-builder
|
|
|
|
# will pick it up.
|
|
|
|
BIN = C:\install\gimp\bin
|
Check for mmap.
* configure.in: Check for mmap.
* app/makefile.msc: Depend on gimpi.lib.
* app/app_procs.c (app_init): Fix gccism: Allocate filenames (an
array with non-constant size) dynamically.
* app/{datafiles,fileops,general,install,module_db,temp_buf}.c:
Include glib.h before standard headers, because of certain obscure
details related to compiling with gcc on Win32.
(If you really want to know: glib.h defines he names of POSIXish
(but non-ANSI) functions as prefixed with underscore, because
that's how they are named in the msvcrt runtime C library we want
to use. However, defining stat as _stat causes some problems if
done after including the mingw32 <sys/stat.h>. So, it's easiest to
include <glib.h> early.)
* app/main.c: Use _stdcall and __argc, __argv with MSC, but
__attribute__((stdcall)) and _argc, _argv with gcc. Don't print
the "Passed serialization test" message on Win32. (It would open
up an otherwise unnecessary console window.)
* app/paint_funcs.c (gaussian_blur_region): Don't use variable sum
until initialized.
* app/{bezier_select,paths_dialog}.c: Include config.h and define
rint() if necessary.
* app/plug_in.c: Use _spawnv, not spawnv, on Win32 and OS/2.
1999-05-29 01:47:17 +08:00
|
|
|
|
2001-02-07 09:16:18 +08:00
|
|
|
TOP = ..\..
|
|
|
|
|
1999-07-15 00:02:32 +08:00
|
|
|
################################################################
|
|
|
|
|
|
|
|
# Nothing much configurable below
|
2001-02-07 09:16:18 +08:00
|
|
|
!INCLUDE $(TOP)\build\win32\make.msc
|
1999-03-07 20:56:03 +08:00
|
|
|
|
Win32 portability changes:
* config.h.win32, README.win32: Small changes.
* tools/pdbgen/pdb/*.pdb: Include <string.h>.
* app/*_cmds.c: Autogenerated files reflect above changes.
* libgimp/makefile.msc app/makefile.msc: Various updates,
including new object files. Gtk+ directory now should be called
gtk+ (not gtk-plus). Use win32-specific gdk subdir. Glib directory
now should be called just glib.
* libgimp/gimp.def: Updates.
* libgimp/gimpfeatures.h.win32: Made current with
gimpfeatures.h.in.
* libgimp/gimpfileselection.c: Define S_ISDIR and S_ISREG if
necessary.
* tools/pdbgen/pdb/fileops.pdb: Must have a
statement (even an empty one) after a label.
* app/fileops_cmds.c: Autogenerated file reflects above changes.
* app/crop.c: Include <string.h>.
* app/{app_procs,batch,fileops,datafiles,errorconsole,general,
plug_in,temp_buf,tile_swap}.c: Test NATIVE_WIN32, not
_MSC_VER. (NATIVE_WIN32 means we are using the Microsoft C
runtime, even if we might be compiling with gcc.)
* app/fileops.c: Don't include <process.h> here.
* app/fileops.h: Do include <process.h> here.
* app/gimpparasite.c: Include config.h, guard inclusion of
<unistd.h>. (Is the inclusion of unistd.h in source files all over
the place really necessary?)
* app/ink.c: MSC doesn't handle conversion from unsigned __int64
to double, so cast to signed.
* app/lut_funcs.c: Include config.h, and define rint() if necessary.
* app/pixel_processor.c: Include config.h without "..", like in
all the other places. Include <string.h>
* app/text_tool.c: Guard the "POINTS" identifier that clashes with
<windows.h>, sigh.
1999-05-05 05:32:17 +08:00
|
|
|
# cl -? describes the options
|
1999-06-29 01:54:19 +08:00
|
|
|
CC = cl -GA -G5 -GF $(OPTIMIZE) -W3 -nologo
|
1999-03-07 20:56:03 +08:00
|
|
|
|
Add gimpcolorspace object.
2000-01-04 Tor Lillqvist <tml@iki.fi>
* libgimp/makefile.{cygwin.msc}: Add gimpcolorspace object.
* libgimp/gimp.def: Add functions from it.
Fixes from Hans Breuer:
* app/datafiles.c: redefine the executable flag for Win32
to _S_IREAD, to get _all_ files from the plug-in dirs as
executables (including scripts)
* app/main.c: Win32-specific changes to allow building Gimp as a
console application, with all its benefits (like inheriting the
console), but hide it if the user doesn't want it. Also, if stdout
goes to a console, give the user a chance to read the help or
version messages. (tml: I am not convinced that it is better to
build gimp as a console application, but let's try it this way for
a while.)
* app/makefile.{cygwin,msc}: Build as console application, and
link with shell32 library.
* app/paint_core.c (paint_core_motion): Pass the value of a call
to the function gimage_active_drawable() to the paint_func,
instead of just passing the address of gimage_active_drawable...
(tml: This code is only called when the TOOL_TRACES_ON_WINDOW flag
is on, and only the clone tool sets that, and the clone tool's
paint_func doesn't use the drawable argument, so this hasn't
caused any trouble.)
* app/plug_in.c: On Win32, to support scripts, use new function
xspawn() instead of _spawnv. Add some more code to properly kill
plug-ins.
* libgimp/color_display.h: Add G_MODULE_EXPORT declarations.
2000-01-05 01:46:41 +08:00
|
|
|
LDFLAGS = /link /subsystem:console /machine:ix86 $(LINKDEBUG)
|
1999-03-07 20:56:03 +08:00
|
|
|
INSTALL = copy
|
|
|
|
|
2001-02-07 09:16:18 +08:00
|
|
|
GIMP_VER = 1.3
|
1999-03-07 20:56:03 +08:00
|
|
|
|
2001-02-07 09:16:18 +08:00
|
|
|
CFLAGS = -DREGEX_MALLOC -DHAVE_CONFIG_H -I. -I.. $(GLIB_CFLAGS) $(GTK_CFLAGS) $(INTL_CFLAGS)
|
1999-03-07 20:56:03 +08:00
|
|
|
|
|
|
|
all : \
|
|
|
|
..\config.h \
|
|
|
|
gimpim.lib \
|
|
|
|
colormap_dialog.c \
|
|
|
|
gimp.exe
|
|
|
|
|
|
|
|
install : gimp.exe
|
|
|
|
$(INSTALL) gimp.exe $(BIN)
|
|
|
|
|
|
|
|
..\config.h : ..\config.h.win32
|
1999-06-15 06:18:02 +08:00
|
|
|
copy ..\config.h.win32 $@
|
|
|
|
|
1999-03-07 20:56:03 +08:00
|
|
|
gimpim_OBJECTS = \
|
Win32 portability changes:
* config.h.win32, README.win32: Small changes.
* tools/pdbgen/pdb/*.pdb: Include <string.h>.
* app/*_cmds.c: Autogenerated files reflect above changes.
* libgimp/makefile.msc app/makefile.msc: Various updates,
including new object files. Gtk+ directory now should be called
gtk+ (not gtk-plus). Use win32-specific gdk subdir. Glib directory
now should be called just glib.
* libgimp/gimp.def: Updates.
* libgimp/gimpfeatures.h.win32: Made current with
gimpfeatures.h.in.
* libgimp/gimpfileselection.c: Define S_ISDIR and S_ISREG if
necessary.
* tools/pdbgen/pdb/fileops.pdb: Must have a
statement (even an empty one) after a label.
* app/fileops_cmds.c: Autogenerated file reflects above changes.
* app/crop.c: Include <string.h>.
* app/{app_procs,batch,fileops,datafiles,errorconsole,general,
plug_in,temp_buf,tile_swap}.c: Test NATIVE_WIN32, not
_MSC_VER. (NATIVE_WIN32 means we are using the Microsoft C
runtime, even if we might be compiling with gcc.)
* app/fileops.c: Don't include <process.h> here.
* app/fileops.h: Do include <process.h> here.
* app/gimpparasite.c: Include config.h, guard inclusion of
<unistd.h>. (Is the inclusion of unistd.h in source files all over
the place really necessary?)
* app/ink.c: MSC doesn't handle conversion from unsigned __int64
to double, so cast to signed.
* app/lut_funcs.c: Include config.h, and define rint() if necessary.
* app/pixel_processor.c: Include config.h without "..", like in
all the other places. Include <string.h>
* app/text_tool.c: Guard the "POINTS" identifier that clashes with
<windows.h>, sigh.
1999-05-05 05:32:17 +08:00
|
|
|
gimpdrawable.obj\
|
1999-03-07 20:56:03 +08:00
|
|
|
gimpimage.obj \
|
Win32 portability changes:
* config.h.win32, README.win32: Small changes.
* tools/pdbgen/pdb/*.pdb: Include <string.h>.
* app/*_cmds.c: Autogenerated files reflect above changes.
* libgimp/makefile.msc app/makefile.msc: Various updates,
including new object files. Gtk+ directory now should be called
gtk+ (not gtk-plus). Use win32-specific gdk subdir. Glib directory
now should be called just glib.
* libgimp/gimp.def: Updates.
* libgimp/gimpfeatures.h.win32: Made current with
gimpfeatures.h.in.
* libgimp/gimpfileselection.c: Define S_ISDIR and S_ISREG if
necessary.
* tools/pdbgen/pdb/fileops.pdb: Must have a
statement (even an empty one) after a label.
* app/fileops_cmds.c: Autogenerated file reflects above changes.
* app/crop.c: Include <string.h>.
* app/{app_procs,batch,fileops,datafiles,errorconsole,general,
plug_in,temp_buf,tile_swap}.c: Test NATIVE_WIN32, not
_MSC_VER. (NATIVE_WIN32 means we are using the Microsoft C
runtime, even if we might be compiling with gcc.)
* app/fileops.c: Don't include <process.h> here.
* app/fileops.h: Do include <process.h> here.
* app/gimpparasite.c: Include config.h, guard inclusion of
<unistd.h>. (Is the inclusion of unistd.h in source files all over
the place really necessary?)
* app/ink.c: MSC doesn't handle conversion from unsigned __int64
to double, so cast to signed.
* app/lut_funcs.c: Include config.h, and define rint() if necessary.
* app/pixel_processor.c: Include config.h without "..", like in
all the other places. Include <string.h>
* app/text_tool.c: Guard the "POINTS" identifier that clashes with
<windows.h>, sigh.
1999-05-05 05:32:17 +08:00
|
|
|
gimpobject.obj \
|
1999-06-29 01:54:19 +08:00
|
|
|
gimppreviewcache.obj\
|
2001-02-07 09:16:18 +08:00
|
|
|
# gimpset.obj \
|
|
|
|
# gimpsignal.obj
|
1999-03-07 20:56:03 +08:00
|
|
|
|
|
|
|
gimpim.lib : $(gimpim_OBJECTS)
|
|
|
|
lib /out:gimpim.lib $(gimpim_OBJECTS)
|
|
|
|
|
|
|
|
gimp_OBJECTS = \
|
2001-02-07 09:16:18 +08:00
|
|
|
about_dialog.obj \
|
|
|
|
app_procs.obj \
|
|
|
|
asupsample.obj \
|
|
|
|
batch.obj \
|
|
|
|
boundary.obj \
|
|
|
|
brush_edit.obj \
|
|
|
|
brush_scale.obj \
|
|
|
|
brush_select.obj \
|
|
|
|
brushes.obj \
|
|
|
|
channel_ops.obj \
|
|
|
|
channels_dialog.obj \
|
|
|
|
color_area.obj \
|
|
|
|
color_notebook.obj \
|
|
|
|
color_panel.obj \
|
|
|
|
color_select.obj \
|
|
|
|
color_transfer.obj \
|
|
|
|
colormap_dialog.obj \
|
|
|
|
colormaps.obj \
|
|
|
|
commands.obj \
|
|
|
|
context_manager.obj \
|
|
|
|
convert.obj \
|
|
|
|
cursorutil.obj \
|
|
|
|
datafiles.obj \
|
|
|
|
desaturate.obj \
|
|
|
|
devices.obj \
|
|
|
|
dialog_handler.obj \
|
|
|
|
disp_callbacks.obj \
|
|
|
|
docindex.obj \
|
|
|
|
draw_core.obj \
|
|
|
|
drawable.obj \
|
|
|
|
equalize.obj \
|
|
|
|
errorconsole.obj \
|
|
|
|
errors.obj \
|
|
|
|
file_new_dialog.obj \
|
|
|
|
fileops.obj \
|
|
|
|
floating_sel.obj \
|
|
|
|
gdisplay.obj \
|
|
|
|
gdisplay_ops.obj \
|
|
|
|
general.obj \
|
|
|
|
gimage.obj \
|
|
|
|
gimage_mask.obj \
|
|
|
|
gimpbrush.obj \
|
|
|
|
gimpbrushgenerated.obj \
|
|
|
|
gimpbrushpipe.obj \
|
|
|
|
gimpchannel.obj \
|
|
|
|
gimpconstrainedhwrapbox.obj \
|
|
|
|
gimpcontainer.obj \
|
|
|
|
gimpcontainergridview.obj \
|
|
|
|
gimpcontainerlistview.obj \
|
|
|
|
gimpcontainerview.obj \
|
|
|
|
gimpcontext.obj \
|
|
|
|
gimpcontextpreview.obj \
|
|
|
|
gimpdatalist.obj \
|
|
|
|
gimpdnd.obj \
|
|
|
|
gimpdrawable.obj \
|
|
|
|
gimpdrawablepreview.obj \
|
|
|
|
gimphelp.obj \
|
|
|
|
gimphistogram.obj \
|
|
|
|
gimpimage.obj \
|
|
|
|
gimplayer.obj \
|
|
|
|
gimplayermask.obj \
|
|
|
|
gimplist.obj \
|
|
|
|
gimplut.obj \
|
|
|
|
gimpmarshal.obj \
|
|
|
|
gimpobject.obj \
|
|
|
|
gimppalette.obj \
|
|
|
|
gimpparasite.obj \
|
|
|
|
gimppattern.obj \
|
|
|
|
gimppreview.obj \
|
|
|
|
gimppreviewcache.obj \
|
|
|
|
gimpprogress.obj \
|
|
|
|
gimprc.obj \
|
|
|
|
gimpui.obj \
|
|
|
|
gimpunit.obj \
|
|
|
|
gimpviewable.obj \
|
|
|
|
global_edit.obj \
|
|
|
|
gradient.obj \
|
|
|
|
gradient_select.obj \
|
|
|
|
gtkhwrapbox.obj \
|
|
|
|
gtkvwrapbox.obj \
|
|
|
|
gtkwrapbox.obj \
|
|
|
|
gximage.obj \
|
|
|
|
histogramwidget.obj \
|
|
|
|
image_map.obj \
|
|
|
|
image_new.obj \
|
|
|
|
image_render.obj \
|
|
|
|
indicator_area.obj \
|
|
|
|
info_dialog.obj \
|
|
|
|
info_window.obj \
|
|
|
|
interface.obj \
|
|
|
|
invert.obj \
|
|
|
|
layer_select.obj \
|
|
|
|
layers_dialog.obj \
|
|
|
|
lc_dialog.obj \
|
|
|
|
libgimp_glue.obj \
|
|
|
|
lut_funcs.obj \
|
|
|
|
main.obj \
|
|
|
|
menus.obj \
|
|
|
|
module_db.obj \
|
|
|
|
nav_window.obj \
|
|
|
|
ops_buttons.obj \
|
|
|
|
paint_funcs.obj \
|
|
|
|
palette.obj \
|
|
|
|
palette_import.obj \
|
|
|
|
palette_select.obj \
|
|
|
|
parasitelist.obj \
|
|
|
|
path.obj \
|
|
|
|
paths_dialog.obj \
|
|
|
|
pattern_select.obj \
|
|
|
|
patterns.obj \
|
|
|
|
pixel_processor.obj \
|
|
|
|
pixel_region.obj \
|
|
|
|
plug_in.obj \
|
|
|
|
preferences_dialog.obj \
|
|
|
|
qmask.obj \
|
|
|
|
regexrepl.obj \
|
|
|
|
resize.obj \
|
|
|
|
resolution_calibrate.obj \
|
|
|
|
scale.obj \
|
|
|
|
scan_convert.obj \
|
|
|
|
scroll.obj \
|
|
|
|
selection.obj \
|
|
|
|
session.obj \
|
|
|
|
temp_buf.obj \
|
|
|
|
tile.obj \
|
|
|
|
tile_cache.obj \
|
|
|
|
tile_manager.obj \
|
|
|
|
tile_swap.obj \
|
|
|
|
tips_dialog.obj \
|
|
|
|
toolbox.obj \
|
|
|
|
undo.obj \
|
|
|
|
undo_history.obj \
|
|
|
|
user_install.obj \
|
|
|
|
xcf.obj \
|
|
|
|
# gdisplay_color.obj \
|
|
|
|
# gdisplay_color_ui.obj \
|
|
|
|
# gimpbrushlist.obj \
|
|
|
|
# path_bezier.obj \
|
|
|
|
# path_curves.obj \
|
|
|
|
|
1999-03-07 20:56:03 +08:00
|
|
|
|
|
|
|
gimp.res : gimp.rc wilber.ico
|
|
|
|
rc -r -fo gimp.res gimp.rc
|
|
|
|
|
1999-07-30 06:07:17 +08:00
|
|
|
gimp.def: gimp.sym
|
|
|
|
echo EXPORTS >$@
|
|
|
|
copy /y $@+gimp.sym $@
|
|
|
|
|
Check for mmap.
* configure.in: Check for mmap.
* app/makefile.msc: Depend on gimpi.lib.
* app/app_procs.c (app_init): Fix gccism: Allocate filenames (an
array with non-constant size) dynamically.
* app/{datafiles,fileops,general,install,module_db,temp_buf}.c:
Include glib.h before standard headers, because of certain obscure
details related to compiling with gcc on Win32.
(If you really want to know: glib.h defines he names of POSIXish
(but non-ANSI) functions as prefixed with underscore, because
that's how they are named in the msvcrt runtime C library we want
to use. However, defining stat as _stat causes some problems if
done after including the mingw32 <sys/stat.h>. So, it's easiest to
include <glib.h> early.)
* app/main.c: Use _stdcall and __argc, __argv with MSC, but
__attribute__((stdcall)) and _argc, _argv with gcc. Don't print
the "Passed serialization test" message on Win32. (It would open
up an otherwise unnecessary console window.)
* app/paint_funcs.c (gaussian_blur_region): Don't use variable sum
until initialized.
* app/{bezier_select,paths_dialog}.c: Include config.h and define
rint() if necessary.
* app/plug_in.c: Use _spawnv, not spawnv, on Win32 and OS/2.
1999-05-29 01:47:17 +08:00
|
|
|
gimp.exe : ..\config.h $(gimp_OBJECTS) gimpim.lib gimp.def gimp.res ..\libgimp\gimpi.lib
|
2001-02-07 09:16:18 +08:00
|
|
|
$(CC) $(CFLAGS) -Fegimp.exe $(gimp_OBJECTS) gimpim.lib ..\libgimp\gimpi.lib \
|
|
|
|
.\pdb\gimppdb-$(GIMP_VER).lib .\tools\gimptools-$(GIMP_VER).lib \
|
|
|
|
..\libgimpwidgets\gimpwidgets-$(GIMP_VER).lib \
|
|
|
|
..\libgimpcolor\gimpcolor-$(GIMP_VER).lib ..\libgimpmath\gimpmath-$(GIMP_VER).lib \
|
|
|
|
$(GTK_LIBS) $(GLIB_LIBS) $(INTL_LIBS) $(LDFLAGS) gimp.res gdi32.lib user32.lib shell32.lib /def:gimp.def
|
|
|
|
|
1999-03-07 20:56:03 +08:00
|
|
|
|
|
|
|
# General rule for building $(gimp_OBJECTS)
|
|
|
|
.c.obj:
|
|
|
|
$(CC) $(CFLAGS) -c $<
|
|
|
|
|
Actually use the enum types GimpImageType, GimpImageBaseType,
* app/*.[ch]: Actually use the enum types GimpImageType,
GimpImageBaseType, LayerModeEffects, PaintApplicationMode,
BrushApplicationMode, GimpFillType and ConvertPaletteType, instead
of just int or gint. Hopefully I catched most of the places
where these should be used.
Add an enum ConvolutionType, suffix the too general constants
NORMAL, ABSOLUTE and NEGATIVE with _CONVOL. Use NORMAL_MODE
instead of NORMAL in some places (this was what was intended). Fix
some minor gccisms.
* app/apptypes.h: New file. This file contains the above
enumeration types, and some opaque struct typedefs. It was
necessary to collect these in one header that doesn't include
other headers, because when we started using the above mentioned
types in the headers, all hell broke loose because of the
spaghetti-like cross-inclusion mess between headers.
(An example: Header A includes header B, which includes header C
which includes A. B uses a type defined in A. This is not defined,
because A hasn't defined it yet at the point where it includes B,
and A included from B of course is skipped as we already are
reading A.)
1999-08-19 07:41:39 +08:00
|
|
|
.c.i :
|
|
|
|
$(CC) $(CFLAGS) -E $< >$@
|
|
|
|
|
2001-02-07 09:16:18 +08:00
|
|
|
clean::
|
1999-03-07 20:56:03 +08:00
|
|
|
del *.exe
|
|
|
|
del *.lib
|
|
|
|
del *.obj
|
|
|
|
del *.exp
|
|
|
|
del *.err
|
|
|
|
del *.map
|
|
|
|
del *.sym
|
|
|
|
del *.lk1
|
|
|
|
del *.mk1
|
|
|
|
del *.pdb
|
|
|
|
del *.ilk
|