blob: 48bf26a75096ffc668c5da502d4b639975fff084 (
plain)
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
|
diff --git a/Makefile b/Makefile
index e232a7d..e254ad3 100644
--- a/Makefile
+++ b/Makefile
@@ -36,7 +36,7 @@
bindir = bin
objdir = obj
ipath=$(prefix)/bin
-CBASEFLAGS = -Wall -Wextra -fno-rtti -fno-exceptions -std=c++11
+CBASEFLAGS = -Wall -Wextra -fno-rtti -fno-exceptions -std=c++17
JAVAINCS = -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
INSTALL=install -o $(USER) -g $(USER)
@@ -151,8 +151,8 @@ libastyle.so: $(OBJs)
@ mkdir -p $(bindir)
$(CXX) -shared $(LDFLAGSr) -Wl,-soname,libastyle.so.$(MAJORVER) \
-o $(bindir)/libastyle.so.$(SOLIBVER) $^
- @ln --symbolic --force libastyle.so.$(SOLIBVER) libastyle.so.$(MAJORVER)
- @ln --symbolic --force libastyle.so.$(MAJORVER) libastyle.so
+ @ln -sf libastyle.so.$(SOLIBVER) libastyle.so.$(MAJORVER)
+ @ln -sf libastyle.so.$(MAJORVER) libastyle.so
@mv libastyle.so* $(bindir)/
@ echo
@@ -161,8 +161,8 @@ libastyled.so: $(OBJsd)
@ mkdir -p $(bindir)
$(CXX) -shared $(LDFLAGSd) -Wl,-soname,libastyled.so.$(MAJORVER) \
-o $(bindir)/libastyled.so.$(SOLIBVER) $^
- @ln --symbolic --force libastyled.so.$(SOLIBVER) libastyled.so.$(MAJORVER)
- @ln --symbolic --force libastyled.so.$(MAJORVER) libastyled.so
+ @ln -sf libastyled.so.$(SOLIBVER) libastyled.so.$(MAJORVER)
+ @ln -sf libastyled.so.$(MAJORVER) libastyled.so
@mv libastyled.so* $(bindir)/
@ echo
@@ -209,23 +209,18 @@ cleanobj:
rm -f $(objdir)/*.o
install:
- $(INSTALL) -m 755 -d $(ipath)
- @$(INSTALL) -m 755 $(bindir)/astyle $(ipath)
-
- @if [ -d $(SYSCONF_PATH)/html ]; then \
- rm -rf $(SYSCONF_PATH)/html; \
- fi
-
- $(INSTALL) -m 755 -d $(SYSCONF_PATH)
- @mkdir -p $(SYSCONF_PATH)/html;
- @for files in astyle.html \
- install.html \
- news.html \
- notes.html \
- styles.css; \
- do \
- $(INSTALL) -m 644 ../../doc/$$files $(SYSCONF_PATH)/html; \
- done
+ # binary
+ $(INSTALL) -vDm755 -t $(DESTDIR)$(ipath) $(bindir)/astyle
+
+ # header
+ $(INSTALL) -vDm644 ../../src/astyle.h -t $(DESTDIR)/$(prefix)/include
+
+ # shared libraries
+ $(INSTALL) -m 755 -d $(DESTDIR)/$(prefix)/lib
+ find bin -name "*.so*" -exec cp -vP {} $(DESTDIR)/$(prefix)/lib \;
+
+ # documentation
+ $(INSTALL) -vDm644 ../../doc/* -t $(DESTDIR)/$(SYSCONF_PATH)/html
uninstall:
rm -f $(ipath)/astyle
|