module = streamstor-@VERSION@ prefix = @prefix@ bibpath = $(prefix)/share/streamstor/bib utilpath = $(prefix)/bin moddir = /lib/modules/misc libdir = $(prefix)/lib incdir = $(prefix)/include ARCH = LINUX VER = $(shell uname -r) ifeq ("$(VER)","") OD = $(ARCH) else CPU = `uname -m | sed "s/i.86/i386/" | sed "s/ppc/PPC/" | sed "s/ia64/IA64/"` OD = $(ARCH).$(VER).$(CPU) endif all: chmod +x linux/driver/redist/configure.wd cd linux/driver/redist ; ./configure --disable-usb-support cd linux/driver/redist ; make -f makefile.wd clean: cd linux/driver/redist ; make clean rm -r dist RPMinstall: mkdir -p $(DESTDIR)$(moddir) rm -f $(DESTDIR)$(moddir)/windrvr6.o install -m 644 linux/driver/redist/$(OD)/windrvr6.ko $(DESTDIR)$(moddir) mkdir -p $(DESTDIR)$(bibpath) install -m 644 linux/bib/* $(DESTDIR)$(bibpath) mkdir -p $(DESTDIR)$(utilpath) install -m 755 linux/util/* $(DESTDIR)$(utilpath) install -m 755 linux/driver/util/* $(DESTDIR)$(utilpath) mkdir -p $(DESTDIR)$(libdir) install -m 755 linux/lib/gcc_v4/* $(DESTDIR)$(libdir) install -m 755 linux/driver/lib/* $(DESTDIR)$(libdir) mkdir -p $(DESTDIR)$(libdir)/pkgconfig install -m 644 streamstor.pc $(DESTDIR)$(libdir)/pkgconfig mkdir -p $(DESTDIR)$(incdir) install -m 644 linux/include/* $(DESTDIR)$(incdir) mkdir -p $(DESTDIR)/etc/profile.d install -m 644 mark5.csh mark5.sh $(DESTDIR)/etc/profile.d mkdir -p $(DESTDIR)/etc/udev/permissions.d install -m 644 60-mark5.permissions $(DESTDIR)/etc/udev/permissions.d install: mkdir -p $(libdir) install -m 755 linux/lib/gcc_v4/* $(libdir) install -m 755 linux/driver/lib/* $(libdir) mkdir -p $(libdir)/pkgconfig install -m 644 streamstor.pc $(libdir)/pkgconfig mkdir -p $(incdir) install -m 644 linux/include/* $(incdir) mkdir -p $(bibpath) install -m 644 linux/bib/* $(bibpath) mkdir -p $(utilpath) install -m 755 linux/util/* $(utilpath) install -m 755 linux/driver/util/* $(utilpath) mkdir -p $(moddir) install -m 644 linux/driver/redist/$(OD)/windrvr6.ko $(moddir) sh linux/driver/redist/wdreg windrvr6 no mknod /dev/windrvr6 c 254 0 chmod a+rw /dev/ttyS0 /dev/windrvr* install -m 644 mark5.csh mark5.sh /etc/profile.d mkdir -p /etc/udev/permissions.d install -m 644 60-mark5.permissions /etc/udev/permissions.d uninstall: cd $(incdir) ; rm -f xlrapi.h xlrtypes.h cd $(libdir) ; rm -f libssapi.a libwdapi921.so cd $(libdir)/pkgconfig ; rm -f streamstor.pc cd $(bibdir) ; rm -f *.bib xlrdiag.bis cd /dev ; rm -rf windrvr* cd /etc/profile.d ; rm -f mark5.csh mark5.sh dist: Makefile streamstor.spec rm -rf dist ; mkdir dist ; cd dist ; svn export ../ ${module} ; cp ../configure ../streamstor.spec ${module} ; tar zcvf ${module}.tar.gz ${module} ; rm -rf ${module}