summaryrefslogtreecommitdiff
path: root/academic/mkDSSP/makefile.patch
blob: 17563fde9ab14c7a6555e399d8fa66d254866800 (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
74
75
76
Description: assorted fixes
 [Maarten L. Hekkelman <m.hekkelman@cmbi.ru.nl>]
  * DEST_DIR patched to DESTDIR
 .
 [Laszlo Kajan <lkajan@rostlab.org>]
  * stripping is patched out so that it can be done by dh into a debug package
  * line echo suppression is removed
  * spelling errors in man page fixed
 .
 Upstream is aware of this patch.
Author: Maarten L. Hekkelman <m.hekkelman@cmbi.ru.nl>
Author: Laszlo Kajan <lkajan@rostlab.org>
--- a/makefile
+++ b/makefile
@@ -11,18 +11,16 @@
 
 all: mkdssp
 
-include make.config
-
 VERSION				= 2.2.1
 
 DEST_DIR			?= /usr/local
 LIB_DIR				= $(BOOST_LIB_DIR)
 INC_DIR				= $(BOOST_INC_DIR)
-BIN_DIR				= $(DEST_DIR)/bin
-MAN_DIR				= $(DEST_DIR)/man/man1
+BIN_DIR				= $(DESTDIR)$(DEST_DIR)/bin
+MAN_DIR				= $(DESTDIR)$(DEST_DIR)/share/man/man1
 
-BOOST_LIBS			= thread filesystem program_options iostreams system
-LIBS				= $(BOOST_LIBS:%=boost_%$(BOOST_LIB_SUFFIX)) z bz2
+BOOST_LIBS			= thread program_options iostreams system
+LIBS				= $(BOOST_LIBS:%=boost_%$(BOOST_LIB_SUFFIX))
 
 DEFINES				= USE_COMPRESSION LINUX VERSION='"$(VERSION)"'
 CXX					= g++
@@ -49,22 +47,19 @@
 OBJECTS = $(OBJ_DIR)/mkdssp.o $(OBJ_DIR)/dssp.o $(OBJ_DIR)/primitives-3d.o $(OBJ_DIR)/structure.o $(OBJ_DIR)/utils.o $(OBJ_DIR)/mas.o $(OBJ_DIR)/iocif.o
 
 mkdssp: $(OBJECTS)
-	@ echo linking $@
-	@ $(CXX) -static -o $@ $^ $(LDOPTS)
+	$(CXX) -o $@ $^ $(LDOPTS)
 
-include $(OBJECTS:%.o=%.d)
+-include $(OBJECTS:%.o=%.d)
 
 $(OBJECTS:.o=.d):
 
 $(OBJ_DIR):
-	@ mkdir -p $(OBJ_DIR)
+	mkdir -p $(OBJ_DIR)
 
 $(OBJ_DIR)/%.o: %.cpp | $(OBJ_DIR)
-	@ echo compiling $@
-	@ $(CXX) -MD -c -o $@ $< $(CFLAGS)
+	$(CXX) -MD -c -o $@ $< $(CPPFLAGS) $(CFLAGS)
 
 clean:
-	install -d $(BIN_DIR) $(MAN_DIR)
 	rm -rf $(OBJ_DIR)/* mkdssp
 
 install: mkdssp
@@ -85,11 +80,3 @@
 	@ cp doc/mkdssp.1 $(DIST_NAME)/doc/mkdssp.1
 	tar czf $(DIST_NAME).tgz $(DIST_NAME)
 	cp $(DIST_NAME).tgz dssp_$(VERSION).orig.tar.gz
-
-make.config:
-	@echo "creating empty make.config file"
-	@echo "# Set local options for make here" > make.config
-	@echo "#BOOST_LIB_SUFFIX = -mt" >> make.config
-	@echo "#BOOST_LIB_DIR    = $(HOME)/projects/boost/lib" >> make.config
-	@echo "#BOOST_INC_DIR    = $(HOME)/projects/boost/include" >> make.config
-