updated on Sun Jan 15 04:04:02 UTC 2012
[aur-mirror.git] / lua-zlib-git / Makefile
blob5fb6ffb51bbc4e042d30c3374037c1c52cb9a2a8
1 # Executables
2 CC = gcc
3 INSTALL = install
5 # Flags
6 CFLAGS = -std=c99 -fpic -Wall -pedantic
7 LDFLAGS = -shared
8 LDLIBS = -lz
10 # Directories
11 LUA_CDIR = $(DESTDIR)/usr/lib/lua/5.1/
12 SRCDIR ?= .
13 BUILDDIR ?= $(SRCDIR)
15 # Files
16 SRC = $(SRCDIR)/lua_zlib.c
17 OBJ = $(BUILDDIR)/lua_zlib.o
18 LIB = $(BUILDDIR)/zlib.so
20 # Targets
21 all: $(LIB)
23 install: $(LIB)
24 $(INSTALL) $(LIB) $(LUA_CDIR)
26 $(LIB): $(OBJ)
27 $(CC) $(LDFLAGS) -o $(LIB) $(OBJ) $(LDLIBS)
29 $(OBJ): $(SRC)