File: Makefile

package info (click to toggle)
yorick 1.5.08-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 7,508 kB
  • ctags: 7,937
  • sloc: ansic: 75,604; cpp: 1,282; lisp: 1,217; sh: 1,026; makefile: 616; fortran: 19
file content (84 lines) | stat: -rw-r--r-- 1,782 bytes parent folder | download
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
SHELL=/bin/sh

ALLDIRS=play opengl gist yorick matrix fft doc
CONFIGDIRS=play yorick
PKGDIRS=

all: yorexe gistexe docs

yorexe: Make.cfg
	@cd yorick; $(MAKE)

gistexe: Make.cfg
	@cd gist; $(MAKE) gist

docs:
	@cd doc; $(MAKE) docs

Make.cfg:
	./configure $(PKGDIRS)

config: distclean
	@$(MAKE) Make.cfg

prefix=.
Y_PLATFORM=.
Y_SITE=.
Y_HOME=.
ysite:
	if S="s?^prefix=.*?prefix=$(prefix)?;\
	s?^Y_PLATFORM=.*?Y_PLATFORM=$(Y_PLATFORM)?;\
	s?^Y_SITE=.*?Y_SITE=$(Y_SITE)?;\
	s?^Y_HOME=.*?Y_HOME=$(Y_HOME)?";\
	sed -e "$$S" ysite.sh >ysite.sh1; then mv ysite.sh1 ysite.sh; fi

clean::
	@rm -f Make.del
	@if test ! -r Make.cfg; then touch Make.cfg Make.del; fi
	@for d in $(ALLDIRS); do ( cd $$d; $(MAKE) clean; ); done
	@if test -r Make.del; then rm -f Make.cfg Make.del; fi
	rm -f *~ '#'* *.o cfg* ysite.sh? core a.out

distclean::
	@touch Make.cfg
	@for d in $(ALLDIRS); do ( cd $$d; $(MAKE) distclean; ); done
	rm -f *~ '#'* *.o cfg* Make.* ysite.sh? core a.out


check:
	@cd yorick; $(MAKE) check

INSTALL_ROOT=
Y_BINDIR=
Y_DOCDIR=
install: yorexe gistexe docs
	./install.sh +both "$(INSTALL_ROOT)" "$(Y_BINDIR)" $(Y_DOCDIR)

install1: yorexe gistexe
	./install.sh +home "$(INSTALL_ROOT)" "$(Y_BINDIR)" $(Y_DOCDIR)

uninstall:
	./install.sh -both "$(INSTALL_ROOT)" "$(Y_BINDIR)" $(Y_DOCDIR)

uninstall1:
	./install.sh -home "$(INSTALL_ROOT)" "$(Y_BINDIR)" $(Y_DOCDIR)

dist: distclean
	@$(MAKE) prefix=. Y_PLATFORM=. Y_SITE=. Y_HOME=. ysite
	W=`pwd`;N=`basename $$W`;R=`tail -1 VERSION`;cd ..;\
	tar cvf - $$N|gzip - >$$N.$$R.tgz;

# targets for ./configure
echocc:
	echo "$(CC)" >cfg.tmp
echorl:
	echo "$(RANLIB)" >cfg.tmp
echoar:
	echo "$(AR)" >cfg.tmp
echoml:
	echo "$(MATHLIB)" >cfg.tmp
pkgconfig:
	@for d in $(CONFIGDIRS); do ( cd $$d; $(MAKE) config; ); done

yorclean:
	@: