-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
61 lines (47 loc) · 1.21 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
# Copyright 2010 2011 2012 Helge Bahmann <[email protected]>
# Copyright 2011 2012 2013 2014 2015 Nico Reißmann <[email protected]>
# See COPYING for terms of redistribution.
define HELP_TEXT
clear
echo "Makefile for the Jive RVSDG API"
echo "Version 1.0 - 2019-06-18"
endef
.PHONY: help
help:
@$(HELP_TEXT)
@$(HELP_TEXT_JIVE)
JIVE_ROOT ?= .
.PHONY: all
all: jive check
include Makefile.sub
include tests/Makefile.sub
.PHONY: doc
doc:
doxygen doxygen.conf
.PHONY: clean
clean: jive-clean
%.lo: %.cpp
$(CXX) -c -DPIC -fPIC $(CFLAGS) $(CPPFLAGS) -o $@ $<
%.la: %.cpp
$(CXX) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
%.a:
rm -f $@
ar clqv $@ $^
ranlib $@
%.so:
$(CC) -shared -o $@ $^
.dep/%.la.d: %.c
@mkdir -p $(dir $@)
@$(CXX) -MM $(CFLAGS) $(CPPFLAGS) -MT $(<:.c=.la) -MP -MF $@ $<
@echo MAKEDEP $<
.dep/%.lo.d: %.c
@mkdir -p $(dir $@)
@$(CXX) -MM -DPIC -fPIC $(CFLAGS) $(CPPFLAGS) -MT $(<:.c=.lo) -MP -MF $@ $<
DEPEND = $(patsubst %.c, .dep/%.la.d, $(SOURCES)) $(patsubst %.c, .dep/%.lo.d, $(SOURCES))
depend: $(DEPEND)
ifeq ($(shell if [ -e .dep ] ; then echo yes ; fi),yes)
-include $(DEPEND)
endif
ifeq ($(shell if [ -e .Makefile.override ] ; then echo yes ; fi),yes)
include .Makefile.override
endif