-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
103 lines (73 loc) · 2.29 KB
/
Makefile
File metadata and controls
103 lines (73 loc) · 2.29 KB
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
# File : Makefile
# Purpose : top-level makefile
# Build test programs
export TESTS ?= yes
# Build tool executables
export TOOLS ?= yes
# Link against an external ForUM library
#
# If set to "yes", then the build system will use pkgconf to search
# for library, with a package name speficied by EXTERNAL_FORUM_PKG.
# Otherwise, the ForUM library will be built and linked internally
EXTERNAL_FORUM ?= no
EXTERNAL_FORUM_PKG ?= forum
# Enable debugging (with a performance penalty)
export DEBUG ?= no
# Build & link against shared libraries
export SHARED ?= yes
# Enable FPE checks
export FPE ?= yes
# Enable OpenMP parallelization
export OMP ?= yes
# Build Python interface
export PYTHON ?= yes
# Link string for FITS library
# (leave undefined if not available)
#export FITS_LDFLAGS = -L/opt/local/lib -lcfitsio
############ DO NOT EDIT BELOW THIS LINE ############
### (unless you think you know what you're doing) ###
#####################################################
# General make settings
SH = /bin/bash
MAKEFLAGS += --no-print-directory
# Paths
export BIN_DIR ?= $(CURDIR)/bin
export LIB_DIR ?= $(CURDIR)/lib
export PKG_DIR ?= $(LIB_DIR)/pkgconfig
export INC_DIR ?= $(CURDIR)/include
export SRC_DIR := $(CURDIR)/src
export SRC_DIRS =: $(addprefix $(SRC_DIR)/, \
axis common cython include indexer lib limb \
math ninterp passband photcache photgrid \
photint photint/limb \
photsource photsource/hdf5 photsource/mem photsource/spec \
range range/comp range/lin range/log range/tab \
speccache specgrid \
specint specint/limb \
specsource specsource/hdf5 \
tests tools vgrid)
# Rules
install : build | $(BIN_DIR) $(LIB_DIR) $(PKG_DIR) $(INC_DIR)
@$(MAKE) -C build $@
build : install-forum
@$(MAKE) -C build $@
clean : clean-forum
@$(MAKE) -C build $@
@rm -rf $(BIN_DIR) $(LIB_DIR) $(PKG_DIR) $(INC_DIR)
test :
@$(MAKE) -C test $@
check_src :
@$(MAKE) -C build $@
ifneq ($(EXTERNAL_FORUM),yes)
install-forum : | $(BIN_DIR) $(LIB_DIR) $(PKG_DIR) $(INC_DIR)
@$(MAKE) -C $(SRC_DIR)/forum
clean-forum :
@$(MAKE) -C $(SRC_DIR)/forum clean
install-forum : TESTS = no
else
install-forum : ;
clean-forum : ;
endif
.PHONY: install build clean test check_src install-forum clean-forum
$(BIN_DIR) $(LIB_DIR) $(PKG_DIR) $(INC_DIR) :
@mkdir -p $@