File: Makefile

package info (click to toggle)
openvas-libraries 2.0.4-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 2,720 kB
  • ctags: 1,334
  • sloc: ansic: 12,441; sh: 8,238; makefile: 325
file content (122 lines) | stat: -rw-r--r-- 5,710 bytes parent folder | download
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# OpenVAS
# $Id$
# Description: Overall Makefile for OpenVAS-libraries.
#
# Authors:
# Renaud Deraison <deraison@nessus.org> (Original pre-fork development)
#
# Copyright:
# Based on work Copyright (C) 1998 - 2007 Tenable Network Security, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2,
# as published by the Free Software Foundation

include openvas-libraries.tmpl

ALLDEPS = openvas-libraries.tmpl

all: $(ALLDEPS)
	cd libopenvas && ${MAKE}
	cd libopenvas_hg && ${MAKE}

openvas-libraries.tmpl: openvas-libraries.tmpl.in configure VERSION
	$(SHELL) configure $(CONFIGURE_ARGS)
	touch $@

install : all
	test -d $(DESTDIR)${prefix} || ${INSTALL_DIR} -m 755 $(DESTDIR)${prefix}
	test -d $(DESTDIR)${includedir}/openvas || ${INSTALL_DIR} -m 755 $(DESTDIR)${includedir}/openvas
	cd libopenvas && ${MAKE} install
	cd libopenvas_hg && ${MAKE} install


	$(INSTALL) -m 0444 include/libopenvas.h $(DESTDIR)${includedir}/openvas
	$(INSTALL) -m 0444 include/libvers.h   $(DESTDIR)${includedir}/openvas
	$(INSTALL) -m 0444 libopenvas/arglists.h $(DESTDIR)${includedir}/openvas
	$(INSTALL) -m 0444 libopenvas/bpf_share.h $(DESTDIR)${includedir}/openvas
	$(INSTALL) -m 0444 libopenvas/ftp_funcs.h $(DESTDIR)${includedir}/openvas
	$(INSTALL) -m 0444 libopenvas/hash_table_file.h $(DESTDIR)${includedir}/openvas
	$(INSTALL) -m 0444 libopenvas/harglists.h $(DESTDIR)${includedir}/openvas
	$(INSTALL) -m 0444 libopenvas/kb.h $(DESTDIR)${includedir}/openvas
	$(INSTALL) -m 0444 libopenvas/network.h $(DESTDIR)${includedir}/openvas
	$(INSTALL) -m 0444 libopenvas/ntp.h $(DESTDIR)${includedir}/openvas
	$(INSTALL) -m 0444 libopenvas/pcap_openvas.h $(DESTDIR)${includedir}/openvas
	$(INSTALL) -m 0444 libopenvas/plugutils.h $(DESTDIR)${includedir}/openvas
	$(INSTALL) -m 0444 libopenvas/popen.h $(DESTDIR)${includedir}/openvas
	$(INSTALL) -m 0444 libopenvas/proctitle.h $(DESTDIR)${includedir}/openvas
	$(INSTALL) -m 0444 libopenvas/rand.h $(DESTDIR)${includedir}/openvas
	$(INSTALL) -m 0444 libopenvas/resolve.h $(DESTDIR)${includedir}/openvas
	$(INSTALL) -m 0444 libopenvas/openvas_ssh_login.h $(DESTDIR)${includedir}/openvas
	$(INSTALL) -m 0444 libopenvas/openvas_logging.h $(DESTDIR)${includedir}/openvas
	$(INSTALL) -m 0444 libopenvas/openvas_server.h $(DESTDIR)${includedir}/openvas
	$(INSTALL) -m 0444 libopenvas/openvas_auth.h $(DESTDIR)${includedir}/openvas
	$(INSTALL) -m 0444 libopenvas/scanners_utils.h $(DESTDIR)${includedir}/openvas
	$(INSTALL) -m 0444 libopenvas/services1.h $(DESTDIR)${includedir}/openvas
	$(INSTALL) -m 0444 libopenvas/share_fd.h $(DESTDIR)${includedir}/openvas
	$(INSTALL) -m 0444 libopenvas/store.h $(DESTDIR)${includedir}/openvas
	$(INSTALL) -m 0444 libopenvas/system.h $(DESTDIR)${includedir}/openvas
	$(INSTALL) -m 0444 libopenvas/www_funcs.h $(DESTDIR)${includedir}/openvas
	$(INSTALL) -m 0444 libopenvascommon/nvti.h $(DESTDIR)${includedir}/openvas
	$(INSTALL) -m 0444 libopenvascommon/certificate.h $(DESTDIR)${includedir}/openvas
	test -d $(DESTDIR)${bindir} || ${INSTALL_DIR} -m 755 $(DESTDIR)${bindir}
	$(INSTALL) -m 0755 libopenvas-config $(DESTDIR)${bindir}/libopenvas-config
	test -d $(DESTDIR)${mandir} || ${INSTALL_DIR} -m 755 $(DESTDIR)${mandir}
	test -d $(DESTDIR)${mandir}/man1 || ${INSTALL_DIR} -m 755 $(DESTDIR)${mandir}/man1
	$(INSTALL) -m 0644 libopenvas-config.1 $(DESTDIR)${mandir}/man1

	@echo
	@echo ' --------------------------------------------------------------'
	@echo ' openvas-libraries has been sucessfully installed. '
	@echo " Make sure that $(DESTDIR)$(bindir) is in your PATH before you"
	@echo " continue "
	@if [ -f /etc/ld.so.conf ]; then echo " Be sure to add $(DESTDIR)$(libdir) in /etc/ld.so.conf and type 'ldconfig'"; else echo ""; fi
	@echo ' --------------------------------------------------------------'
	@echo

clean :
	-cd libopenvas && ${MAKE} clean
	-cd libopenvas_hg && ${MAKE} clean
	rm -rf doc/generated

distclean : clean
	rm -f ${rootdir}/include/config.h libtool config.cache \
	config.status config.log ${rootdir}/include/libvers.h 
	-cd libopenvas && ${MAKE} distclean
	-cd libopenvas_hg && ${MAKE} distclean
	rm -f openvas-libraries.tmpl libopenvas-config libopenvas-config.pre
	rm -rf doc/generated

dist:
	version="`cat VERSION`"; \
	rm -rf openvas-libraries-$${version}* ; \
	mkdir openvas-libraries-$${version} ; \
	tar cf openvas-libraries-$${version}/x.tar `cat MANIFEST`; \
	( cd openvas-libraries-$${version} ; tar xf x.tar ; rm -f x.tar ) ; \
	tar cf openvas-libraries-$${version}.tar openvas-libraries-$${version} ; \
	gzip -9 openvas-libraries-$${version}.tar

# Generates basic code documentation (placed in doc/generated)
doc:
	doxygen doc/Doxyfile

# Generates more extensive code documentation with graphs 
# (placed in doc/generated) and builds doc/generated/latex/refman.pdf
doc-full:
	doxygen doc/Doxyfile_full
	if [ -d doc/generated/latex ]; then make -C doc/generated/latex; fi

.PHONY: doc doc-full