Makefile revision 069c67de00995814a9a5cefc4fb2b1d0569ffea2
1################################################################################
2##                                                                            ##
3## Copyright (c) International Business Machines  Corp., 2007                 ##
4##                                                                            ##
5## This program is free software;  you can redistribute it and#or modify      ##
6## it under the terms of the GNU General Public License as published by       ##
7## the Free Software Foundation; either version 2 of the License, or          ##
8## (at your option) any later version.                                        ##
9##                                                                            ##
10## This program is distributed in the hope that it will be useful, but        ##
11## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##
12## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License   ##
13## for more details.                                                          ##
14##                                                                            ##
15## You should have received a copy of the GNU General Public License          ##
16## along with this program;  if not, write to the Free Software               ##
17## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA    ##
18##                                                                            ##
19################################################################################
20
21CFLAGS += -Wall
22CPPFLAGS += -I../../../../include -I../libclone
23LDLIBS += -L../../../../lib -L../libclone ../libclone/libclone.a -lltp -lrt
24
25SRCS    := $(wildcard *.c)
26TARGETS := $(SRCS:%.c=%)
27
28HAS_UNSHARE ?= $(shell ../check_for_unshare && echo y)
29ifneq ($(HAS_UNSHARE),y)
30TARGETS :=
31endif
32
33all: $(TARGETS)
34
35clean:
36	rm -f $(TARGETS) *.o
37
38install:
39ifeq ($(HAS_UNSHARE),y)
40	@set -e; for i in $(TARGETS) runpidnstest.sh check_pidns_enabled; do ln -f $$i ../../../bin/$$i ; chmod +x runpidnstest.sh ; done
41endif
42