File: Makefile

package info (click to toggle)
linkchecker 5.2-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 3,508 kB
  • ctags: 3,805
  • sloc: python: 22,666; lex: 1,114; yacc: 785; makefile: 276; ansic: 95; sh: 68; sql: 19; awk: 4
file content (29 lines) | stat: -rw-r--r-- 775 bytes parent folder | download
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
# this parser needs flex >= 2.5.xx from http://lex.sf.net/
# for reentrant bison parser support
FLEX = flex
PYINCLUDE=-I/usr/include/python2.6
#PYINCLUDE="-I/home/calvin/src/python-gitsvn -I/home/calvin/src/python-gitsvn/Include"

all: htmllex.c htmlparse.c

htmlsax.so: htmllex.o htmlparse.o s_util.o
	gcc -pthread -shared $^ -o htmlsax.so

%.o:	%.c
	gcc -g -std=c99 -O3 -Wall -pedantic -Wstrict-prototypes -fPIC -I. $(PYINCLUDE) -c $< -o $@

htmlparse.h htmlparse.c:	htmlparse.y htmlsax.h
	bison htmlparse.y

htmllex.l:	htmlparse.h

htmllex.c:	htmllex.l htmlsax.h
	$(FLEX) htmllex.l
	awk -f fixincludes.awk htmllex.c > htmllex.c.fixed; mv -f htmllex.c.fixed htmllex.c

clean:
	rm -f *.o *.so *.pyc *.pyo *.output

distclean: clean
	rm -f htmlparse.c htmlparse.h htmllex.c