]> git.ipfire.org Git - people/ms/strongswan.git/blob - src/libfreeswan/libipsecpolicy/Makefile
- fixed stroke error output to starter
[people/ms/strongswan.git] / src / libfreeswan / libipsecpolicy / Makefile
1 # FreeS/WAN library
2 # Copyright (C) 2003 Michael Richardson <mcr@freeswan.org>
3 #
4 # This program is free software; you can redistribute it and/or modify it
5 # under the terms of the GNU General Public License as published by the
6 # Free Software Foundation; either version 2 of the License, or (at your
7 # option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
8 #
9 # This program is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 # for more details.
13 #
14 # RCSID $Id: Makefile,v 1.1 2004/03/15 20:35:24 as Exp $
15
16
17 FREESWANSRCDIR=../..
18
19 include ${FREESWANSRCDIR}/Makefile.inc
20 include ${FREESWANSRCDIR}/Makefile.ver
21
22
23 MANDIR=$(MANTREE)/man3
24
25 SRCS=policyquery.c cgipolicy.c
26
27 OBJS=${SRCS:.c=.o} version.o
28
29 KLIPSD=${FREESWANSRCDIR}/linux/include
30
31 LIB=libipsecpolicy.a
32 # Original flags
33 CFLAGS=-I. -I${KLIPSD} -I${FREESWANSRCDIR} $(USERCOMPILE)
34 CFLAGS+= -Wall
35 CFLAGS+= -Wpointer-arith
36 CFLAGS+= -Wcast-qual
37 CFLAGS+= -Wstrict-prototypes
38 CFLAGS+= -Wbad-function-cast
39
40 MANS=
41
42 .PHONY: all install clean l t lt tar check depend checkprograms
43
44 all: $(LIB)
45 programs: $(LIB)
46
47 install:
48 @mkdir -p $(MANDIR)
49 @for f in $(MANS) ; \
50 do \
51 $(INSTALL) $(INSTMANFLAGS) $(SRCDIR)/$$f $(MANDIR)/ipsec_$$f || exit 1 ; \
52 done
53 @$(FREESWANSRCDIR)/packaging/utils/manlink $(foreach man, $(MANS), ${SRCDIR}/$(man)) | \
54 while read from to; \
55 do \
56 ln -s -f ipsec_$$from $(MANDIR)/$$to; \
57 done
58
59
60 install_file_list:
61 @for f in $(MANS) ; \
62 do \
63 echo $(MANDIR)/ipsec_$$f;\
64 done;
65 @$(FREESWANSRCDIR)/packaging/utils/manlink $(foreach man, $(MANS), ${SRCDIR}/$(man)) | \
66 while read from to; \
67 do \
68 echo $(MANDIR)/$$to; \
69 done
70
71 $(LIB): $(OBJS)
72 $(AR) $(ARFLAGS) $(LIB) $(OBJS)
73
74 $(OBJS): $(HDRS)
75
76 # build version.c using version number from Makefile.ver
77 version.c: version.in.c ${FREESWANSRCDIR}/Makefile.ver
78 sed '/"/s/xxx/$(IPSECVERSION)/' version.in.c >$@
79
80 clean:
81 rm -f $(LIB) *.o try* core *.core $(EXTHDRS) $(EXTLIBS) version.c
82
83
84 tar: clean
85 tar -cvf /tmp/lib.tar Makefile [a-z]*
86
87 check:
88 echo no checks in lib right now.
89
90 depend:
91 makedepend -Y -- $(CFLAGS) -- $(SRCS)
92
93 checkprograms:
94
95 # DO NOT DELETE
96