-
Notifications
You must be signed in to change notification settings - Fork 59
/
Makefile.am
138 lines (109 loc) · 4.92 KB
/
Makefile.am
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
## Process this file with automake to produce Makefile.in
## EXTRACTOR is a little different in that it uses two pre-existing
## directories (which are automake/autoconfed using the SExtractor
## methodology). These do most of the work, this is just a wrapper
## for extracting the parts needed and building the EXTRACTOR atask
## and finally installing.
nodist_bin_SCRIPTS = extractor.csh extractor.sh extractor.icl extractor.ifc
bin_MONOLITHS = extractor
extractor_SOURCES = extract/src/extractor.c
# no variable extractor_TASKS -- extractor is an ATASK
extractor_LDADD = $(LDADD) libextractor.a libfits.a `ndg_link_adam`
bin_PROGRAMS = sex
noinst_LIBRARIES = libextractor.a libfits.a
# Files for the docs, directory. Some of these may present in the .htx
# subdirectory as they are needed by the hypertext document, this just
# copies the files out of there and into "star/docs" when necessary.
stardocs_DATA = @STAR_LATEX_DOCUMENTATION@ sun226.htx/mud165.pdf sun226_fig.pdf
## There are no local sources for these libraries and programs.
libextractor_a_SOURCES =
libfits_a_SOURCES =
sex_SOURCES =
## Require the extractor library and sex binary to be built sources.
## These are actually created in sub-directories, so we need a target to get
## them into the local dependencies.
BUILT_SOURCES = libextractor.a libfits.a sex$(EXEEXT) extractor.ifl
# Data for share/extractor. Currently this is any misc docs (news file)
#dist_pkgdata_DATA = extractor.news
dist_starnews_DATA = extractor.news
# Configuration information (in this case the SExtractor config
# directory, keep this upto date).
extractorsupportdir = $(bindir)/config
extractorsupport_DATA = \
extract/src/config/block_3x3.conv extract/src/config/gauss_3.0_5x5.conv\
extract/src/config/mexhat_5.0_11x11.conv extract/src/config/default.conv\
extract/src/config/gauss_3.0_7x7.conv extract/src/config/README\
extract/src/config/default.nnw extract/src/config/gauss_4.0_7x7.conv\
extract/src/config/tophat_1.5_3x3.conv extract/src/config/default.param\
extract/src/config/gauss_5.0_9x9.conv extract/src/config/tophat_2.0_3x3.conv\
extract/src/config/default.sex extract/src/config/mexhat_1.5_5x5.conv\
extract/src/config/tophat_2.5_3x3.conv extract/src/config/gauss_1.5_3x3.conv \
extract/src/config/mexhat_2.0_7x7.conv extract/src/config/tophat_3.0_3x3.conv\
extract/src/config/gauss_2.0_3x3.conv extract/src/config/mexhat_2.5_7x7.conv\
extract/src/config/tophat_4.0_5x5.conv extract/src/config/gauss_2.0_5x5.conv\
extract/src/config/mexhat_3.0_9x9.conv extract/src/config/tophat_5.0_5x5.conv\
extract/src/config/gauss_2.5_5x5.conv extract/src/config/mexhat_4.0_9x9.conv
## Local rules for building the (pre-configured) sub-directories and
## extracting the required products. When developing you need to use the
## makefiles in the sub-directories and return to this level to complete the
## build.
# EXTRACTOR needs the libextractor.a and libfits.a libraries.
libextractor.a: extract/src/libextractor.a
extract/src/libextractor.a: FORCE
(cd extract ;\
export INSTALL; unset INSTALL;\
export SHELL; unset SHELL;\
export LINK; unset LINK; \
make ;\
cp -p src/libextractor.a .. ;\
cp -p src/fits/libfits.a .. ;\
cp -p src/extractor.o ..)
# SExtractor runs to completion.
sex$(EXEEXT): sextractor/src/sex$(EXEEXT)
sextractor/src/sex$(EXEEXT): FORCE
(cd sextractor ;\
export INSTALL; unset INSTALL;\
export SHELL; unset SHELL;\
export LINK; unset LINK; \
make ;\
cp -p src/sex$(EXEEXT) ..)
FORCE:
## Clean recurses into these directories.
clean-local:
- (cd extract; make clean )
- (cd sextractor; make clean )
distclean-local:
- (cd extract; make distclean )
- (cd sextractor; make distclean )
extractor.ifl: extract/src/extractor.ifl
cp -p extract/src/extractor.ifl .
# Rule IFL to IFC compilation.
.ifl.ifc:
@COMPIFL@ $<
## Clean up extra generated files.
MAINTAINERCLEANFILES = extractor.ifl
## Need all the source code in the sub-directories.
EXTRA_DIST = extract sextractor extractor.csh.in extractor.icl.in \
extractor.sh.in
## Before distributing subdirectories we need to clean then up (we get all
## the files in these directories). Also remove the CVS trace.
dist-hook:
rm -rf `find $(distdir) -name CVS`
(cd $(distdir)/extract; make distclean);
(cd $(distdir)/sextractor; make distclean);
# Fixup scripts with bin location
# The scripts needs to have installation locations edited into them
edit = sed \
-e 's,@bindir\@,$(bindir),g' \
-e 's,@starhelpdir\@,$(starhelpdir),g' \
-e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g'
extractor.csh: extractor.csh.in
-rm -f extractor.csh
$(edit) $(srcdir)/extractor.csh.in > extractor.csh.tmp
mv extractor.csh.tmp extractor.csh
extractor.sh: extractor.sh.in
-rm -f extractor.sh
$(edit) $(srcdir)/extractor.sh.in > extractor.sh.tmp
mv extractor.sh.tmp extractor.sh
CLEANFILES = extractor.csh version.dat extractor extractor.ifc \
extractor.icl extractor.sh