1 # 2 # commands/ade/ldd/datafiles testcases Makefile. 3 # 4 # Copyright (C) 2014, Linux Test Project. 5 # 6 # This program is free software; you can redistribute it and/or modify 7 # it under the terms of the GNU General Public License as published by 8 # the Free Software Foundation; either version 2 of the License, or 9 # (at your option) any later version. 10 # 11 # This program is distributed in the hope that it will be useful, 12 # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 # GNU General Public License for more details. 15 16 top_srcdir ?= ../../../.. 17 18 include $(top_srcdir)/include/mk/env_pre.mk 19 20 CPPFLAGS += -fpic 21 22 INSTALL_TARGETS := ldd*.so lddfile.out 23 24 LDD_C_FILES := $(wildcard $(abs_srcdir)/lddfile*.c) 25 LDD_SO_FILES := $(patsubst $(abs_srcdir)/%.c,%.obj.so,$(LDD_C_FILES)) 26 MAKE_TARGETS := lddfile.out 27 CLEAN_TARGETS += *.obj $(LDD_SO_FILES) 28 29 %.obj.so: %.o 30 $(CC) $(CFLAGS) -shared -o $@ $^ 31 32 lddfile.out: main.o $(LDD_SO_FILES) 33 $(CC) $(CFLAGS) -O -o $@ $? 34 35 INSTALL_DIR := testcases/data/ldd01 36 37 include $(top_srcdir)/include/mk/generic_leaf_target.mk 38