-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile.project
105 lines (82 loc) · 2.59 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
105
_SMEKA_project = 1
# Contains specific default information for this
# project
# Step this version upon new versions
PROJECT_MAJOR = 0
PROJECT_MINOR = 8
PROJECT_MICRO = 4
PROJECT_VERSION = $(PROJECT_MAJOR).$(PROJECT_MINOR).$(PROJECT_MICRO)
# These are constant default
PROJECT_NAME = flook
#### Whether the Object-Oriented module should be build
OO ?= 0
# We default to build both shared and the static
# library.
STATIC ?= 1
SHARED ?= 0
# Create the list of libraries
FLOOK_LIB ?= flook$(LIB_SUFFIX)
FLOOK_LIB_STATIC ?= lib$(FLOOK_LIB).a
FLOOK_LIB_STATIC_ALL ?= lib$(FLOOK_LIB)all.a
FLOOK_LIB_SHARED ?= lib$(FLOOK_LIB).so
ifeq ($(STATIC),1)
LIBRARIES += $(FLOOK_LIB_STATIC)
endif
ifeq ($(SHARED),1)
LIBRARIES += $(FLOOK_LIB_SHARED)
# Forcefully denote that objects should have
# position independent code
# THIS IS A SMEKA SETTING
PIC = 1
endif
# Check if liball is in the target list, if so add flookall to libraries
ifneq ("$(wildcard $(FLOOK_LIB_STATIC_ALL))","")
# found
LIBRARIES += $(FLOOK_LIB_STATIC_ALL)
else
ifneq (,$(findstring liball,$(MAKECMDGOALS)))
# found
LIBRARIES += $(FLOOK_LIB_STATIC_ALL)
endif
endif
# Create custom installation of modules
.PHONY: install-mod
.NOTPARALLEL: install-mod
smeka-install: install-mod
install-mod:
ifneq ($(LIBRARIES),)
install-mod:
# This should only pass if one wishes to install the flook library as well
$(INSTALL) -m $(_OCT_rwrr) -t $(DESTDIR)$(PREFIX)/$(FMOD_DIR) *.mod
endif
.NOTPARALLEL: install-header
smeka-install: install-header
install-header: flook.inc
$(INSTALL) -m $(_OCT_rwrr) -t $(DESTDIR)$(PREFIX)/$(INC_DIR) flook.inc
# Create distribution for releases
.PHONY: dist-aotus dist-flook dist-assemble dist
dist-aotus:
git submodule sync aotus
git submodule init aotus
git submodule update aotus
(cd aotus ; git archive --format=tar.gz --prefix aotus/ HEAD > ../aotus.tar.gz)
dist-flook:
git archive --format=tar.gz --prefix flook-$(PROJECT_VERSION)/ HEAD > flook-$(PROJECT_VERSION).tar.gz
dist-assemble: dist-aotus dist-flook
-$(RM) $(RM_FLAG_FORCE) $(RM_FLAG_RECURSE) .tmp_dist
($(MKDIR) .tmp_dist ; cd .tmp_dist ; \
tar xfz ../flook-$(PROJECT_VERSION).tar.gz ; cd flook-* ; \
tar xfz ../../aotus.tar.gz ; \
cd .. ; $(RM) ../flook-$(PROJECT_VERSION).tar.gz ; \
tar cfz ../flook-$(PROJECT_VERSION).tar.gz flook-$(PROJECT_VERSION) ; \
$(RM) $(RM_FLAG_FORCE) $(RM_FLAG_RECURSE) .tmp_dist ../aotus.tar.gz)
dist: dist-assemble
.PHONY: doc
doc:
doxygen doc/Doxyfile
.PHONY: clean
clean:
-$(RM) $(RM_FLAG_FORCE) $(FLOOK_LIB_STATIC) $(FLOOK_LIB_SHARED) $(FLOOK_LIB_STATIC_ALL) flook.inc
# Local Variables:
# mode: makefile-gmake
# End: