blob: 150ea33caf63676a38e3bd28f758709d3914e610 (
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
45
|
include ../Makefile.inc
#PYTHONLIBDIR = $(DESTDIR)/usr/lib/python1.5/site-packages
OBJECTS = rw.o dos.o sun.o bsdlabel.o
CFLAGS=-I/usr/include/python1.5 -Os
TARGET = libbalkan.a
ifeq (.depend,$(wildcard .depend))
DEPTARGET=all
else
DEPTARGET=depend all
endif
everything: $(DEPTARGET)
all: $(TARGET) _balkanmodule.so
_balkanmodule.so: _balkanmodule.o libbalkan.a
gcc -shared -o $@ _balkanmodule.o libbalkan.a
_balkanmodule.o: _balkanmodule.c balkan.h
gcc $(CFLAGS) -c -fPIC -o $@ $<
libbalkan.a: libbalkan.a($(OBJECTS))
clean:
rm -f *.o *.so $(TARGET)
dos.o: dos.h
sun.o: sun.h
install: all
mkdir -p $(DESTDIR)/$(PYTHONLIBDIR)
install -s _balkanmodule.so $(DESTDIR)/$(PYTHONLIBDIR)
depend:
$(CPP) -M $(CFLAGS) *.c > .depend
ifeq (.depend,$(wildcard .depend))
include .depend
endif
|