updated on Thu Jan 19 00:16:31 UTC 2012
[aur-mirror.git] / lua-gd / Makefile.arch
blobb76aaa3a7bc9b2486345d11fdc24ebed2b45df97
1 # luagd -- gd bindings for the Lua Programming Language.
2 # (c) 2004-06 Alexandre Erwin Ittner <aittner@netuno.com.br>
4 # Permission is hereby granted, free of charge, to any person obtaining
5 # a copy of this software and associated documentation files (the
6 # "Software"), to deal in the Software without restriction, including
7 # without limitation the rights to use, copy, modify, merge, publish,
8 # distribute, sublicense, and/or sell copies of the Software, and to
9 # permit persons to whom the Software is furnished to do so, subject to
10 # the following conditions:
12 # The above copyright notice and this permission notice shall be
13 # included in all copies or substantial portions of the Software.
15 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 # IN NO EVENT SHALL THE AUTHOR OR COPYRIGHT HOLDER BE LIABLE FOR ANY
19 # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 # If you use this package in a product, an acknowledgment in the product
24 # documentation would be greatly appreciated (but it is not required).
27 CC=gcc
29 # ---------------------------------------------------------------------------
30 # Automatic configuration using pkgconfig, gd-config and sed. These
31 # lines should work on most Linux/Unix systems. If your system does not
32 # have these programs you must comment out these lines and uncomment and
33 # change the next ones.
35 # Name of .pc file. "lua5.1" on Debian/Ubuntu
36 #LUAPKG=lua5.1
37 #OUTFILE=gd.so
38 #CFLAGS=`gdlib-config --cflags` `pkg-config $(LUAPKG) --cflags` -O3 -Wall
39 #GDFEATURES=`gdlib-config --features |sed -e "s/GD_/-DGD_/g"`
40 #LFLAGS=-shared `gdlib-config --ldflags` `gdlib-config --libs` \
41 #    `pkg-config $(LUAPKG) --libs` -lgd
42 #INSTALL_PATH=`pkg-config $(LUAPKG) --variable=INSTALL_CMOD`
45 # ---------------------------------------------------------------------------
46 # Manual configuration for systems without pkgconfig.
48 OUTFILE=gd.so
49 CFLAGS=-Wall `gdlib-config --cflags` -fPIC -I/usr/include -O3
50 GDFEATURES=`gdlib-config --features |sed -e "s/GD_/-DGD_/g"`
51 LFLAGS=-shared `gdlib-config --ldflags` `gdlib-config --libs` -llua -lgd
52 INSTALL_PATH=/usr/share/lua/5.1
55 # ---------------------------------------------------------------------------
56 # Manual configuration for Windows and systems without sed, pkgconfig, etc.
57 # Uncomment, change and good luck :)
59 #OUTFILE=gd.dll
60 #CFLAGS=-Wall -IC:/lua5.1/ -O3
61 #GDFEATURES=-DGD_XPM -DGD_JPEG -DGD_FONTCONFIG -DGD_FREETYPE -DGD_PNG -DGD_GIF
62 #LFLAGS=-shared -lgd2 -lm -llua51
63 #INSTALL_PATH="C:/Program Files/lua/"
64 # ---------------------------------------------------------------------------
67 all: $(OUTFILE)
69 $(OUTFILE): luagd.c
70         $(CC) -o $(OUTFILE) $(GDFEATURES) $(CFLAGS) $(LFLAGS) luagd.c
71         lua test_features.lua
73 install: $(OUTFILE)
74         install -s $(OUTFILE) $(INSTALL_PATH)
76 clean:
77         rm -f $(OUTFILE) *.o