-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.project
104 lines (77 loc) · 2.23 KB
/
Makefile.project
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
_SMEKA_project = 1
# Contains specific default information for this
# project
# Step this version upon new versions
PROJECT_MAJOR = 0
PROJECT_MINOR = 1
PROJECT_MICRO = 2
PROJECT_VERSION = $(PROJECT_MAJOR).$(PROJECT_MINOR).$(PROJECT_MICRO)
# These are constant default
PROJECT_NAME = buds
ifeq ($(BUD_ONLY),1)
STATIC = 0
SHARED = 0
endif
# We default to build both shared and the static
# library.
STATIC ?= 1
SHARED ?= 1
# Create the list of libraries
BUDS_LIB ?= buds$(LIB_SUFFIX)
BUDS_LIB_STATIC ?= lib$(BUDS_LIB).a
BUDS_LIB_SHARED ?= lib$(BUDS_LIB).so
ifeq ($(STATIC),1)
LIBRARIES += $(BUDS_LIB_STATIC)
endif
ifeq ($(SHARED),1)
LIBRARIES += $(BUDS_LIB_SHARED)
# Forcefully denote that objects should have
# position independent code
# THIS IS A SMEKA SETTING
PIC = 1
endif
# Create custom installation of modules
.PHONY: install-mod
.NOTPARALLEL: install-mod
smeka-install: install-mod
install-mod: install-version
install-mod:
# include/*.inc are the "buds" library sources
# *.inc is the version source (created at installation time)
install -pm $(_OCT_rwrr) -t $(FMOD_DIR) $(TOP_DIR)/include/*.inc *.inc
ifneq ($(LIBRARIES),)
# This should only pass if one wishes to install the bud library as well
install -pm $(_OCT_rwrr) -t $(FMOD_DIR) *.mod
endif
VERSION_FILE = bud_version.inc
.PHONY: install-version
.NOTPARALLEL: install-version
install-version:
@echo "Creating version file: $(VERSION_FILE)"
@echo "#define BUDS_MAJOR $(PROJECT_MAJOR)" > $(VERSION_FILE)
@echo "#define BUDS_MINOR $(PROJECT_MINOR)" >> $(VERSION_FILE)
@echo "#define BUDS_MICRO $(PROJECT_MICRO)" >> $(VERSION_FILE)
@echo "#define BUDS_VERSION_STR \"$(PROJECT_MAJOR).$(PROJECT_MINOR).$(PROJECT_MICRO)\"" >> $(VERSION_FILE)
.PHONY: doc doc-fast doc-ffast
doc:
doc/make_doc.sh
doc-fast:
OPTIPNG=0 doc/make_doc.sh
doc-ffast:
DOT=0 OPTIPNG=0 doc/make_doc.sh
doc-ford-ffast:
DOC=ford DOT=0 OPTIPNG=0 doc/make_doc.sh
.PHONY: dist-buds
dist-buds: source-all
git archive -o buds.tar HEAD
tar rf buds.tar sources*
dist: dist-buds
.PHONY: clean clean-source
clean:
-rm -f $(BUDS_LIB_STATIC) $(BUDS_LIB_SHARED)
# For temporary cleaning of local preprocessed directories
clean-source:
-rm -rf $(SOURCES_DIR)
# Local Variables:
# mode: makefile-gmake
# End: