Makefile revision ef77253961f909f87e82e6d2b620e87af33e9665
1# 2# Copyright (c) Wipro Technologies Ltd, 2002. All Rights Reserved. 3# 4# This program is free software; you can redistribute it and/or modify it 5# under the terms of version 2 of the GNU General Public License as 6# published by the Free Software Foundation. 7# 8# This program is distributed in the hope that it would be useful, but 9# WITHOUT ANY WARRANTY; without even the implied warranty of 10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 11# 12# You should have received a copy of the GNU General Public License along 13# with this program; if not, write the Free Software Foundation, Inc., 59 14# Temple Place - Suite 330, Boston MA 02111-1307, USA. 15# 16########################################################################### 17# name of file : Makefile # 18# description : make file for the delete_module(2) testcases # 19########################################################################### 20 21top_srcdir ?= ../../../.. 22 23include $(top_srcdir)/include/mk/testcases.mk 24 25CFLAGS += -D_GNU_SOURCE 26 27LOCALVERSION ?= $(shell uname -r) 28 29MODULEDIR := $(DESTDIR)/lib/modules/$(LOCALVERSION)/build 30 31# KBuild make variables... 32MODCFLAGS += $(MODULEDIR) 33 34export EXTRA_CFLAGS := $(CFLAGS) 35export EXTRA_CPPFLAGS := $(CPPFLAGS) 36export EXTRA_LDFLAGS := $(LDFLAGS) 37 38obj-m := dummy_del_mod.o dummy_del_mod_dep.o 39MODULES := dummy_del_mod.ko dummy_del_mod_dep.ko 40 41# New make infra variables... 42CLEAN_TARGETS := .dummy* *.mod.c .tmp_version *.ko 43INSTALL_TARGETS := $(MODULES) 44MAKE_TARGETS := delete_module01 delete_module02 delete_module03 45 46include $(top_srcdir)/include/mk/generic_leaf_target.mk 47 48$(MAKE_TARGETS): | make-module 49 50# KBuild will gripe because we redefine CFLAGS if KBUILD_NOPEDANTIC isn't set. 51.PHONY: make-module 52make-module: 53 make -C $(MODULEDIR) KBUILD_NOPEDANTIC=1 SUBDIRS=$(abs_srcdir) modules 54