File: Makefile.generic

package info (click to toggle)
global 3.55-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,336 kB
  • ctags: 1,634
  • sloc: ansic: 12,863; perl: 1,670; lisp: 325; sh: 188; makefile: 95
file content (45 lines) | stat: -rw-r--r-- 1,400 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
##### EDIT THESE PARAMETERS ###############################################
CC     = gcc
DESTDIR = /usr
BINDIR = $(DESTDIR)/bin
MANDIR = $(DESTDIR)/man
###########################################################################

SUBDIR = libregex libdb libutil global gtags gctags btreeop htags systags
LIBS   = ../libutil/libgloutil.a ../libdb/libglodb.a ../libregex/libgloregex.a
CFLAGS = -O -I../libutil -I../libdb -I../libregex -I../machine

all:
	@for d in $(SUBDIR); do \
		set -e; (cd $$d; echo '===>' $$d; \
		make $(MFLAGS) CC=$(CC) LIBS="$(LIBS)" CFLAGS="$(CFLAGS)") ;\
	done
install:
	@for d in $(SUBDIR); do \
		set -e; (cd $$d; echo '===>' $$d; make $(MFLAGS) BINDIR=$(BINDIR) MANDIR=$(MANDIR) install) ;\
	done
cygwin_install:
	@for d in $(SUBDIR); do \
		set -e; (cd $$d; echo '===>' $$d; make $(MFLAGS) BINDIR=$(BINDIR) MANDIR=$(MANDIR) cygwin_install) ;\
	done
gen:
	@if [ ! -f Makefile.generic ]; then \
		echo "Error: generic makefile not found."; exit 1; \
	fi
	cp Makefile.generic Makefile
	for d in $(SUBDIR) systags; do \
		(cd $$d && cp Makefile.generic Makefile) ;\
	done
bsd:
	@if [ ! -f Makefile.bsd ]; then \
		echo "Error: BSD style makefile not found."; exit 1; \
	fi
	cp Makefile.bsd Makefile
	for d in $(SUBDIR) systags; do \
		(cd $$d && cp Makefile.bsd Makefile) ;\
	done
clean:
	@for d in $(SUBDIR); do \
		(cd $$d; echo '===>' $$d; make $(MFLAGS) clean) ;\
	done