File: makefile

package info (click to toggle)
lua-lpeg 0.10.2-5
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 292 kB
  • sloc: ansic: 1,965; makefile: 38
file content (42 lines) | stat: -rw-r--r-- 805 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
LIBNAME = lpeg
LUADIR = /usr/include/lua5.1/

COPT = -O2 -DNDEBUG

CWARNS = -Wall -Wextra -pedantic \
        -Waggregate-return \
	-Wbad-function-cast \
        -Wcast-align \
        -Wcast-qual \
	-Wdeclaration-after-statement \
	-Wdisabled-optimization \
        -Wmissing-prototypes \
        -Wnested-externs \
        -Wpointer-arith \
        -Wshadow \
	-Wsign-compare \
	-Wstrict-prototypes \
	-Wundef \
        -Wwrite-strings \
	#  -Wunreachable-code \


CFLAGS = $(CWARNS) $(COPT) -ansi -I$(LUADIR)
CC = gcc

# For Linux
DLLFLAGS = -shared -fpic
ENV = 

# For Mac OS
# ENV = MACOSX_DEPLOYMENT_TARGET=10.4
# DLLFLAGS = -bundle -undefined dynamic_lookup

lpeg.so: lpeg.o
	env $(ENV) $(CC) $(DLLFLAGS) lpeg.o -o lpeg.so

lpeg.o:		makefile lpeg.c lpeg.h

test: test.lua re.lua lpeg.so
	test.lua