-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
86 lines (75 loc) · 2.08 KB
/
Makefile
File metadata and controls
86 lines (75 loc) · 2.08 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
# Detect OS and Architecture
OS := $(shell uname -s)
ifeq ($(findstring CYGWIN, $(OS)),CYGWIN)
OS := Windows
endif
# Check for external gsl repository needed on Windows
ifeq ($(OS), Windows)
GSL_REPO = $(wildcard ../gsl)
ifeq ($(GSL_REPO),)
$(error GSL source code not found. Run 'git clone https://github.com/rtsoliday/gsl.git' next to the spiffe repository)
endif
endif
# Check for external SDDS repository
SDDS_REPO = $(firstword $(wildcard ../SDDS ../../../../epics/extensions/src/SDDS))
ifeq ($(SDDS_REPO),)
$(error SDDS source code not found. Run 'git clone https://github.com/rtsoliday/SDDS.git' next to the spiffe repository)
endif
ifeq ($(OS), Linux)
GSL_LOCAL = $(wildcard $(SDDS_REPO)/gsl)
endif
include Makefile.rules
DIRS = $(GSL_REPO)
DIRS += $(GSL_LOCAL)
DIRS += $(SDDS_REPO)/include
DIRS += $(SDDS_REPO)/zlib
DIRS += $(SDDS_REPO)/lzma
DIRS += $(SDDS_REPO)/mdblib
DIRS += $(SDDS_REPO)/mdbmth
DIRS += $(SDDS_REPO)/rpns/code
DIRS += $(SDDS_REPO)/namelist
DIRS += $(SDDS_REPO)/SDDSlib
DIRS += $(SDDS_REPO)/fftpack
DIRS += $(SDDS_REPO)/matlib
DIRS += $(SDDS_REPO)/mdbcommon
DIRS += src
.PHONY: all $(DIRS) clean distclean
install: all
all: $(DIRS)
ifneq ($(GSL_REPO),)
$(GSL_REPO):
$(MAKE) -C $@ -f Makefile.MSVC all
endif
ifneq ($(GSL_LOCAL),)
$(GSL_LOCAL):
$(MAKE) -C $@ all
endif
$(SDDS_REPO)/include: $(GSL_REPO) $(GSL_LOCAL)
$(MAKE) -C $@
$(SDDS_REPO)/zlib: $(SDDS_REPO)/include
$(MAKE) -C $@
$(SDDS_REPO)/lzma: $(SDDS_REPO)/zlib
$(MAKE) -C $@
$(SDDS_REPO)/mdblib: $(SDDS_REPO)/lzma
$(MAKE) -C $@
$(SDDS_REPO)/mdbmth: $(SDDS_REPO)/mdblib
$(MAKE) -C $@
$(SDDS_REPO)/rpns/code: $(SDDS_REPO)/mdbmth $(GSL_REPO) $(GSL_LOCAL)
$(MAKE) -C $@
$(SDDS_REPO)/namelist: $(SDDS_REPO)/rpns/code
$(MAKE) -C $@
$(SDDS_REPO)/SDDSlib: $(SDDS_REPO)/namelist
$(MAKE) -C $@
$(SDDS_REPO)/fftpack: $(SDDS_REPO)/SDDSlib
$(MAKE) -C $@
$(SDDS_REPO)/matlib: $(SDDS_REPO)/fftpack
$(MAKE) -C $@
$(SDDS_REPO)/mdbcommon: $(SDDS_REPO)/matlib
$(MAKE) -C $@
src: $(SDDS_REPO)/mdbcommon
$(MAKE) -C $@
clean:
$(MAKE) -C src clean
distclean: clean
rm -rf bin/$(OS)-$(ARCH)
rm -rf lib/$(OS)-$(ARCH)