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
|
#DESTDIR =
INSTALLDIR=$(DESTDIR)/usr/lib/serpento
PYTHON_INCLUDE=/usr/include/python2.1/
CFLAGS = -O2 -W -Wall -I$(PYTHON_INCLUDE) $(DEFINES)
LDFLAGS =
all: searchingmodule.so
searchingmodule.o: searchingmodule.c
$(CC) $(CFLAGS) -fpic -c searchingmodule.c
searchingmodule.so: searchingmodule.o metaphone.o levenshtein.o soundex.o
$(CC) $(CFLAGS) $(LDFLAGS) -fpic -shared \
metaphone.o levenshtein.o soundex.o \
searchingmodule.o -o searchingmodule.so
metaphone.o: metaphone.c metaphone.h
$(CC) $(CFLAGS) -fpic -c metaphone.c
soundex.o: soundex.c soundex.h
$(CC) $(CFLAGS) -fpic -c soundex.c
levenshtein.o: levenshtein.c levenshtein.h
$(CC) $(CFLAGS) -fpic -c levenshtein.c
clean:
rm -f *~ *.o searchingmodule.so *.pyc
install:
mkdir -p $(INSTALLDIR)
cp -f searchingmodule.so *.py $(INSTALLDIR)
cp -f serpento $(DESTDIR)/usr/sbin
cp -f serpento-inetd $(DESTDIR)/usr/sbin
|