Makefile.am 1.87 KB
Newer Older
1
## -*- mode: makefile; tab-width: 4 -*-
2 3
## $Id$

4 5
AUTOMAKE_OPTIONS = foreign

Eric J. Korpela's avatar
 
Eric J. Korpela committed
6 7
include Makefile.incl

Karl Chen's avatar
Karl Chen committed
8 9 10
## make sure rebuilding uses the right aclocal-switches
ACLOCAL_AMFLAGS = -I m4

Eric J. Korpela's avatar
 
Eric J. Korpela committed
11
if ENABLE_LIBRARIES
12 13
    API_SUBDIRS = api lib
if ENABLE_SERVER
14
    API_SUBDIRS += zip
15
endif
16 17 18 19
## boinc_zip needed for wrapper
if ENABLE_APPS
    API_SUBDIRS += zip
endif
20 21 22
if ENABLE_BOINCZIP
    API_SUBDIRS += zip
endif
Eric J. Korpela's avatar
 
Eric J. Korpela committed
23
endif
David Anderson's avatar
David Anderson committed
24

Karl Chen's avatar
Karl Chen committed
25
if ENABLE_SERVER
Christian Beer's avatar
Christian Beer committed
26
   SERVER_SUBDIRS = db py sched apps tools vda html
27
## once contained samples/example_app which breaks out-of-source-tree builds
Karl Chen's avatar
Karl Chen committed
28 29
endif

Karl Chen's avatar
Karl Chen committed
30
if ENABLE_CLIENT
Eric J. Korpela's avatar
Eric J. Korpela committed
31
   CLIENT_SUBDIRS = client client/scripts
32
endif
33

Eric J. Korpela's avatar
 
Eric J. Korpela committed
34
if ENABLE_MANAGER
David Anderson's avatar
David Anderson committed
35
   CLIENTGUI_SUBDIRS = clientgui locale
36 37 38
if BUILD_X11_SCREENSAVER
   CLIENTGUI_SUBDIRS += clientscr
endif
Karl Chen's avatar
Karl Chen committed
39 40
endif

41 42 43 44
if ENABLE_APPS
   APPS_SUBDIRS = samples
endif

45 46
# ORDER MATTERS below.  One must build dependencies FIRST, then things
# that depend on them later
47
SUBDIRS = m4 $(API_SUBDIRS) $(SERVER_SUBDIRS) $(CLIENT_SUBDIRS) $(CLIENTGUI_SUBDIRS) $(APPS_SUBDIRS) doc
48 49 50 51

# Putting a directory name recursively copies the entire contents - the
# dist-hook below gets rid of CVS directories.

Karl Chen's avatar
Karl Chen committed
52
EXTRA_DIST =                                    \
53 54 55 56
    win_build                                   \
    doc                                         \
    stripchart                                  \
    INSTALL
57

Eric J. Korpela's avatar
 
Eric J. Korpela committed
58
if INSTALL_HEADERS
Eric J. Korpela's avatar
Eric J. Korpela committed
59
pkginclude_HEADERS = \
60 61
    version.h \
    svn_version.h
Eric J. Korpela's avatar
 
Eric J. Korpela committed
62
endif
Karl Chen's avatar
Karl Chen committed
63

64 65 66 67
# svn_version.h should always be rebuilt.

BUILT_SOURCES = svn_version.h
svn_version.h: generate_svn_version.sh
68
	cd $(srcdir) && sh generate_svn_version.sh
69 70
.PHONY: svn_version.h

Eric J. Korpela's avatar
Eric J. Korpela committed
71 72 73
# Add a stage target for staging a distribution

clean-generic:
74
	rm -rf stage *.gcov
Eric J. Korpela's avatar
Eric J. Korpela committed
75 76 77 78 79 80

stage: all
	if [ ! -d stage ] ; then mkdir stage ; fi
	rm -rf stage/*
	$(MAKE) DESTDIR=$(PWD)/stage install

81
dist-hook:
82 83
	rm -rf `find $(distdir) -name .backup -prune -o -name '*~' -o -name CVS`
#	cd $(distdir) && ./_autosetup