Commit e8914730 authored by Tor Lillqvist's avatar Tor Lillqvist
Browse files

Add build setup for modules like Gimp-Python.

* plug-ins/makefile.{cygwin,msc}: Add build setup for modules like
Gimp-Python.

* plug-ins/pygimp/gimpmodule.c: Change NATIVE_WIN32 to G_OS_WIN32.
parent a075daa2
......@@ -36,6 +36,11 @@
 
* libgimp/color_display.h: Add G_MODULE_EXPORT declarations.
 
* plug-ins/makefile.{cygwin,msc}: Add build setup for modules like
Gimp-Python.
* plug-ins/pygimp/gimpmodule.c: Change NATIVE_WIN32 to G_OS_WIN32.
Tue Jan 4 18:00:40 CET 2000 Sven Neumann <sven@gimp.org>
 
* plug-ins/script-fu/scripts/circuit.scm: someone didn't close a
......
......@@ -13,6 +13,7 @@ BIN = $(GIMP)/plug-ins
ifndef LIBRARY
ifndef PLUGIN
ifndef MODULE
# This part is used when making from the plug-ins directory
......@@ -133,6 +134,7 @@ gap-data-install:
-mkdir $(GIMP)/scripts
$(INSTALL) gap/*.scm $(GIMP)/scripts
endif # ifndef MODULE
endif # ifndef PLUGIN
endif # ifndef LIBRARY
......@@ -358,6 +360,11 @@ OBJECTS = \
maze_face.o
endif
ifdef EXTRA_mpeg
EXTRACFLAGS = -I$(MPEG)
EXTRALIBS = -L $(MPEG)/release -lmpeg
endif
ifdef EXTRA_png
EXTRACFLAGS = -I$(PNG) -I$(ZLIB)
EXTRALIBS = -L $(PNG) -lpng -L $(ZLIB) -lz
......@@ -523,8 +530,10 @@ PNG = $(TOP)/../libpng-1.0.3
TIFF = $(TOP)/../tiff-v3.4/libtiff
# Location of jpeg-6b sources
JPEG = $(TOP)/../jpeg-6b
# And zlib
# and zlib
ZLIB = $(TOP)/../zlib-1.1.3
# and libmpeg
MPEG = $(TOP)/../mpeg_lib-1.3.0
PLUGINDIR = $(TOP)/plug-ins
......@@ -585,6 +594,29 @@ lib$(LIBRARY).a : $(OBJECTS)
endif
ifdef MODULE
# This part is used when building a module
# (This doesn't work, the only module so far is pygimp, and only Hans Breuer
# builds it, with MSVC.)
# Allow building libraries with specific extensions
ifndef MODULE_EXT
MODULE_EXT = dll
endif
all : $(MODULE).$(MODULE_EXT)
install : all
ifndef OBJECTS
OBJECTS = $(MODULE).o
endif
$(MODULE).$(MODULE_EXT) : $(OBJECTS) $(MODULE).def
$(CC) $(CFLAGS) -mwindows -s -o $@ $(OBJECTS) $(LDFLAGS) $(EXTRALIBS) -L ../../libgimp -lgimp-$(GIMP_VER) -lgimpui-$(GIMP_VER) -L $(GTK)\gtk -lgtk-$(GTK_VER) -L $(GLIB) -lgmodule-$(GLIB_VER) -lglib-$(GLIB_VER)
endif
.c.o :
$(CC) $(CFLAGS) -c $<
......
......@@ -13,6 +13,7 @@ BIN = $(GIMP)\plug-ins
!IFNDEF LIBRARY
!IFNDEF PLUGIN
!IFNDEF MODULE
# This part is used when making from the plug-ins directory
......@@ -148,6 +149,7 @@ gimpressionist-data-install :
!ENDIF
!ENDIF
!ENDIF
!IFNDEF FROMPLUGINSDIR
......@@ -373,6 +375,11 @@ OBJECTS = \
maze_face.obj
!ENDIF
!IFDEF EXTRA_mpeg
EXTRACFLAGS = -I$(MPEG)
EXTRALIBS = $(MPEG)\release\libmpeg.lib
!ENDIF
!IFDEF EXTRA_png
EXTRACFLAGS = -I$(PNG) -I$(ZLIB)
EXTRALIBS = $(PNG)\libpng.lib $(ZLIB)\zlib.lib
......@@ -544,8 +551,10 @@ PNG = $(TOP)\..\libpng-1.0.3
TIFF = $(TOP)\..\tiff-v3.4\libtiff
# Location of jpeg-6b sources
JPEG = $(TOP)\..\jpeg-6b
# And zlib
# and zlib
ZLIB = $(TOP)\..\zlib-1.1.3
# and libmpeg
MPEG = $(TOP)\..\mpeg_lib-1.3.0
PLUGINDIR = $(TOP)\plug-ins
......@@ -618,6 +627,26 @@ $(LIBRARY).lib : $(OBJECTS)
!ENDIF
!IFDEF MODULE
# This part is used when building a module
# Allow building libraries with specific extensions
!IFNDEF MODULE_EXT
MODULE_EXT = dll
!ENDIF
all : $(MODULE).$(MODULE_EXT)
install : all
!IFNDEF OBJECTS
OBJECTS = $(MODULE).obj
!ENDIF
$(MODULE).$(MODULE_EXT) : $(OBJECTS) $(MODULE).def
$(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
!ENDIF
.c.obj :
$(CC) $(CFLAGS) -c $<
......
......@@ -3763,7 +3763,7 @@ gimp_Main(self, args)
for (i = 0; i < argc; i++)
argv[i] = g_strdup(PyString_AsString(PyList_GetItem(av, i)));
#ifdef NATIVE_WIN32
#ifdef G_OS_WIN32
{
extern void set_gimp_PLUG_IN_INFO_PTR(GPlugInInfo *);
set_gimp_PLUG_IN_INFO_PTR(&PLUG_IN_INFO);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment