2 # Copyright (C) 2003 Michael Richardson <mcr@freeswan.org>
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>.
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
14 # RCSID $Id: Makefile,v 1.1 2004/03/15 20:35:24 as Exp $
19 include ${FREESWANSRCDIR}/Makefile.inc
20 include ${FREESWANSRCDIR}/Makefile.ver
23 MANDIR
=$(MANTREE
)/man3
25 SRCS
=policyquery.c cgipolicy.c
27 OBJS
=${SRCS
:.c
=.o
} version.o
29 KLIPSD
=${FREESWANSRCDIR}/linux
/include
33 CFLAGS
=-I.
-I
${KLIPSD} -I
${FREESWANSRCDIR} $(USERCOMPILE
)
35 CFLAGS
+= -Wpointer-arith
37 CFLAGS
+= -Wstrict-prototypes
38 CFLAGS
+= -Wbad-function-cast
42 .PHONY
: all install clean l t lt
tar check depend checkprograms
51 $(INSTALL
) $(INSTMANFLAGS
) $(SRCDIR
)/$$f $(MANDIR
)/ipsec_
$$f || exit
1 ; \
53 @
$(FREESWANSRCDIR
)/packaging
/utils
/manlink
$(foreach man
, $(MANS
), ${SRCDIR}/$(man
)) | \
56 ln
-s
-f ipsec_
$$from $(MANDIR
)/$$to; \
63 echo
$(MANDIR
)/ipsec_
$$f;\
65 @
$(FREESWANSRCDIR
)/packaging
/utils
/manlink
$(foreach man
, $(MANS
), ${SRCDIR}/$(man
)) | \
68 echo
$(MANDIR
)/$$to; \
72 $(AR
) $(ARFLAGS
) $(LIB
) $(OBJS
)
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
>$@
81 rm -f
$(LIB
) *.o try
* core
*.core
$(EXTHDRS
) $(EXTLIBS
) version.c
85 tar -cvf
/tmp
/lib.
tar Makefile
[a-z
]*
88 echo no checks in lib right now.
91 makedepend
-Y
-- $(CFLAGS
) -- $(SRCS
)