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 16top_srcdir ?= ../../../.. 17 18include $(top_srcdir)/include/mk/env_pre.mk 19 20CPPFLAGS += -fpic 21 22INSTALL_TARGETS := ldd*.so lddfile.out 23 24LDD_C_FILES := $(sort $(wildcard $(abs_srcdir)/lddfile*.c)) 25LDD_SO_FILES := $(patsubst $(abs_srcdir)/%.c,%.obj.so,$(LDD_C_FILES)) 26MAKE_TARGETS := lddfile.out 27CLEAN_TARGETS += *.obj $(LDD_SO_FILES) 28 29%.obj.so: %.o 30 $(CC) $(CFLAGS) -shared -o $@ $^ 31 32lddfile.out: main.o $(LDD_SO_FILES) 33 $(CC) $(CFLAGS) -O -o $@ $? 34 35INSTALL_DIR := testcases/data/ldd01 36 37include $(top_srcdir)/include/mk/generic_leaf_target.mk 38