*************************************************************************************************************************** *************************************************************************************************************************** ***************** MISE À JOUR DE L'ENVIRONNEMENT DE COMPILATION "msys-mingw-gimp" ***************** *************************************************************************************************************************** *************************************************************************************************************************** Par samj, le 6 août 2013 Cette petite notice permet de mettre à jour l'environnement de compilation proposé sur notre site : http://www.aljacom.com/~gmic/msys-mingw-gimp.7z La mise à jour permet d'obtenir un environnement pour Gimp 2.8. Le fichier de cette notice est disponible à cette adresse : http://www.aljacom.com/~gmic/mise_a_jour_environnement_msys-mingw-gimp.txt Version 6.2 - 20130808 Version 6.1 - 20130808 Version 6 - 20130808 Version 5 - 20130808 Version 4 - 20130807 Version 3 - 20130807 Version 2 - 20130806 Version 1 - 20130806 But de la version 1 : Compiler gimp-plugin-template dans un environnement Gimp 2.8 avec les nouveaux compilateurs. But de la version 2 : Compiler Gimp 2.8.6 But de la version 3 : Compiler un plug-in C avec un makefile, par exemple BIMP d'Alessandro Francesconi But de la version 4 : Ajout de pthreads, compilation de G'MIC et du plug-in G'MIC pour Gimp en C++. But de la version 5 : Quelques ajustements du fichier c:\msys-mingw-gimp\msys\etc\profile , mise en page But de la version 6 : Compiler un simple plugin C, par exemple vignetting.c But de la version 6.1 : Correction de la version 1 suite à la mise à jour des scripts de Drawoc But de la version 6.2 : Correction de la version 1 , suite à relecture oubli de supprimer la ligne sur "sezero_20111101-w32-update-rev.5747.zip" (à l'origine du document je voulais utiliser les compilateurs de sezero, mais j'ai choisi ceux de rubenvb). Pour compiler d'autres plug-ins des adaptations seront à faire ... ajout de bibliothèques, corrections, compilations ... Je n'assure pas de suivi sur ce sujet. Les utilisateurs doivent avoir les connaissances nécessaires pour faire évoluer leur environnement. Personnellement je n'utilise pas cet environnement. Ceux que j'utilise sont beaucoup plus complets. Vous pouvez l'améliorer selon vos désirs (DIY). Remarques : - Après chaque paragraphe contenant des archives issues de http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.2/noarch/ vous devez supprimer les téléchargements et les extractions. - Pour gagner du temps j'utilise l'éditeur Notepad++ http://notepad-plus-plus.org/ . Cet éditeur est un logiciel "libre" qui permet de faire des recherches et des modifications en une seule opération sur plusieurs fichiers (exemple : modifications des fichiers .pc). - Cette notice est écrite en même temps que mes essais. Il existe donc des façons différentes, plus simples pour obtenir le même résultat. - L'application des versions 1 et 2 permet d'obtenir un environnement relativement acceptable. *************************************************************************************************************************** *************************************************************************************************************************** *************************************************** LES VERSIONS *************************************************** *************************************************************************************************************************** *************************************************************************************************************************** ***** Version 1 début ***** Phases - Compiler Gimp 2.8.7 en utilisant VirtualBox avec cette machine virtuelle : http://www.aljacom.com/~gmic/GimpEVAL-20130719-32bits.7z Volume : (1 658 776 406 octets) / MD5 : 8aec87f1b17a8c805f9c26274a63063b - Pour compiler Gimp 2.8.7 utiliser les commandes suivantes (vérifier la commande sudo apt-get install ... sur le site de Drawoc car les mises à jour sont fréquentes https://github.com/drawoc/windows-gimp-jhbuild ) : sudo apt-get install build-essential mingw-w64 git jhbuild automake autoconf libtool libgtk2.0-dev ragel intltool bison flex gperf gtk-doc-tools nasm ruby (Mot de passe - Password : roottoor ) cd /home/gimpeval/Downloads wget https://github.com/drawoc/windows-gimp-jhbuild/archive/master.zip unzip master.zip cd /home/gimpeval/Downloads/windows-gimp-jhbuild-master MODULE=gimp-stable ./build S'il y a des erreurs valider l'option : [3] Give up on module - Monter le répertoire de partage avec, par exemple : (Password : roottoor) sudo mount -t vboxsf C_DRIVE /mnt/partage - Ouvrir le gestionnaire de fichiers (Password : roottoor) sudo thunar - Copier /home/gimpeval/Downloads/windows-gimp-jhbuild-master/targets/gimp-stable sur votre disque dur Windows, attendre la fin de la copie et fermer la machine virtuelle. - Maintenant toutes les opérations seront dans Windows. - copier et coller dans un répertoire de sauvegarde : c:\msys-mingw-gimp\msys\1.0\etc\fstab c:\msys-mingw-gimp\msys\1.0\etc\profile - Supprimer la totalité des contenus des 2 répertoires : c:\msys-mingw-gimp\MinGW c:\msys-mingw-gimp\msys - Récupérer tous les fichiers . pc contenus dans \gimp-stable - Les éditer tous pour obtenir : prefix=/mingw libdir=/mingw/lib remplacer /home/gimpeval/Downloads/windows-gimp-jhbuild-master/targets/gimp-stable// par /mingw/ enregistrer et les placer tous ces fichiers .pc dans \gimp-stable\lib\pkgconfig - Couper la totalité du contenu du répertoire \gimp-stable et coller dans c:\msys-mingw-gimp\MinGW - Nous installons les nouveaux compilateurs. - Télécharger http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/rubenvb/gcc-4.7-release/i686-w64-mingw32-gcc-4.7.4-release-win64_rubenvb.7z/download - Décompresser i686-w64-mingw32-gcc-4.7.4-release-win64_rubenvb.7z , copier et coller tout le contenu du répertoire de décompression \mingw32 en écrasant les fichiers existants dans c:\msys-mingw-gimp\MinGW Remarque : Emplacement de l'erreur corrigée dans la version 6.2 (les lignes sont supprimées) - Nous changeons de version de msys - Télécharger http://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/MSYS%20%2832-bit%29/MSYS-20111123.zip/download dans le répertoire c:\msys-mingw-gimp - Extraire MSYS-20111123.zip dans c:\msys-mingw-gimp - Tester en ouvrant le terminal par c:\msys-mingw-gimp\msys\msys.bat - Fermer le terminal - Copier le fichier fstab sauvegardé dans c:\msys-mingw-gimp\msys\etc - Éditer c:\msys-mingw-gimp\msys\etc\profile en ajoutant avant la ligne export HOME LOGNAME MSYSTEM HISTFILE : ################################################################ export PKG_CONFIG_PATH="/mingw/lib/pkgconfig:$PKG_CONFIG_PATH" CVS_RSH=ssh CFLAGS="-I/mingw/include -I/mingw/x86_64-w64-mingw32/include -I/python/include -pipe -O3 -mms-bitfields -march=i686 -s" ###option pour compiler des greffons Gimp (avec l'option -mwindows) LDFLAGS="-L/mingw/lib -L/mingw/x86_64-w64-mingw32/lib -mwindows" export PYTHONPATH="/python:PYTHONPATH" export PATH="/python:$PATH" export PATH="/perl/bin:$PATH" export PATH="/c/msys-mingw-gimp/strawberry-perl/c/bin:$PATH" export HOME LOGNAME MSYSTEM HISTFILE CFLAGS LDFLAGS PKG_CONFIG_PATH CVS_RSH PYTHONPATH ################################################################ - Suite à une erreur dans GhostScript copier uniquement libgs-8.dll dans C:\msys-mingw-gimp\MinGW\bin ( contenu dans l'archive http://www.aljacom.com/~gmic/divers_compilation_croisee.zip ) - Il est possible de tester Gimp 2.8.7 en cliquant sur C:\msys-mingw-gimp\MinGW\bin\gimp-2.8.exe Fermer Gimp - Installation de pkg-config, png, expat, intl Télécharger http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.2/noarch/mingw32-pkg-config-0.27-1.21.noarch.rpm http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.2/noarch/mingw32-libpng-1.5.11-1.22.noarch.rpm http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.2/noarch/mingw32-libpng-devel-1.5.11-1.22.noarch.rpm http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.2/noarch/mingw32-expat-2.0.1-4.19.noarch.rpm http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.2/noarch/mingw32-libexpat-2.0.1-4.19.noarch.rpm http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.2/noarch/mingw32-libexpat-devel-2.0.1-4.19.noarch.rpm http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.2/noarch/mingw32-libintl-0.18.1.1-13.19.noarch.rpm http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.2/noarch/mingw32-libintl-devel-0.18.1.1-13.19.noarch.rpm Faire une double décompression. Editer tous les fichiers .pc contenus dans \usr\i686-w64-mingw32\sys-root\mingw\lib\pkgconfig et mettre prefix=/mingw Copier le contenu du répertoire \usr\i686-w64-mingw32\sys-root\mingw dans C:\msys-mingw-gimp\MinGW en écrasant les fichiers existants. ____________________________________________________________________________________________ ____________________________________________________________________________________________ ____________________________________________________________________________________________ Test de compilarion de gimp-plugin-template ouvrir le terminal par C:\msys-mingw-gimp\msys\msys.bat export CC=/mingw/bin/i686-w64-mingw32-gcc.exe cd /env/gimp-plugin-template-2.2.0 ./configure make Le plug-in est C:\msys-mingw-gimp\gimp-plugin-template-2.2.0\src\gimp-plugin-template.exe Fermer le terminal. ***** version 1 fin ***** ____________________________________________________________________________________________ ____________________________________________________________________________________________ ____________________________________________________________________________________________ ____________________________________________________________________________________________ ____________________________________________________________________________________________ ***** Version 2 début ***** Pour compiler gimp 2.8.6, pouvoir utiliser gimptool-2.0 et améliorer les choses... Le travail fait dans la version 1 n'est pas perdu mais une partie de ce travail sera écrasée car je n'ai pas le temps de reprendre les tests pour créer un nouveau didacticiel. - D'une façon drastique nous installons une version de gimp qui fonctionne bien (pour la détruire ensuite, le monde est cruel mais...). Télécharger et décompresser http://aljacom.com/~gmic/gimp-2.8.7-20130804_portable.7z - Copier tout le contenu du répertoire \gimp-2.8.7-20130804_portable et coller en écrasant les fichiers existants dans C:\msys-mingw-gimp\MinGW - Récupérer tous les fichiers .pc de C:\msys-mingw-gimp\MinGW - Éditer tous ces fichiers .pc pour obtenir : prefix=/mingw libdir=/mingw/lib remplacer /home/gimpeval/Downloads/windows-gimp-jhbuild-master/targets/gimp-stable// par /mingw/ enregistrer et les placer tous ces fichiers .pc dans \gimp-stable\lib\pkgconfig - intltool Site http://sourceforge.net/projects/gtk-mingw/files/intltool/ Télécharger http://sourceforge.net/projects/gtk-mingw/files/intltool/intltool-0.50.2-binwin32.7z/download Décompresser intltool-0.50.2-binwin32.7z , copier et coller le contenu du répertoire \intltool-0.50.2-binwin32 dans C:\msys-mingw-gimp\MinGW - gettext Télécharger http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.2/noarch/mingw32-gettext-runtime-0.18.1.1-13.19.noarch.rpm http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.2/noarch/mingw32-gettext-tools-0.18.1.1-13.19.noarch.rpm Faire une double décompression. Copier le contenu du répertoire \usr\i686-w64-mingw32\sys-root\mingw et coller dans C:\msys-mingw-gimp\MinGW en écrasant les fichiers existants. - libjpeg http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.2/noarch/mingw32-jpeg-8d-3.20.noarch.rpm http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.2/noarch/mingw32-libjpeg-8d-3.20.noarch.rpm http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.2/noarch/mingw32-libjpeg-devel-8d-3.20.noarch.rpm Faire une double décompression. Copier le contenu du répertoire \usr\i686-w64-mingw32\sys-root\mingw et coller dans C:\msys-mingw-gimp\MinGW\i686-w64-mingw32 - problème libexif-12.dll Renommer C:\msys-mingw-gimp\MinGW\bin\libexif-12.dll en C:\msys-mingw-gimp\MinGW\bin\libexif-12_old.dll Télécharger http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.2/noarch/mingw32-libexif-0.6.20-1.20.noarch.rpm Faire une double décompression et copier \usr\i686-w64-mingw32\sys-root\mingw\bin\libexif-12.dll dans C:\msys-mingw-gimp\MinGW\bin - Télécharger les sources de Gimp 2.8.6 ftp://ftp.gimp.org/pub/gimp/v2.8/gimp-2.8.6.tar.bz2 et décompresser dans C:\msys-mingw-gimp - Compilation de Gimp (Sous Windows, c'est très, très, très long...) , ouvrir le terminal par C:\msys-mingw-gimp\msys\msys.bat cd /env/gimp-2.8.6 export CC=/mingw/bin/i686-w64-mingw32-gcc.exe ./configure --prefix=/mingw --disable-python make make install gimp-2.8.exe Fermer Gimp. Fermer le terminal. Démarrer Gimp par C:\msys-mingw-gimp\MinGW\GIMP_IT.exe pour avoir Gimp en italien. Fermer Gimp ***** version 2 fin ***** ____________________________________________________________________________________________ ____________________________________________________________________________________________ ____________________________________________________________________________________________ ____________________________________________________________________________________________ ____________________________________________________________________________________________ ***** Version 3 début ***** Compilation d'un plug-in C avec un makefile, par exemple BIMP d'Alessandro Francesconi. - Télécharger les sources de Bimp dans C:\msys-mingw-gimp à partir de ce lien : https://github.com/alessandrofrancesconi/gimp-plugin-bimp/archive/master.zip - Décompresser l'archive gimp-plugin-bimp-master.zip - Éditer C:\msys-mingw-gimp\gimp-plugin-bimp-master\Makefile comme suit : ################################################################ B_CFLAGS = -I/mingw/include -I/mingw/x86_64-w64-mingw32/include -I/python/include -pipe -O3 -mms-bitfields -march=i686 -s B_LDFLAGS = -L/mingw/lib -L/mingw/x86_64-w64-mingw32/lib -mwindows GIMPARGS = $(shell gimptool-2.0 --cflags --libs) PCREARGS = $(shell pcre-config --cflags --libs) make: /mingw/bin/i686-w64-mingw32-gcc.exe -o ./bin/bimp -Wall -O2 -Wno-unused-variable -Wno-pointer-sign -Wno-parentheses src/*.c src/manipulation-gui/*.c $(B_CFLAGS) $(B_LDFLAGS) $(GIMPARGS) $(PCREARGS) -DGIMP_DISABLE_DEPRECATED ################################################################ - PCRE (http://www.pcre.org/) - Télécharger les sources de PCRE dans C:\msys-mingw-gimp à partir de ce lien : ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.33.zip - Décompresser l'archive pcre-8.33.zip - Compilation de la bibliothèque et du plug-in. Ouvrir le terminal par C:\msys-mingw-gimp\msys\msys.bat export CC=/mingw/bin/i686-w64-mingw32-gcc.exe cd /env/pcre-8.33 ./configure --prefix=/mingw make make install cd /env/gimp-plugin-bimp-master make - Fermer le terminal. - Copier les 3 éléments suivants dans un répertoire des plug-ins reconnu par une version de gimp 2.8 - 32 bits Windows : répertoire : C:\msys-mingw-gimp\gimp-plugin-bimp-master\bin\win32\bimp-locale plug-in : C:\msys-mingw-gimp\gimp-plugin-bimp-master\bin\bimp.exe DLL : C:\msys-mingw-gimp\pcre-8.33\.libs\libpcre-1.dll Tester en démarrant Gimp, activer le plug-in par Fichier > Batch Image Manipulation - Un oubli : La modification du lanceur C:\msys-mingw-gimp\start_MSYS.bat - Éditer comme suit : cd msys msys.bat ***** version 3 fin ***** ____________________________________________________________________________________________ ____________________________________________________________________________________________ ____________________________________________________________________________________________ ____________________________________________________________________________________________ ____________________________________________________________________________________________ ***** Version 4 début ***** Ajout de pthreads, compilation de G'MIC et du plug-in G'MIC pour Gimp. - pthreads 32 bits (issus du site de MinGW-64) - Télécharger http://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/pthreads/pthreads-20100604.zip/download - Décompresser pthreads-20100604.zip - Decompresser \pthreads-20100604\mingw32\pthreads-w32.zip dans le répertoire C:\msys-mingw-gimp\MinGW en écrasant les fichiers existants et faites une autre décompression dans un répertoire temporaire. Copier à partir de la décompression dans répertoire temporaire le contenu de \i686-w64-mingw32 et coller dans C:\msys-mingw-gimp\MinGW en écrasant les fichiers existants - Télécharger une version de G'MIC dans C:\msys-mingw-gimp à partir du site http://sourceforge.net/projects/gmic/files/ , par exemple la version "beta" en développement http://sourceforge.net/projects/gmic/files/beta/gmic_1.5.7.0_beta.tar.gz/download - Décompresser et éditer le fichier C:\msys-mingw-gimp\gmic-1.5.7.0\src\Makefile Ligne 50, remplacer CC = g++ par CC = /mingw/bin/i686-w64-mingw32-g++.exe Ligne 59, remplacer USR = /usr par USR = /mingw Ligne 70, ajouter EXE = .exe Pour gagner en vitesse d'exécution du plug-in (SANS GARANTIE DE BON FONCTIONNEMENT), remplacer les 7 lignes suivantes (à partir de le ligne 90) : # Flags to enable optimizations. ifeq ($(IS_GCC),yes) OPT_CFLAGS = -O3 -mtune=generic # -fno-tree-pre # -ffast-math endif ifeq ($(CC),icc) OPT_CFLAGS = -O3 -ipo -no-prec-div -override-limits endif par ces 7 lignes : # Flags to enable optimizations. #### ifeq ($(IS_GCC),yes) OPT_CFLAGS = -O3 -mtune=generic -fno-tree-pre -ffast-math ####endif ####ifeq ($(CC),icc) ####OPT_CFLAGS = -O3 -ipo -no-prec-div -override-limits ####endif - Il y a d'autres options possibles, voir les documentations GNU GCC et les options d'optimisation. - Enregistrer les modifications faites dans Makefile. - libjpng, zlib (précaution) - Télécharger http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.2/noarch/mingw32-libpng-devel-1.5.11-1.22.noarch.rpm http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.2/noarch/mingw32-zlib-devel-1.2.7-1.22.noarch.rpm - Faire une double décompression. - Supprimer tous les fichiers .pc de \usr\i686-w64-mingw32\sys-root\mingw \lib\pkgconfig - Copier le contenu du répertoire \usr\i686-w64-mingw32\sys-root\mingw et coller dans C:\msys-mingw-gimp\MinGW\i686-w64-mingw32 - fftw - Télécharger http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.2/noarch/mingw32-fftw3-devel-3.3-1.18.noarch.rpm - Faire une double décompression. - Editer les 2 fichiers \usr\i686-w64-mingw32\sys-root\mingw\lib\pkgconfig\fftw3.pc et \usr\i686-w64-mingw32\sys-root\mingw\lib\pkgconfig\fftw3f.pc pour obtenir prefix=/mingw - Copier le contenu du répertoire \usr\i686-w64-mingw32\sys-root\mingw et coller dans C:\msys-mingw-gimp\MinGW - Copier le contenu du répertoire \usr\i686-w64-mingw32\sys-root\mingw\include et coller dans C:\msys-mingw-gimp\MinGW\i686-w64-mingw32\include (précaution) - Télécharger http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.2/noarch/mingw32-fftw3-3.3-1.18.noarch.rpm - Faire une double décompression. - Copier le contenu du répertoire \usr\i686-w64-mingw32\sys-root\mingw et coller dans C:\msys-mingw-gimp\MinGW - Effacer les fichiers .exe et .o du répertoire C:\msys-mingw-gimp\gmic-1.5.7.0\src avant toute compilation (make clean ne fonctionne pas toujours correctement). - Compilation du plug-in. Ouvrir le terminal par C:\msys-mingw-gimp\msys\msys.bat cd /env/gmic-1.5.7.0/src make gimp - Fermer le terminal. - Le plug-in gmic_gimp.exe est dans le répertoire C:\msys-mingw-gimp\gmic-1.5.7.0\src - Pour télécharger les mises à jour des filtres du plug-in il faut utiliser le programme cURL ( http://curl.haxx.se/ ) et télécharger une version récente, par exemple http://www.paehl.com/open_source/?download=curl_731_0_ssl.zip . Décompresser pour utiliser le programme curl.exe. - Copier curl.exe dans C:\msys-mingw-gimp\MinGW\bin - Pour pouvoir utiliser le plug-in, créer un répertoire, par exemple C:\test_gmic et obtenez la structure suivante : C:\ |_____test_gmic (Répertoire à déclarer dans les préférences de Gimp) |_ gmic_gimp.exe (fichier copié à partir de C:\msys-mingw-gimp\gmic-1.5.7.0\src ) |_ pthreadGC2-w32.dlll (fichier copié à partir de C:\msys-mingw-gimp\MinGW\bin ) |_ libfftw3-3.dlll (fichier copié à partir de C:\msys-mingw-gimp\MinGW\bin ) | |_ _gmic (sous-répertoire _gmic pour récupérer les mises à jour par Internet) |_curl.exe (fichier téléchargé) - Si des DLL manquent, vous pouvez chercher dans C:\msys-mingw-gimp\MinGW\bin et les ajouter dans le répertoire de gmic_gimp.exe - Les tests peuvent commencer avec Gimp... - Effacer les fichiers .exe et .o du répertoire C:\msys-mingw-gimp\gmic-1.5.7.0\src avant toute compilation (make clean ne fonctionne pas toujours correctement). - Compilation de G'MIC en ligne de commande. Ouvrir le terminal par C:\msys-mingw-gimp\msys\msys.bat export LDFLAGS="-L/mingw/lib -L/mingw/x86_64-w64-mingw32/lib" cd /env/gmic-1.5.7.0/src make windows make windows - Remarque : Il semble y avoir encore quelques petits problèmes avec le Makefile , c'est la raison du doublement de la commande make windows - Fermer le terminal. - Copier C:\msys-mingw-gimp\gmic-1.5.7.0\src\gmic.exe dans C:\msys-mingw-gimp\MinGW\bin - Les tests peuvent commencer... ***** version 4 fin ***** ____________________________________________________________________________________________ ____________________________________________________________________________________________ ____________________________________________________________________________________________ ____________________________________________________________________________________________ ____________________________________________________________________________________________ ***** Version 5 début ***** Quelques ajustements du fichier c:\msys-mingw-gimp\msys\etc\profile - Il est possible de mémoriser plusieurs types de fonctionnement de l'environnement dans le fichier c:\msys-mingw-gimp\msys\etc\profile - Il suffit de mettre un caractère # devant une déclaration pour la transformer en remarque. C'est cette possibilité que j'utilise pour compiler simultanément plusieurs programmes. Il me suffit d'éditer ce fichier avant le démarrage du terminal de msys. - Voici un exemple d'extrait de contenu (avant la ligne export HOME LOGNAME MSYSTEM HISTFILE) : ################################################################ export PKG_CONFIG_PATH="/mingw/lib/pkgconfig:$PKG_CONFIG_PATH" CVS_RSH=ssh CFLAGS="-I/mingw/include -I/mingw/x86_64-w64-mingw32/include -I/python/include -pipe -O3 -mms-bitfields -march=i686 -s" #### valeur d'origine #LDFLAGS="-L/mingw/lib -L/mingw/x86_64-w64-mingw32/lib -mwindows" #### pour compiler les programmes avec une fenêtre "dos", par exemple G'MIC #LDFLAGS="-L/mingw/lib -L/mingw/x86_64-w64-mingw32/lib -lpthread" #### pour compiler les plug-ins de Gimp (sans fenêtre "dos") LDFLAGS="-L/mingw/lib -L/mingw/x86_64-w64-mingw32/lib -mwindows -lpthread" export PYTHONPATH="/python:PYTHONPATH" export PATH="/python:$PATH" export PATH="/perl/bin:$PATH" export PATH="/c/msys-mingw-gimp/strawberry-perl/c/bin:$PATH" export HOME LOGNAME MSYSTEM HISTFILE CFLAGS LDFLAGS PKG_CONFIG_PATH CVS_RSH PYTHONPATH ################################################################ ***** version 5 fin ***** ____________________________________________________________________________________________ ____________________________________________________________________________________________ ____________________________________________________________________________________________ ____________________________________________________________________________________________ ____________________________________________________________________________________________ ***** Version 6 début ***** Compiler un simple plugin C, par exemple vignetting.c - La compilation sous la forme " gimptool-2.0 --build foo.c " ne fonctionne pas sur l'environnement. Je n'ai pas l'envie de chercher le pourquoi et je propose une alternative à partir d'un simple Makefile. - Remarque : Je n'utilise jamais gimptool-2.0 directement , même pour les simples programmes. - Voici le contenu d'un fichier Makefile que je propose avec un gros merci à Alessandro Francesconi :o) ################################################################ B_CFLAGS = -I/mingw/include -I/mingw/x86_64-w64-mingw32/include -I/python/include -pipe -O3 -mms-bitfields -march=i686 -s B_LDFLAGS = -L/mingw/lib -L/mingw/x86_64-w64-mingw32/lib -mwindows GIMPARGS = $(shell gimptool-2.0 --cflags --libs) PCREARGS = $(shell pcre-config --cflags --libs) make: /mingw/bin/i686-w64-mingw32-gcc.exe -o vignetting.exe -Wall -O3 -Wno-unused-variable -Wno-pointer-sign -Wno-parentheses vignetting.c $(B_CFLAGS) $(B_LDFLAGS) $(GIMPARGS) $(PCREARGS) -DGIMP_DISABLE_DEPRECATED ################################################################ - Enregistrer le contenu sous le nom Makefile dans le répertoire où se trouve la source en C, ici vignetting.c (dans l'envirinnement initial C:\msys-mingw-gimp ) - Ouvrir le terminal par C:\msys-mingw-gimp\msys\msys.bat cd /env make - Fermer le terminal. - Le plugin compilé est C:\msys-mingw-gimp\vignetting.exe , il suffit de le copier dans un répertoire des plug-ins reconnu par Gimp et tester. - Pour adapter ce Makefile il suffit de remplacer le terme vignetting par le nom du plug-in à compiler. Par exemple si la source est aumask.c , remplacer le terme vignetting par aumask (2 remplacements). Résultat : ################################################################ B_CFLAGS = -I/mingw/include -I/mingw/x86_64-w64-mingw32/include -I/python/include -pipe -O3 -mms-bitfields -march=i686 -s B_LDFLAGS = -L/mingw/lib -L/mingw/x86_64-w64-mingw32/lib -mwindows GIMPARGS = $(shell gimptool-2.0 --cflags --libs) PCREARGS = $(shell pcre-config --cflags --libs) make: /mingw/bin/i686-w64-mingw32-gcc.exe -o aumask.exe -Wall -O3 -Wno-unused-variable -Wno-pointer-sign -Wno-parentheses aumask.c $(B_CFLAGS) $(B_LDFLAGS) $(GIMPARGS) $(PCREARGS) -DGIMP_DISABLE_DEPRECATED ################################################################ - Ajuster le compilateur, les options selon les cas, par exemple -DGIMP_DISABLE_DEPRECATED . ***** version 6 fin ***** ____________________________________________________________________________________________ ____________________________________________________________________________________________ ____________________________________________________________________________________________ ____________________________________________________________________________________________ ____________________________________________________________________________________________ *************************************************************************************************************************** *************************************************************************************************************************** ******************************************** ******************************************** ******************************************** DIVERS ******************************************** ******************************************** ******************************************** *************************************************************************************************************************** *************************************************************************************************************************** Pour mémoire versions 1 à 4 : gimptool seul ne fonctionne pas correctement avec build, à voir... (en partie résolu avec la version 6 en utilisant un Makefile) ajouter : (fait version 4) pthreads-w32.zip http://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/pthreads/pthreads-20100604.zip/download lib 32 bits : http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.2/noarch/ voir compilation de G'MIC : (fait version 4) ____________________________________________________________________________________________ ____________________________________________________________________________________________ ____________________________________________________________________________________________ Contenu du fichier C:\msys-mingw-gimp\msys\etc\fstab c:/msys-mingw-gimp /env c:/msys-mingw-gimp/MinGW /mingw c:/msys-mingw-gimp/strawberry-perl/perl /perl c:/msys-mingw-gimp/Python27 /python ____________________________________________________________________________________________ ____________________________________________________________________________________________ ____________________________________________________________________________________________ Contenu du fichier C:\msys-mingw-gimp\msys\etc\profile # Copyright (C) 2001, 2002 Earnie Boyd # This file is part of the Minimal SYStem. # http://www.mingw.org/msys.shtml # # File: profile # Description: Shell environment initialization script # Last Revised: 2002.05.04 if [ -z "$MSYSTEM" ]; then MSYSTEM=MINGW32 fi # My decision to add a . to the PATH and as the first item in the path list # is to mimick the Win32 method of finding executables. # # I filter the PATH value setting in order to get ready for self hosting the # MSYS runtime and wanting different paths searched first for files. if [ $MSYSTEM == MINGW32 ]; then export PATH=".:/usr/local/bin:/mingw/bin:/bin:$PATH" else export PATH=".:/usr/local/bin:/bin:/mingw/bin:$PATH" fi if [ -z "$USERNAME" ]; then LOGNAME="`id -un`" else LOGNAME="$USERNAME" fi # Set up USER's home directory if [ -z "$HOME" ]; then HOME="/home/$LOGNAME" fi if [ ! -d "$HOME" ]; then mkdir -p "$HOME" cp /etc/inputrc.default "$HOME"/.inputrc fi if [ "x$HISTFILE" == "x/.bash_history" ]; then HISTFILE=$HOME/.bash_history fi ################################################################ export PKG_CONFIG_PATH="/mingw/lib/pkgconfig:$PKG_CONFIG_PATH" CVS_RSH=ssh CFLAGS="-I/mingw/include -I/mingw/x86_64-w64-mingw32/include -I/python/include -pipe -O3 -mms-bitfields -march=i686 -s" LDFLAGS="-L/mingw/lib -L/mingw/x86_64-w64-mingw32/lib -mwindows" export PYTHONPATH="/python:PYTHONPATH" export PATH="/python:$PATH" export PATH="/perl/bin:$PATH" export PATH="/c/msys-mingw-gimp/strawberry-perl/c/bin:$PATH" export HOME LOGNAME MSYSTEM HISTFILE CFLAGS LDFLAGS PKG_CONFIG_PATH CVS_RSH PYTHONPATH ################################################################ export HOME LOGNAME MSYSTEM HISTFILE for i in /etc/profile.d/*.sh ; do if [ -f $i ]; then . $i fi done export MAKE_MODE=unix export PS1='\[\033]0;$MSYSTEM:\w\007 \033[32m\]\u@\h \[\033[33m\w\033[0m\] $ ' alias clear=clsb cd "$HOME" ____________________________________________________________________________________________ ____________________________________________________________________________________________ ____________________________________________________________________________________________ ____________________________________________________________________________________________ ____________________________________________________________________________________________ ____________________________________________________________________________________________ Contenu du fichier version beta C:\msys-mingw-gimp\gmic-1.5.7.0\src\Makefile # # File : Makefile # ( Makefile for GNU 'make' utility ) # # Description : Makefile for compiling : # # . the G'MIC command line tool (type 'make'). # . the G'MIC plug-in for GIMP (type 'make gimp'). # . the G'MIC interpreter, as a C++ library (type 'make lib'). # # ( http://gmic.sourceforge.net ) # # Copyright : David Tschumperle # ( http://tschumperle.users.greyc.fr/ ) # # License : CeCILL v2.0 # ( http://www.cecill.info/licences/Licence_CeCILL_V2-en.html ) # # This software is governed by the CeCILL license under French law and # abiding by the rules of distribution of free software. You can use, # modify and/ or redistribute the software under the terms of the CeCILL # license as circulated by CEA, CNRS and INRIA at the following URL # "http://www.cecill.info". # # As a counterpart to the access to the source code and rights to copy, # modify and redistribute granted by the license, users are provided only # with a limited warranty and the software's author, the holder of the # economic rights, and the successive licensors have only limited # liability. # # In this respect, the user's attention is drawn to the risks associated # with loading, using, modifying and/or developing or reproducing the # software by the user in light of its specific status of free software, # that may mean that it is complicated to manipulate, and that also # therefore means that it is reserved for developers and experienced # professionals having in-depth computer knowledge. Users are therefore # encouraged to load and test the software's suitability as regards their # requirements in conditions enabling the security of their systems and/or # data to be ensured and, more generally, to use and operate it in the # same conditions as regards security. # # The fact that you are presently reading this means that you have had # knowledge of the CeCILL license and that you accept its terms. # #--------------------------------- # Set correct variables and paths #--------------------------------- OS := $(shell uname) CC = /mingw/bin/i686-w64-mingw32-g++.exe ifeq ($(OS),GNU/kFreeBSD) OS = Linux endif ifeq ($(OS),Darwin) PLUGINDIR = ~/Library/Application\ Support/Gimp/plug-ins USR = /opt/local else PLUGINDIR = `gimptool-2.0 --gimpplugindir`/plug-ins USR = /mingw endif ifeq ($(OS),MINGW32_NT-5.1) EXE = .exe endif ifeq ($(OS),MINGW32_NT-6.1) EXE = .exe endif ifeq ($(CC),g++) IS_GCC = yes endif EXE = .exe #----------------------------------------------- # Set compilation flags for customizing build #----------------------------------------------- # Flags to enable 'beta' version. IS_BETA_CFLAGS = -Dcimg_use_vt100 -Dgmic_is_beta=1 # Flags that are mandatory to compile 'gmic'. MANDATORY_CFLAGS += -Dgmic_build -I$(USR)/include MANDATORY_LDFLAGS += -L$(USR)/lib ifeq ($(IS_GCC),yes) MANDATORY_CFLAGS += -Wall -W MANDATORY_LDFLAGS += -lm endif MANDATORY_CFLAGS+=$(IS_BETA_CFLAGS) # Flags to enable debugging. DEBUG_CFLAGS = -Dcimg_use_vt100 -Dcimg_verbosity=3 -g # Flags to enable optimizations. #### ifeq ($(IS_GCC),yes) OPT_CFLAGS = -O3 -mtune=generic -fno-tree-pre -ffast-math ####endif ####ifeq ($(CC),icc) ####OPT_CFLAGS = -O3 -ipo -no-prec-div -override-limits ####endif # Flags to enable image display, using X11 # (keep /usr/ dirname here since X11 is located in /usr/ on Mac too). # This requires the presence of the X11 include and library files. # (package 'libx11-dev' on Debian). X11_CFLAGS = -Dcimg_display=1 -Dcimg_appname=\\\"gmic\\\" -I/usr/X11R6/include #-Dcimg_use_xrandr X11_LDFLAGS = -L/usr/X11R6/lib -lX11 -lpthread #-lXrandr # Flags to enable fast display, using XShm. # This requires the presence of the X11 extension include and library files. # (package 'libx11-dev' on Debian). XSHM_CFLAGS = -Dcimg_use_xshm XSHM_LDFLAGS = -L$(USR)/X11R6/lib -lXext # Flags to enable image display, using GDI32. # This requires the presence of the GDI32 include and library files. GDI32_CFLAGS = -Dcimg_display=2 -Dcimg_appname=\\\"gmic\\\" GDI32_LDFLAGS = -lgdi32 # Flags to enable native support for PNG image files, using the PNG library. # This requires the presence of the libpng include and library files. # (package 'libpng12-dev' on Debian). PNG_CFLAGS = -Dcimg_use_png PNG_LDFLAGS = -lpng -lz # Flags to enable native support for JPEG image files, using the JPEG library. # This requires the presence of the libjpeg include and library files. # (package 'libjpeg62-dev' on Debian). JPEG_CFLAGS = -Dcimg_use_jpeg JPEG_LDFLAGS = -ljpeg # Flags to enable native support for TIFF image files, using the TIFF library. # This requires the presence of the libtiff include and library files. # (package 'libtiff4-dev' on Debian). TIFF_CFLAGS = -Dcimg_use_tiff TIFF_LDFLAGS = -ltiff # Flags to enable native support for MINC2 image files, using the MINC2 library. # ( http://en.wikibooks.org/wiki/MINC/Reference/MINC2.0_Users_Guide ) # (package 'libminc-dev' on Debian). MINC2_CFLAGS = -Dcimg_use_minc2 -I${HOME}/local/include MINC2_LDFLAGS = -lminc_io -lvolume_io2 -lminc2 -lnetcdf -lhdf5 -lz -L${HOME}/local/lib # Flags to enable native support for various video files, using the FFMPEG library. # This requires the presence of the FFMPEG include and library files. # (packages 'libavcodec-dev', 'libavutil-dev', 'libavformat-dev' and 'libswscale-dev' on Debian). FFMPEG_CFLAGS = -Dcimg_use_ffmpeg -D__STDC_CONSTANT_MACROS -I$(USR)/include/libavcodec -I$(USR)/include/libavformat -I$(USR)/include/libswscale -I$(USR)/include/ffmpeg FFMPEG_LDFLAGS = -lavcodec -lavformat -lswscale # Flags to enable native support for compressed .cimgz files, using the Zlib library. # This requires the presence of the Zlib include and library files. # (package 'zlib1g-dev' on Debian). ZLIB_CFLAGS = -Dcimg_use_zlib ZLIB_LDFLAGS = -lz # Flags to enable native support of webcams, using the OpenCV library. # This requires the presence of the OpenCV include and library files. # (package 'libcv3-2-dev' on Debian). ifeq ($(OS),Darwin) OPENCV_CFLAGS = -Dcimg_use_opencv -I$(USR)/include -I$(USR)/include/opencv OPENCV_LDFLAGS = `pkg-config opencv --libs` #-> Use this for OpenCV 2.2.0 ! else OPENCV_CFLAGS = -Dcimg_use_opencv -I$(USR)/include -I$(USR)/include/opencv # OPENCV_LDFLAGS = -lcv -lhighgui OPENCV_LDFLAGS = -lopencv_core -lopencv_highgui #-> Use this for OpenCV >= 2.2.0 ! endif # Flags to enable native support of most classical image file formats, using the GraphicsMagick++ library. # This requires the presence of the GraphicsMagick++ include and library files. # (package 'libgraphicsmagick++1-dev' on Debian). MAGICK_CFLAGS = -Dcimg_use_magick -I$(USR)/include/GraphicsMagick ifeq ($(OS),Darwin) MAGICK_LDFLAGS = -L$(USR)/lib -lGraphicsMagick++ -lGraphicsMagick -llcms -ltiff -lfreetype -ljpeg -lpng -lbz2 -lxml2 -lz -lm -lpthread -lltdl else MAGICK_LDFLAGS = -lGraphicsMagick++ endif # Flags to enable native support of EXR file format, using the OpenEXR library/ # This requires the presence of the OpenEXR include and library files. # (package 'libopenexr-dev' on Debian). EXR_CFLAGS = -Dcimg_use_openexr -I$(USR)/include/OpenEXR EXR_LDFLAGS = -lIlmImf -lHalf # Flags to enable the use of the FFTW3 library. # This requires the presence of the FFTW3 include and library files. # (package 'libfftw3-dev' on Debian). FFTW_CFLAGS = -Dcimg_use_fftw3 FFTW_LDFLAGS = -lfftw3 ifeq ($(OS),MINGW32_NT-5.1) FFTW_LDFLAGS = -lfftw3-3 endif ifeq ($(OS),MINGW32_NT-6.1) FFTW_LDFLAGS = -lfftw3-3 endif # Flags to enable the use of the BOARD library. # This requires the presence of the BOARD include and library files. # (no packages exist for Debian at this time). BOARD_CFLAGS = -Dcimg_use_board BOARD_LDFLAGS = -lboard # Sets of flags for building different configurations. STD_UNIX_CFLAGS = $(MANDATORY_CFLAGS) $(X11_CFLAGS) $(PNG_CFLAGS) \ $(JPEG_CFLAGS) $(TIFF_CFLAGS) $(ZLIB_CFLAGS) \ $(EXR_CFLAGS) $(FFTW_CFLAGS) # $(OPENCV_CFLAGS) $(FFMPEG_CFLAGS) $(XSHM_CFLAGS) # $(MAGICK_CFLAGS) STD_UNIX_LDFLAGS = $(MANDATORY_LDFLAGS) $(X11_LDFLAGS) $(PNG_LDFLAGS) \ $(JPEG_LDFLAGS) $(TIFF_LDFLAGS) $(ZLIB_LDFLAGS) \ $(EXR_LDFLAGS) $(FFTW_LDFLAGS) # $(OPENCV_LDFLAGS) $(FFMPEG_LDFLAGS) $(XSHM_LDFLAGS) # $(MAGICK_LDFLAGS) CUST_UNIX_CFLAGS = $(MANDATORY_CFLAGS) $(X11_CFLAGS) $(XSHM_CFLAGS) $(PNG_CFLAGS) \ $(JPEG_CFLAGS) $(TIFF_CFLAGS) $(ZLIB_CFLAGS) \ $(FFTW_CFLAGS) $(EXR_CFLAGS) $(FFMPEG_CFLAGS) # $(MAGICK_CFLAGS) $(BOARD_CFLAGS) $(MINC2_CFLAGS) $(OPENCV_CFLAGS) CUST_UNIX_LDFLAGS = $(MANDATORY_LDFLAGS) $(X11_LDFLAGS) $(XSHM_LDFLAGS) $(PNG_LDFLAGS) \ $(JPEG_LDFLAGS) $(TIFF_LDFLAGS) $(ZLIB_LDFLAGS) \ $(FFTW_LDFLAGS) $(EXR_LDFLAGS) $(FFMPEG_LDFLAGS) # $(MAGICK_LDFLAGS) $(BOARD_LDFLAGS) $(MINC2_LDFLAGS) $(OPENCV_LDFLAGS) DEBUG_UNIX_CFLAGS = $(MANDATORY_CFLAGS) $(DEBUG_CFLAGS) $(X11_CFLAGS) $(XSHM_CFLAGS) $(PNG_CFLAGS) \ $(JPEG_CFLAGS) $(TIFF_CFLAGS) $(ZLIB_CFLAGS) $(FFTW_CFLAGS) \ $(MAGICK_CFLAGS) $(OPENCV_CFLAGS) # $(FFMPEG_CFLAGS) DEBUG_UNIX_LDFLAGS = $(MANDATORY_LDFLAGS) $(DEBUG_LDFLAGS) $(X11_LDFLAGS) $(XSHM_LDFLAGS) $(PNG_LDFLAGS) \ $(JPEG_LDFLAGS) $(TIFF_LDFLAGS) $(ZLIB_LDFLAGS) $(FFTW_LDFLAGS) \ $(MAGICK_LDFLAGS) $(OPENCV_LDFLAGS) # $(FFMPEG_LDFLAGS) MINIMAL_UNIX_CFLAGS = $(MANDATORY_CFLAGS) $(DEBUG_CFLAGS) $(X11_CFLAGS) ${TIFF_CFLAGS} ${PNG_CFLAGS} $(ZLIB_CFLAGS) # $(OPENCV_CFLAGS) MINIMAL_UNIX_LDFLAGS = $(MANDATORY_LDFLAGS) $(DEBUG_LDFLAGS) $(X11_LDFLAGS) ${TIFF_LDFLAGS} ${PNG_LDFLAGS} $(ZLIB_LDFLAGS) # $(OPENCV_LDFLAGS) DEBUG_WINDOWS_CFLAGS = $(MANDATORY_CFLAGS) $(DEBUG_CFLAGS) $(GDI32_CFLAGS) DEBUG_WINDOWS_LDFLAGS = $(MANDATORY_LDFLAGS) $(DEBUG_LDFLAGS) $(GDI32_LDFLAGS) STD_MACOSX_CFLAGS= $(MANDATORY_CFLAGS) $(X11_CFLAGS) $(ZLIB_CFLAGS) $(PNG_CFLAGS) \ $(JPEG_CFLAGS) $(TIFF_CFLAGS) \ $(EXR_CFLAGS) $(FFTW_CFLAGS) # $(MAGICK_CFLAGS) STD_MACOSX_LDFLAGS = $(MANDATORY_LDFLAGS) $(X11_LDFLAGS) $(ZLIB_LDFLAGS) \ $(PNG_LDFLAGS) $(JPEG_LDFLAGS) $(TIFF_LDFLAGS) \ $(EXR_LDFLAGS) $(FFTW_LDFLAGS) # $(MAGICK_LDFLAGS) STD_WINDOWS_CFLAGS= $(MANDATORY_CFLAGS) $(GDI32_CFLAGS) $(ZLIB_CFLAGS) $(PNG_CFLAGS) $(JPEG_CFLAGS) $(FFTW_CFLAGS) STD_WINDOWS_LDFLAGS = $(MANDATORY_LDFLAGS) $(GDI32_LDFLAGS) $(ZLIB_LDFLAGS) $(PNG_LDFLAGS) $(JPEG_LDFLAGS) $(FFTW_LDFLAGS) STD_GIMP_CFLAGS = $(MANDATORY_CFLAGS) $(FFTW_CFLAGS) $(PNG_CFLAGS) $(ZLIB_CFLAGS) ${IS_BETA_CFLAGS} -Dcimg_display=0 -Dcimg_use_rng STD_GIMP_LDFLAGS = $(MANDATORY_LDFLAGS) $(FFTW_LDFLAGS) $(PNG_LDFLAGS) $(ZLIB_LDFLAGS) -lpthread ifeq ($(OS),MINGW32_NT-5.1) STD_GIMP_LDFLAGS += -mwindows endif ifeq ($(OS),MINGW32_NT-6.1) STD_GIMP_LDFLAGS += -mwindows endif STD_LIB_CFLAGS = $(MANDATORY_CFLAGS) $(FFTW_CFLAGS) -Dcimg_display=0 STD_LIB_LDFLAGS = $(MANDATORY_LDFLAGS) $(FFTW_LDFLAGS) GMICOL_UNIX_CFLAGS = $(MANDATORY_CFLAGS) $(PNG_CFLAGS) $(JPEG_CFLAGS) $(ZLIB_CFLAGS) $(FFTW_CFLAGS) -Dcimg_display=0 GMICOL_UNIX_LDFLAGS = $(MANDATORY_LDFLAGS) $(PNG_LDFLAGS) $(JPEG_LDFLAGS) $(ZLIB_LDFLAGS) /usr/lib/libfftw3.a STATIC_UNIX_CFLAGS = $(MANDATORY_CFLAGS) $(PNG_CFLAGS) $(JPEG_CFLAGS) $(TIFF_CFLAGS) $(ZLIB_CFLAGS) $(FFTW_CFLAGS) -Dcimg_display=0 STATIC_UNIX_LDFLAGS = /usr/lib/libpng.a \ /usr/lib/libjpeg.a \ /usr/lib/libtiff.a \ /usr/lib/libz.a \ /usr/lib/libfftw3.a #------------------------- # Define Makefile entries #------------------------- # Main entries all: ifeq ($(OS),Linux) @echo "**" @echo "** Linux configuration" @echo "**" $(MAKE) linux $(MAKE) gimp $(MAKE) lib $(MAKE) zart else ifeq ($(OS),Darwin) @echo "**" @echo "** MacOSX configuration" @echo "**" $(MAKE) macosx $(MAKE) gimp $(MAKE) zart else @echo "**" @echo "** Windows configuration" @echo "**" $(MAKE) windows $(MAKE) gimp endif endif gimp: $(MAKE) "CFLAGS=$(STD_GIMP_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS+=$(STD_GIMP_LDFLAGS) $(OPT_LDFLAGS)" "STRIP_EXE=1" gmic_gimp lib: $(MAKE) "CFLAGS=$(STD_LIB_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS+=$(STD_LIB_LDFLAGS) $(OPT_LDFLAGS)" gmic_lib zart: lib ifneq ($(OS),Darwin) cd ../zart && qmake-qt4 zart.pro && $(MAKE) && strip zart else cd ../zart && qmake zart.pro && $(MAKE) "CFLAGS=$(STD_MACOSX_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS=$(STD_MACOSX_LDFLAGS) $(OPT_LDFLAGS)" endif # Entries for non-default configurations. gmicol: $(MAKE) "CFLAGS+=$(GMICOL_UNIX_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS+=$(GMICOL_UNIX_LDFLAGS)" gmic_minimal static: $(MAKE) "CFLAGS+=$(STATIC_UNIX_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS+=$(STATIC_UNIX_LDFLAGS)" gmic_minimal minimal: $(MAKE) "CFLAGS+=$(MINIMAL_UNIX_CFLAGS)" "LDFLAGS+=$(MINIMAL_UNIX_LDFLAGS)" gmic_minimal debug: $(MAKE) "CFLAGS+=$(DEBUG_UNIX_CFLAGS)" "LDFLAGS+=$(DEBUG_UNIX_LDFLAGS)" gmic_minimal linux: $(MAKE) "CFLAGS=$(STD_UNIX_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS=$(STD_UNIX_LDFLAGS)" "STRIP_EXE=1" gmic_gmic custom: $(MAKE) "CFLAGS=$(CUST_UNIX_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS=$(CUST_UNIX_LDFLAGS)" "STRIP_EXE=1" gmic_gmic solaris: $(MAKE) "CFLAGS=$(STD_UNIX_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS=$(STD_UNIX_LDFLAGS) -R$(USR)/X11R6/lib -lrt -lnsl -lsocket" "STRIP_EXE=1" gmic_gmic macosx: $(MAKE) "CFLAGS=$(STD_MACOSX_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS=$(STD_MACOSX_LDFLAGS) $(OPT_LDFLAGS)" gmic_gmic windows: $(MAKE) "CFLAGS=$(STD_WINDOWS_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS=$(STD_WINDOWS_LDFLAGS)" "STRIP_EXE=1" gmic_gmic windebug: $(MAKE) "CFLAGS=$(DEBUG_WINDOWS_CFLAGS)" "LDFLAGS=$(DEBUG_WINDOWS_LDFLAGS)" gmic_minimal # Rules to build compilation modules. gmic_lib.o: gmic.cpp gmic_def.h $(CC) -o gmic_lib.o -c gmic.cpp -fPIC $(CFLAGS) -Dgmic_float_only gmic_lib: gmic_lib.o ar rcs libgmic.a gmic_lib.o ifneq ($(OS),Darwin) $(CC) -shared -Wl,-soname,libgmic.so.1 -o libgmic.so gmic_lib.o $(LDFLAGS) $(CC) -o gmic_use_lib gmic_use_lib.cpp -L. -lgmic $(FFTW_LDFLAGS) else $(CC) -shared -o libgmic.so gmic_lib.o $(LDFLAGS) endif gmic_gimp.o: gmic.cpp gmic_def.h $(CC) -o gmic_gimp.o -c gmic.cpp $(CFLAGS) -Dgmic_gimp -Dgmic_float_only gmic_gimp : gmic_gimp.o gmic_gimp.cpp $(CC) -o gmic_gimp gmic_gimp.cpp gmic_gimp.o `gimptool-2.0$(EXE) --cflags` $(CFLAGS) `gimptool-2.0$(EXE) --libs` $(LDFLAGS) strip gmic_gimp$(EXE) gmic_minimal: gmic.cpp $(CC) -o gmic gmic.cpp $(CFLAGS) -Dgmic_float_only -Dgmic_main $(LDFLAGS) gmic_bool.o: gmic.cpp $(CC) -o gmic_bool.o -c gmic.cpp $(CFLAGS) -Dgmic_split_compilation -Dgmic_bool gmic_uchar.o: gmic.cpp $(CC) -o gmic_uchar.o -c gmic.cpp $(CFLAGS) -Dgmic_split_compilation -Dgmic_uchar gmic_char.o: gmic.cpp $(CC) -o gmic_char.o -c gmic.cpp $(CFLAGS) -Dgmic_split_compilation -Dgmic_char gmic_ushort.o: gmic.cpp $(CC) -o gmic_ushort.o -c gmic.cpp $(CFLAGS) -Dgmic_split_compilation -Dgmic_ushort gmic_short.o: gmic.cpp $(CC) -o gmic_short.o -c gmic.cpp $(CFLAGS) -Dgmic_split_compilation -Dgmic_short gmic_uint.o: gmic.cpp $(CC) -o gmic_uint.o -c gmic.cpp $(CFLAGS) -Dgmic_split_compilation -Dgmic_uint gmic_int.o: gmic.cpp $(CC) -o gmic_int.o -c gmic.cpp $(CFLAGS) -Dgmic_split_compilation -Dgmic_int gmic_float.o: gmic.cpp $(CC) -o gmic_float.o -c gmic.cpp $(CFLAGS) -Dgmic_split_compilation -Dgmic_float -Dgmic_main gmic_double.o: gmic.cpp $(CC) -o gmic_double.o -c gmic.cpp $(CFLAGS) -Dgmic_split_compilation -Dgmic_double gmic_gmic: gmic_bool.o gmic_uchar.o gmic_char.o gmic_ushort.o gmic_short.o gmic_uint.o gmic_int.o gmic_float.o gmic_double.o gmic_def.h $(CC) -o gmic gmic_bool.o gmic_uchar.o gmic_char.o gmic_ushort.o gmic_short.o gmic_uint.o gmic_int.o gmic_float.o gmic_double.o $(LDFLAGS) strip gmic$(EXE) def: @echo "#ifndef gmic_gimp" > gmic_def.h \gmic -v - gmic_def.gmic raw:gmic_def.gmic,char -compress_gmic -type char -o -.h | sed 's/unnamed/gmic_def/' | sed 's/ \};/, 0 \};\n\nunsigned int size_data_gmic_def = sizeof(data_gmic_def);\n/g' >> gmic_def.h @echo "#else" >> gmic_def.h \gmic -v - gmic_def.gmic -update_gmic_gimp @.,0 raw:$(HOME)/.update@..gmic,char -compress_gmic_gimp -type char -o -.h | sed 's/unnamed/gmic_def/' | sed 's/ \};/, 0 \};\n\nunsigned int size_data_gmic_def = sizeof(data_gmic_def);\n/g' >> gmic_def.h \gmic -v - ../html/img/logoGMIC.ppm -permute cxyz -type uchar -o -.h | sed 's/unnamed/gmic_logo/' >> gmic_def.h @echo "unsigned int size_data_logo = sizeof(data_gmic_logo);" >> gmic_def.h @echo "#endif" >> gmic_def.h @echo >>gmic_def.h # Install/uninstall/clean. install: mkdir -p $(DESTDIR)$(PLUGINDIR)/ cp -f gmic_gimp $(DESTDIR)$(PLUGINDIR)/ mkdir -p $(DESTDIR)$(USR)/bin/ cp -f gmic $(DESTDIR)$(USR)/bin/ mkdir -p $(DESTDIR)$(USR)/include/ cp -f gmic.h $(DESTDIR)$(USR)/include/ ifneq ($(OS),Darwin) mkdir -p $(DESTDIR)$(USR)/share mkdir -p $(DESTDIR)$(USR)/share/zart cp -f ../zart/zart $(DESTDIR)$(USR)/bin/zart mkdir -p $(DESTDIR)$(USR)/lib cp -f libgmic.so $(DESTDIR)$(USR)/lib/libgmic.so.1.5.7.0 ln -s libgmic.so.1.5.7.0 $(DESTDIR)$(USR)/lib/libgmic.so.1.5.7 ln -s libgmic.so.1.5.7 $(DESTDIR)$(USR)/lib/libgmic.so.1.5 ln -s libgmic.so.1.5 $(DESTDIR)$(USR)/lib/libgmic.so.1 endif mkdir -p $(DESTDIR)$(USR)/share/man/ mkdir -p $(DESTDIR)$(USR)/share/man/man1/ mkdir -p $(DESTDIR)$(USR)/share/man/fr/man1/ cp -f ../man/gmic.1.gz $(DESTDIR)$(USR)/share/man/man1/gmic.1.gz cp -f ../man/gmic.1.gz $(DESTDIR)$(USR)/share/man/fr/man1/gmic.1.gz if test -d /etc/bash_completion.d/; then mkdir -p $(DESTDIR)/etc/bash_completion.d/; cp -f gmic_bashcompletion.sh $(DESTDIR)/etc/bash_completion.d/gmic; fi if test -d /opt/local/etc/bash_completion.d/; then mkdir -p $(DESTDIR)/opt/local/etc/bash_completion.d/; cp -f gmic_bashcompletion.sh $(DESTDIR)/opt/local/etc/bash_completion.d/gmic; fi uninstall: rm -f $(DESTDIR)$(USR)/bin/gmic rm -f $(DESTDIR)$(USR)/include/gmic.h rm -f $(DESTDIR)$(USR)/lib/libgmic.so.1.5.7.0 rm -f $(DESTDIR)$(USR)/lib/libgmic.so.1.5.7 rm -f $(DESTDIR)$(USR)/lib/libgmic.so.1.5 rm -f $(DESTDIR)$(USR)/lib/libgmic.so.1 rm -rf $(DESTDIR)$(USR)/share/doc/gmic/ rm -f $(DESTDIR)$(USR)/share/man/man1/gmic.1.gz rm -f $(DESTDIR)$(USR)/share/man/fr/man1/gmic.1.gz rm -f $(DESTDIR)$(USR)/bin/zart rm -rf $(DESTDIR)$(USR)/share/zart/ distclean: clean clean: rm -rf gmic*.o gmic gmic_gimp gmic_use_lib libgmic* *~ # End of Makefile ____________________________________________________________________________________________ ____________________________________________________________________________________________ ____________________________________________________________________________________________