Makefile 1.61 KB
Newer Older
1
TOPDIR = /usr/lyskom
Per Cederqvist's avatar
.  
Per Cederqvist committed
2
3
4
5
SCRIPTDIR = $(TOPDIR)/scripts

include $(SCRIPTDIR)/import.make

6
SUBDIRS = doc junk scripts src
7
SERVER-VER = 1.0
Per Cederqvist's avatar
.  
Per Cederqvist committed
8

9
10
11
12
13
14
all: includes libraries binaries

includes:
	-mkdir $(INCLUDEDIR)
	for i in $(SUBDIRS) ;	\
	do	\
15
16
		[ -d $$i ] && { echo making includes in directory $$i; \
		(cd $$i; $(MAKE) $(EXPORTS) includes) }	\
17
18
19
20
	done


libraries:
Per Cederqvist's avatar
Per Cederqvist committed
21
	-mkdir $(LIBDIR)
Per Cederqvist's avatar
.  
Per Cederqvist committed
22
23
	for i in $(SUBDIRS) ;	\
	do	\
24
25
		[ -d $$i ] && { echo making libraries in directory $$i; \
		(cd $$i; $(MAKE) $(EXPORTS) libraries) }  \
26
27
	done

28
29
30
31
include $(SCRIPTDIR)/sub-binaries.make
include $(SCRIPTDIR)/sub-install.make
include $(SCRIPTDIR)/sub-clean.make
include $(SCRIPTDIR)/sub-depend.make
32

33
depend: includes
34
35
36
37

distribution: clean
	-$(RM) -r lyskom-$(SERVER-VER)
	mkdir lyskom-$(SERVER-VER)
38
	cp Build Makefile lyskom-$(SERVER-VER)/
39
	mkdir lyskom-$(SERVER-VER)/src
40
	cp src/Makefile lyskom-$(SERVER-VER)/src/
41
	mkdir lyskom-$(SERVER-VER)/src/libraries
42
43
44
	cp src/libraries/Makefile lyskom-$(SERVER-VER)/src/libraries/
	cp -r doc lyskom-$(SERVER-VER)/doc
	cp -r scripts lyskom-$(SERVER-VER)/scripts
45
46
47
48
49
	cp -r src/libraries/libansi lyskom-$(SERVER-VER)/src/libraries
	cp -r src/libraries/libcommon lyskom-$(SERVER-VER)/src/libraries
	cp -r src/libraries/libisc lyskom-$(SERVER-VER)/src/libraries
	cp -r src/libraries/libmisc lyskom-$(SERVER-VER)/src/libraries
	cp -r src/server lyskom-$(SERVER-VER)/src
50
	cp -r src/include lyskom-$(SERVER-VER)/src/include
51
	find lyskom-$(SERVER-VER) -name CVS.adm -print -exec rm -rf {} \; -prune
52
53
	tar cvf lyskom-$(SERVER-VER).tar lyskom-$(SERVER-VER)
	$(RM) lyskom-$(SERVER-VER).tar.Z
54
55
	compress lyskom-$(SERVER-VER).tar
	$(RM) -r lyskom-$(SERVER-VER)