blob: b0b774cd26bbd56ca2a50ae5767d2798670262aa (
plain)
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
43
44
|
include ../Makefile.inc
CFLAGS = -g -fPIC -D_FILE_OFFSET_BITS=64 -I$(PYTHONINCLUDE) -O -Wall -Werror
OBJECTS = md5.o libimplantisomd5.o checkisomd5.o pyisomd5sum.c \
implantisomd5 checkisomd5
SOURCES = $(patsubst %.o,%.c,$(OBJECTS))
LDFLAGS = -lpopt
PYOBJS = pyisomd5sum.o libcheckisomd5.o libimplantisomd5.o md5.o
ifeq (.depend,$(wildcard .depend))
TARGET=all
else
TARGET=depend all
endif
all: implantisomd5 checkisomd5 pyisomd5sum.so
%.o: %.c
gcc -c -O $(CFLAGS) -o $@ $<
implantisomd5: implantisomd5.o md5.o libimplantisomd5.o
checkisomd5: checkisomd5.o md5.o libcheckisomd5.o
pyisomd5sum.so: $(PYOBJS)
gcc -shared -g -o pyisomd5sum.so -fpic $(PYOBJS)
install:
install -m 755 implantisomd5 $(DESTDIR)/$(RUNTIMEDIR)
install -m 755 checkisomd5 $(DESTDIR)/$(RUNTIMEDIR)
install -s pyisomd5sum.so $(DESTDIR)/$(RUNTIMEDIR)
clean:
rm -f *.o *.lo *.so *.pyc .depend *~
rm -f implantisomd5 checkisomd5
depend:
$(CPP) -M $(CFLAGS) -I$(PYTHONINCLUDE) *.c > .depend
ifeq (.depend,$(wildcard .depend))
include .depend
endif
|