106 lines
2.6 KiB
Makefile
106 lines
2.6 KiB
Makefile
#
|
|
# Makefile for the linux ncp-filesystem routines.
|
|
#
|
|
|
|
VERSION = 2.0.12
|
|
|
|
# If you are using kerneld to autoload ncp support,
|
|
# uncomment this (kerneld is in linux since about 1.3.57):
|
|
KERNELD = -DHAVE_KERNELD
|
|
|
|
# If your system is ELF, either also do a 'make install', or append the util/
|
|
# directory where the dynamic library resides to the environment
|
|
# variable LD_LIBRARY_PATH
|
|
HAVE_ELF=$(shell file `whereis gcc|cut -d ' ' -f 2`| \
|
|
grep ELF >/dev/null && echo -n yes )
|
|
|
|
# If you want to include NDS support for ncpmount uncomment this:
|
|
# WARNING! NDS support is very beta, uncomment only if you are testing
|
|
# because anything can happen (like crashing the linux box or nw server).
|
|
NDS_SUPPORT = 1
|
|
|
|
# If you want to include packet signature support uncomment this:
|
|
# WARNING! packet signature support is in beta stage, uncomment only when you
|
|
# know what you are doing, anything can happen (like crashing the linux box or
|
|
# netware server).
|
|
# When enabling, make sure you have applied the kernel patches too,
|
|
# otherwise the packet signatures won't work.
|
|
SIGNATURES = 1
|
|
|
|
# Include code for Linux2.0.x
|
|
MOUNT2 = 1
|
|
# Include code for Linux2.1.x
|
|
MOUNT3 = 1
|
|
|
|
TOPDIR = $(shell pwd)
|
|
BINDIR = /usr/bin
|
|
SBINDIR = /sbin
|
|
SUBDIRS = lib sutil util ipx-1.0 man
|
|
|
|
KVERSION=$(shell uname -r | cut -b1-3)
|
|
|
|
INCLUDES=-I$(TOPDIR)/include
|
|
|
|
COPT = -O2
|
|
# COPT += -g
|
|
CFLAGS = $(COPT) -Wall $(INCLUDES) $(KERNELD) -DNCPFS_VERSION=\"$(VERSION)\"
|
|
|
|
export INCLUDES BINDIR SBINDIR KERNELD VERSION HAVE_ELF CFLAGS NDS_SUPPORT \
|
|
SIGNATURES MOUNT2 MOUNT3
|
|
|
|
all:
|
|
set -e; for i in $(SUBDIRS); do make -C $$i all; done
|
|
@if [ "$(HAVE_ELF)" = yes ] ;\
|
|
then \
|
|
echo ; echo ; echo ;\
|
|
echo Please add \'`pwd`/lib\' to the environment ; \
|
|
echo variable LD_LIBRARY_PATH by executing ; \
|
|
echo ;\
|
|
echo export LD_LIBRARY_PATH=\"\$$LD_LIBRARY_PATH:`pwd`/lib\" ; \
|
|
echo ;\
|
|
echo or do a \'make install\'. ;\
|
|
echo ;\
|
|
fi
|
|
|
|
dep:
|
|
for i in $(SUBDIRS); do make -C $$i dep; done
|
|
|
|
install:
|
|
for i in $(SUBDIRS); do make -C $$i install; done
|
|
|
|
clean_me:
|
|
rm -f `find -name '*.out'`
|
|
rm -f `find -name '*~'`
|
|
rm -f *.tgz
|
|
|
|
clean: clean_me
|
|
for i in $(SUBDIRS); do make -C $$i clean; done
|
|
|
|
mrproper: clean_me
|
|
for i in $(SUBDIRS) ipxdump; do make -C $$i mrproper; done
|
|
|
|
modules: ncpfs.o
|
|
|
|
SRCPATH=$(shell pwd)
|
|
SRCDIR=$(shell basename $(SRCPATH))
|
|
DISTFILE=$(SRCDIR).tgz
|
|
|
|
dist: tgz
|
|
make dep
|
|
make all
|
|
|
|
tgz:
|
|
indent -kr -i8 `find . -name '*.[ch]'`
|
|
make mrproper
|
|
(cd ..; \
|
|
tar cvf - $(SRCDIR) | \
|
|
gzip -9 > $(DISTFILE); \
|
|
mv $(DISTFILE) $(SRCDIR))
|
|
|
|
#
|
|
# include a dependency file if one exists
|
|
#
|
|
ifeq (.depend,$(wildcard .depend))
|
|
include .depend
|
|
endif
|