-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
96 lines (65 loc) · 1.81 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
86
87
88
89
90
91
92
93
94
95
96
# File : Makefile
# Purpose : top-level makefile
# Build test programs
TESTS ?= yes
# Build tool executables
TOOLS ?= yes
# Build ForUM internally. If not set to "yes", then
# you must set FORUM_LIB_DIR and FORUM_INC_DIR to
# point to where the ForUM library and module files,
# respectively, are located
FORUM ?= yes
# Enable debugging (with a performance penalty)
DEBUG ?= no
# Build & link against shared libraries
SHARED ?= yes
# Enable FPE checks
FPE ?= yes
# Enable OpenMP parallelization
OMP ?= yes
# Build Python interface
PYTHON ?= yes
# Link string for FITS library
# (leave undefined if not available)
#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
export
SH = /bin/bash
MAKEFLAGS += --no-print-directory
# Paths
BIN_DIR ?= $(CURDIR)/bin
LIB_DIR ?= $(CURDIR)/lib
INC_DIR ?= $(CURDIR)/include
SRC_DIR = $(CURDIR)/src
SRC_DIRS = $(addprefix $(SRC_DIR)/, common cython include lib math phot \
range spec tests tools vgrid)
ifeq ($(FORUM),yes)
FORUM_LIB_DIR = $(LIB_DIR)
FORUM_INC_DIR = $(INC_DIR)
endif
# Rules
all : install-forum
@$(MAKE) -C build
install : all | $(BIN_DIR) $(LIB_DIR) $(INC_DIR)
@$(MAKE) -C build install
clean : clean-forum
@$(MAKE) -C build clean
@rm -rf $(BIN_DIR) $(LIB_DIR) $(INC_DIR)
test :
@$(MAKE) --no-print-directory -C test $@
ifeq ($(FORUM),yes)
install-forum : | $(BIN_DIR) $(LIB_DIR) $(INC_DIR)
@$(MAKE) -C $(SRC_DIR)/forum install
clean-forum :
@$(MAKE) -C $(SRC_DIR)/forum clean
install-forum : TESTS = no
else
install-forum : ;
clean-forum : ;
endif
.PHONY: all install clean test install-forum clean-forum
$(BIN_DIR) $(LIB_DIR) $(INC_DIR) :
@mkdir -p $@