NSIS-ka
A free C++ implementation of NSIS protocols

source: ntlp/branches/20080714-mobility/Makefile @ 4560

Last change on this file since 4560 was 3184, checked in by hiwi-laier, 9 years ago

Properly merge r3086
The previous merge should have been r3085:HEAD, obviously

  • Property svn:keywords set to Id Rev HeadURL
File size: 4.7 KB
Line 
1# -----------------------------------*- mode: Makefile; -*--
2# Makefile - Top-level Makefile for GISTka
3# ----------------------------------------------------------
4# $Id: Makefile 3184 2008-07-13 23:27:46Z bless $
5# $HeadURL: ntlp/branches/20080714-mobility/Makefile $
6# ==========================================================
7#
8# Makefile arguments:
9# (for protlib)
10# SCTP_KERN=1    - compile with SCTP support
11# backwards compatibility
12# USE_RFC2292=1  - use if glibc does not support RFC3542 yet (e.g., inet6_opt_init())
13#                     
14# Copyright (C) 2005-2007, all rights reserved by
15# - Institute of Telematics, Universitaet Karlsruhe (TH)
16#
17# More information and contact:
18# https://projekte.tm.uka.de/trac/NSIS
19#                     
20# This program is free software; you can redistribute it and/or modify
21# it under the terms of the GNU General Public License as published by
22# the Free Software Foundation; version 2 of the License
23#
24# This program is distributed in the hope that it will be useful,
25# but WITHOUT ANY WARRANTY; without even the implied warranty of
26# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
27# GNU General Public License for more details.
28#
29# You should have received a copy of the GNU General Public License along
30# with this program; if not, write to the Free Software Foundation, Inc.,
31# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
32#
33# ===========================================================
34
35
36
37GIST_SRC=src
38GIST_INC=include
39
40DISTDIR?=$(CURDIR)/..
41TOPLEVELMAKEINC=$(DISTDIR)/Makefile.inc
42
43include $(TOPLEVELMAKEINC)
44
45TEST_SRC        = test
46
47# sub directories that have their own Makefiles
48MKSUBDIRS       = $(GIST_SRC) $(PROTLIB_SRC) $(FQUEUE_SRC) $(TEST_SRC)
49.PHONY:         subdirs $(MKSUBDIRS)
50
51
52# what to include in the tarball
53-include        GIST-KA-RELEASE
54DISTARCHIVE     = gist-ka-$(GIST_RELEASE).tar.gz
55DISTDIRNAME     = gist-ka-$(GIST_RELEASE)
56DISTFILES       = $(GIST_INC) $(GIST_SRC) $(PROTLIB_DIR) $(TEST_SRC) \
57                  scripts Doxygen.conf flush gist gist-debug gist.conf intercept loadmodules Makefile README
58DISTEXCL        = --exclude .svn --exclude */.svn --exclude */*/.svn --exclude testing
59
60TAGSFILES       = $(wildcard $(GIST_INC)/*.h) $(wildcard $(PROTLIB_INC)/*.h) $(wildcard $(FQUEUE_INC)/*.h) $(wildcard $(GIST_SRC)/*.h) $(wildcard $(GIST_SRC)/pdu/*.h) \
61                  $(wildcard $(GIST_SRC)/*.cpp) $(wildcard $(GIST_SRC)/pdu/*.cpp) $(wildcard $(PROTLIB_SRC)/*.cpp) $(wildcard $(FQUEUE_SRC)/*.c)
62
63
64all: gist
65
66.PHONY: clean distclean cleandocs docs all gist localclean setperms TAGS tags \
67        libs test freshdepend depend ebrowse prependheader svnprops showfiles
68
69gist:
70        $(MAKE) -C $(GIST_SRC) -$(MAKEFLAGS)
71
72setperms:
73        $(MAKE) -C $(GIST_SRC) -$(MAKEFLAGS) setperms
74
75libs:
76        $(MAKE) -C $(GIST_SRC) -$(MAKEFLAGS) libs
77
78test: gist
79        $(MAKE) -C $@ -$(MAKEFLAGS) test
80
81tests:
82        for dir in $(MKSUBDIRS); do $(MAKE) -C $$dir -$(MAKEFLAGS) tests ; done
83
84docs:
85        - rm -f doxygen.log
86        - doxygen Doxygen.conf
87
88svnprops:
89        - for file in $(TAGSFILES); do svn propset svn:keywords "Id HeadURL Rev" $$file ; done
90
91prependheader:
92        - for file in $(TAGSFILES); do sed -e "s/%filename%/$${file##*/}/" src/headercomment-template.txt | cat - $$file >$$file.new; mv $$file.new $$file  ; done 
93
94showfiles:
95        - @echo $(TAGSFILES)
96
97cleandocs:
98        - rm -rf doc/
99
100localclean:
101        - rm -f *~ *.log TAGS BROWSE depend README
102
103clean: localclean
104        for dir in $(MKSUBDIRS); do $(MAKE) -C $$dir -$(MAKEFLAGS) clean ; done
105
106distclean: clean localclean cleandocs
107        - for dir in $(MKSUBDIRS); do $(MAKE) -C $$dir -$(MAKEFLAGS) distclean ; done
108
109distrib: distclean README
110        - rm -rf $(DISTDIRNAME); mkdir $(DISTDIRNAME)
111        - tar $(DISTEXCL) -cf - $(DISTFILES) | tar -C $(DISTDIRNAME) -xf - && tar -czvf $(DISTARCHIVE) $(DISTDIRNAME)
112
113releasetag:
114        SVNPROTLIB_URL=`svn info ${PROTLIB_DIR} | grep ^URL: | sed -e 's/URL: //'`; \
115        SVNPROTLIB_TAGS_URL=`echo $$SVNPROTLIB_URL | sed -e 's/trunk$$/tags/'`; \
116        SVNGIST_URL=`svn info | grep ^URL: | sed -e 's/URL: //'`; \
117        SVNGIST_TAGS_URL=`echo $$SVNGIST_URL | sed -e 's/trunk$$/tags/'`; \
118        svn cp -m "tag for release ${GIST_RELEASE}" $$SVNPROTLIB_URL $$SVNPROTLIB_TAGS_URL/releases/gist-ka-${GIST_RELEASE}; \
119        svn cp -m "tag for release ${GIST_RELEASE}" $$SVNGIST_URL $$SVNGIST_TAGS_URL/releases/gist-ka-${GIST_RELEASE}
120
121
122README: README.src
123        @sed -e "s/%GIST_RELEASE%/${GIST_RELEASE}/" $^ >$@
124
125tags: TAGS ebrowse
126
127TAGS:   
128        -@echo -n "Creating TAGS file..."
129        -@etags  --language-force=C++ $(TAGSFILES)
130        -@echo "done."
131
132ebrowse:
133        -@echo -n "Creating BROWSE file..."
134        - @ebrowse $(TAGSFILES)
135        -@echo "done."
136
137depend:
138        - for dir in $(MKSUBDIRS); do $(MAKE) -C $$dir -$(MAKEFLAGS) depend ; done
139
140freshdepend:
141        - for dir in $(MKSUBDIRS); do $(MAKE) -C $$dir -$(MAKEFLAGS) freshdepend ; done
142
143$(TOPLEVELMAKEINC):
144        $(error "Sorry, but this component is not meant to be compiled alone, please use the dist tree of the SVN https://svn.ipv6.tm.uka.de/nsis/dist/")
145
146#end of Makefile
Note: See TracBrowser for help on using the repository browser.