forked from dstndstn/tractor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
85 lines (67 loc) · 2.44 KB
/
Makefile
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
all: mix emfit mpf
FORCE:
ceres: FORCE
$(MAKE) -C tractor ceres
mix: FORCE
$(MAKE) -C tractor mix
emfit: FORCE
$(MAKE) -C tractor emfit
mpf: FORCE
$(MAKE) -C tractor mpf
cython:
python setup-cython.py build_ext --inplace
.PHONY: cython
doc:
$(MAKE) -C doc -f Makefile.sphinx html PYTHONPATH=$(shell pwd):${PYTHONPATH}
cp -a doc/_build/html .
.PHONY: doc
_denorm.so: denorm.i
swig -python $<
gcc -fPIC -c denorm_wrap.c $$(python-config --includes)
gcc -o $@ -shared denorm_wrap.o -L$$(python-config --prefix)/lib $$(python-config --libs --ldflags)
_refcnt.so: refcnt.i
swig -python $<
gcc -fPIC -c refcnt_wrap.c $$(python-config --includes)
gcc -o $@ -shared refcnt_wrap.o -L$$(python-config --prefix)/lib $$(python-config --libs --ldflags)
_callgrind.so: callgrind.i
swig -python $<
gcc -fPIC -c callgrind_wrap.c $$(python-config --includes) -I/usr/include/valgrind
gcc -o _callgrind.so -shared callgrind_wrap.o -L$$(python-config --prefix)/lib $$(python-config --libs --ldflags)
refcnt: _refcnt.so refcnt.py
.PHONY: refcnt
INSTALL_DIR ?= /usr/local/tractor
PY_INSTALL_DIR ?= $(INSTALL_DIR)/lib/python
TRACTOR_INSTALL_DIR := $(PY_INSTALL_DIR)/tractor
TRACTOR_INSTALL := __init__.py basics.py brightness.py cache.py \
ceres_mixin.py ducks.py ellipses.py engine.py fitpsf.py galaxy.py \
image.py imageutils.py mixture_profiles.py motion.py \
multiproc.py ordereddict.py patch.py pointsource.py psf.py psfex.py \
sdss.py sersic.py sfd.py shifted.py sky.py source_extractor.py \
splinesky.py tractortime.py utils.py wcs.py \
optimize.py lsqr_optimizer.py ceres_optimizer.py \
mix.py _mix.so emfit.py _emfit.so mp_fourier.py _mp_fourier.so
WISE_INSTALL_DIR := $(PY_INSTALL_DIR)/wise
WISE_INSTALL := __init__.py allwisecat.py forcedphot.py unwise.py wise_psf.py \
wisecat.py \
allsky-atlas.fits wise-psf-avg.fits
CERES_INSTALL := ceres.py _ceres.so
install:
-($(MAKE) ceres && $(MAKE) install-ceres)
$(MAKE) mix emfit
mkdir -p $(TRACTOR_INSTALL_DIR)
@for x in $(TRACTOR_INSTALL); do \
echo cp tractor/$$x '$(TRACTOR_INSTALL_DIR)/'$$x; \
cp tractor/$$x '$(TRACTOR_INSTALL_DIR)/'$$x; \
done
mkdir -p $(WISE_INSTALL_DIR)
@for x in $(WISE_INSTALL); do \
echo cp wise/$$x '$(WISE_INSTALL_DIR)/'$$x; \
cp wise/$$x '$(WISE_INSTALL_DIR)/'$$x; \
done
install-ceres:
mkdir -p $(TRACTOR_INSTALL_DIR)
@for x in $(CERES_INSTALL); do \
echo cp tractor/$$x '$(TRACTOR_INSTALL_DIR)/'$$x; \
cp tractor/$$x '$(TRACTOR_INSTALL_DIR)/'$$x; \
done
.PHONE: install