Red Antigua Logo
Yet another piece of web.
Ads by Goooooogle
Search this site (by Google)
Tools    (top)
Your IP
Check a site for broken links
(W3C)

Perl modules    (top)
Tree::Numbered::Tools
(CPAN)
Perl tutorials    (top)
Perl modules
HTML::Template
CGI::Application
Mail::POP3Client
Mail::Send
MIME::Tools
Cookies with CGI::Application
Upload files with CGI::Application
Download files with CGI::Application
Redirect with CGI::Application
CPAN shell
Install DBD::mysql from the CPAN shell
Perl trim function
Validate an IP with Perl
Run suid Perl scripts under Apache
Perl taint mode
Perl date functions with Date::Calc

In Spanish
Curso de Perl

C tutorials    (top)
C - Introduction
C - Absolute beginner's Emacs
C - Examples for beginners
C - Makefile examples
C - Autotools examples
Server configurations    (top)
DNS
Apache
Apache Authentication and Access Control
mod_perl on FreeBSD
MySQL
MySQL add account
phpMyAdmin
Squid
DHCP

UNIX on Windows    (top)
Apache setup on Windows
MySQL setup on Windows
PHP setup on Windows
Perl setup on Windows
Emacs setup on Windows
UnxUtils
PuTTY
WinSCP
GIMP on Windows
MinGW - gcc on Windows
MSYS - UNIX-styled shell on Windows
msysDTK - autotools on Windows
GDB for MinGW on Windows

Misc. FreeBSD/UNIX    (top)
CD and DVD creation on FreeBSD using 'k3b' on FreeBSD
'portupgrade' on FreeBSD
'ipf' on FreeBSD
'pf' on FreeBSD
'su' on FreeBSD
Mount an ISO image under FreeBSD
Load the correct sound driver under FreeBSD without knowing what sound card you are using
Simultaneous sound channels on FreeBSD
FreeBSD network stuff
DOS-to-UNIX file conversion
favicon.ico on UNIX
Emacs tips
Sendmail tips
GKrellm
Command Line Calculator
Save multimedia streams with 'mplayer'
xargs - solution to 'Argument list too long'
Process multiple images from the command line using 'ImageMagick'
Turn the system bell off under X Windows
Process each line in an input file from the command line (or in a shell script)
How to keep a program running in the background using 'nohup'
How to remove symbolic links in the current directory using 'find' and 'rm'
How to remove Emacs backup files in the current directory and all subdirectories using 'find' and 'rm'
How to execute .profile without logging in
Configure X to handle non-English characters
How to move /var to /usr/var

Redirect a web page    (top)
Redirect to another web page
Apache redirect
C redirect
Perl redirect
PHP redirect
HTML redirect
JavaScript redirect

Javascript    (top)
Trim function
Login form
Register form
Popup window

Virus list    (top)
Latest 10 viruses - Sophos

Off topic    (top)
Personal home links

Makefile for images
Makefile for images
IndexPreviousNext
Here is another kind of example, just to show that even if make normally is used in a programming environment, it may be used in any situation with file dependencies.
To try out this example, ImageMagick is required.
The Makefile below has been tested with MSYS make on MS Windows, but should work on UNIX as well.
To create and display the images, just type
make display
The Makefile tries to "guess" if the platform is MS Windows or UNIX. Anyhow, if you are using another version of ImageMagick (on MS Windows), or ImageMagick is installed in another path (on UNIX), you should override the MAGICK_VERSION variable (MS Windows), or the MAGICK_PATH variable (UNIX) from the command line, to suite your installation:

Windows, another version:
make display MAGICK_VERSION=imagemagick-7.8.9
UNIX, alternative path:
make display MAGICK_PATH=/usr/local/bin/
Makefile:
# Makefile for ImageMagick

# For MS Windows users only:
# Change this if you are using another version of ImageMagick.
MAGICK_WIN32 = imagemagick-6.3.5-q16

# Paths, some of them platform dependent.
WIN32_SUFFIX = .exe
SHELL_SUFFIX = $(suffix $(SHELL))
ifeq ($(WIN32_SUFFIX), $(SHELL_SUFFIX))
        MAGICK_PATH    = /c/program\ files/$(MAGICK_WIN32)/
        MAGICK_DISPLAY = imdisplay
else
        MAGICK_PATH    = /usr/bin/
        MAGICK_DISPLAY = display
endif
MAGICK_CONVERT   = convert
MAGICK_COMPOSITE = composite

# Targets
HELLOWORLD = helloworld.png
HELLOWORLD_FLAGS = $(TILE) $(LABEL) -tile -compose Overlay

LABEL = label.png
LABEL_FLAGS = -fill dodgerblue -font 'Arial' -background black \
        -pointsize 72 label:'Hello, world!' -bordercolor black \
        -border 30x30 \( +clone -blur 0x25 -evaluate multiply 2 \) \
        -compose screen -composite

TILE = tile.png
TILE_FLAGS = -background white -fill darkblue -font 'Arial' \
        -pointsize 12 -size 70x -gravity Center caption:'Hello, world!'

# Create the final image
# The prerequisites for this image is the label image and the tile (background) image.
$(HELLOWORLD): $(LABEL) $(TILE)
        $(MAGICK_COMPOSITE) $(HELLOWORLD_FLAGS) $@
        @echo Type \'make display\' to display the images.

# Create the label.
# There are no prerequisites needed to create this image.
$(LABEL):
        $(MAGICK_PATH)$(MAGICK_CONVERT) $(LABEL_FLAGS) $@

# Create the tile (background) image.
# There are no prerequisites needed to create this image.
$(TILE):
        @echo Try to create $(TILE) manually, then type \'make\'.
        $(MAGICK_PATH)$(MAGICK_CONVERT) $(TILE_FLAGS) $@

# Remove all images.
.PHONY : clean
clean:
        rm -rf $(HELLOWORLD) $(LABEL) $(TILE)

# Display all images
# The prerequisites for this target is the final, composed image.
# (The composed image, in turn, has the tile and label images as prerequisites.)
.PHONY : display
display: $(HELLOWORLD)
        @echo When ready with the tile image, close the window to show the label image... 
        $(MAGICK_PATH)$(MAGICK_DISPLAY) $(TILE)
        @echo When ready with the label image, close the window to show the composed image... 
        $(MAGICK_PATH)$(MAGICK_DISPLAY) $(LABEL)
        @echo Close the composed image window to exit... 
        $(MAGICK_PATH)$(MAGICK_DISPLAY) $(HELLOWORLD)
        @echo Good bye.
IndexPreviousNext
Last modified: Mon Nov 12 12:33:59 Romance Standard Time 2007