summaryrefslogtreecommitdiffstats
path: root/isys/Makefile
blob: e3672a55d35b911af57af318f80ba20115fe6dfe (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
CFLAGS = -I/usr/include/python1.5 -g
OBJECTS = isys.o nfsmount.o dns.o mount_clnt.o mount_xdr.o imount.o \
          smp.o moduleinfo.o devnodes.o cpio.o probe.o
STATICOBJS = otherinsmod.o
STATICLIBS = pci/libpciprobe.a
LOADLIBES = -lrpm -lresolv -lz -lpci
SUBDIRS = modutils pci
PYTHONLIBDIR = $(DESTDIR)/usr/lib/python1.5/site-packages

all: subdirs _isys.so libisys.a 

_isys.so: $(OBJECTS) $(STATICLIBS)
	gcc -shared -g -o $@ $(OBJECTS) $(STATICLIBS) $(LOADLIBES)

libisys.a: libisys.a($(OBJECTS) $(STATICOBJS))

clean:
	rm -f *.o $(TARGET) $(OBJECTS)
	for d in $(SUBDIRS); do make TOPDIR=../$(TOPDIR) -C $$d clean; done

install: all
	cp _isys.so isys.py $(PYTHONLIBDIR)

subdirs:
	for d in $(SUBDIRS); do make TOPDIR=../$(TOPDIR) -C $$d; done