include ../Makefile.inc ARCH := $(patsubst i%86,i386,$(shell uname -m)) ARCH := $(patsubst sparc%,sparc,$(ARCH)) CFLAGS = -I/usr/include/python1.5 -I.. -g -Wall OBJECTS = nfsmount.o dns.o mount_clnt.o mount_xdr.o imount.o \ smp.o moduleinfo.o devnodes.o cpio.o probe.o uncpio.o \ lang.o SOURCES = $(patsubst %.o,%.c,$(OBJECTS)) STATICOBJS = otherinsmod.o STATICLIBS = /usr/lib/python1.5/site-packages/kudzumodule.so LOADLIBES = -lbz2 -lresolv -lz -lpci -lpopt -L../pump -lpump -lext2fs PYMODULES = _isys.so SUBDIRS = ifneq ($(ARCH),ia64) SUBDIRS += modutils endif ifeq ($(ARCH),sparc) PYMODULES += _silo.so SOURCSE += silo.c endif ifeq (.depend,$(wildcard .depend)) TARGET=all else TARGET=depend all endif everything: $(TARGET) all: subdirs $(PYMODULES) libisys.a _isys.so: isys.o $(OBJECTS) $(STATICLIBS) gcc -shared -g -o $@ isys.o $(OBJECTS) $(STATICLIBS) $(LOADLIBES) _silo.so: silo.c gcc -shared $(CFLAGS) -fpic -o $@ silo.c ../balkan/libbalkan.a libisys.a: libisys.a($(OBJECTS) $(STATICOBJS)) clean: rm -f *.o *.so *.a *.pyc $(TARGET) $(OBJECTS) for d in $(SUBDIRS); do make -C $$d clean; done install: all install $(PYMODULES) isys.py $(DESTDIR)/$(PYTHONLIBDIR) subdirs: for d in $(SUBDIRS); do make -C $$d; done depend: $(CPP) -M $(CFLAGS) $(SOURCES) > .depend ifeq (.depend,$(wildcard .depend)) include .depend endif