-
Notifications
You must be signed in to change notification settings - Fork 17
/
Makefile.project
73 lines (57 loc) · 1.85 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
_SMEKA_project = 1
# Contains specific default information for this project
# Step this version upon new versions
PROJECT_VERSION_MAJOR = 0
PROJECT_VERSION_MINOR = 9
PROJECT_VERSION_PATCH = 1
PROJECT_VERSION = $(PROJECT_VERSION_MAJOR).$(PROJECT_VERSION_MINOR).$(PROJECT_VERSION_PATCH)
# These are constant default
PROJECT_NAME = fdict
# Create the list of libraries
FDICT_LIB ?= fdict$(LIB_SUFFIX)
FDICT_LIB_STATIC ?= lib$(FDICT_LIB).a
FDICT_LIB_SHARED ?= lib$(FDICT_LIB).so
FYPPFLAGS += -DPROJECT_VERSION_MAJOR=$(PROJECT_VERSION_MAJOR)
FYPPFLAGS += -DPROJECT_VERSION_MINOR=$(PROJECT_VERSION_MINOR)
FYPPFLAGS += -DPROJECT_VERSION_PATCH=$(PROJECT_VERSION_PATCH)
# Define custom options for fdict
STATIC ?= 1
# If the library was built previously,
# we default to building the shared library.
ifneq ("$(wildcard $(FDICT_LIB_SHARED))","")
SHARED ?= 1
else
SHARED ?= 0
endif
# Create the list of libraries
ifeq ($(STATIC),1)
LIBRARIES += $(FDICT_LIB_STATIC)
endif
ifeq ($(SHARED),1)
LIBRARIES += $(FDICT_LIB_SHARED)
# Forcefully denote that objects should have
# position independent code
# THIS IS A SMEKA SETTING
PIC = 1
endif
# Add dependency of libraries
install: $(LIBRARIES) fdict.inc fdict.fypp
# Create custom installation of modules
.NOTPARALLEL: install-mod
smeka-install: install-mod
install-mod: $(F_MODS)
$(INSTALL) -m $(_OCT_rwxrxrx) -d $(DESTDIR)$(PREFIX)/$(FMOD_DIR)
$(INSTALL) -m $(_OCT_rwrr) -t $(DESTDIR)$(PREFIX)/$(FMOD_DIR) $(F_MODS)
.NOTPARALLEL: install-header
smeka-install: install-header
install-header: fdict.inc smeka-install-init-dir
$(INSTALL) -m $(_OCT_rwrr) -t $(DESTDIR)$(PREFIX)/$(INC_DIR) fdict.inc fdict.fypp
# Force the deletion of both libraries
clean:
-$(RM) $(RM_FLAG_FORCE) $(FDICT_LIB_STATIC) $(FDICT_LIB_SHARED) fdict.inc fdict.fypp
.PHONY: doc
doc: source
ford ford_doc.md
# Local Variables:
# mode: makefile-gmake
# End: