# 
# Copyright (C) 1999, 2000, 2001  Network Associates, Incorporated (NAI)
# All rights reserved.
#
# This file is part of the NAI Generic Software Wrappers Toolkit
# (GSWTK).  See ftp://ftp.tislabs.com/pub/wrappers/ for the latest
# distribution.
#
# The GSWTK is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# The GSWTK is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this software; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
#
# makefile for binpatch test

CC 	= gcc
LD 	= ld

CCFLAGS	= -Wall -Wstrict-prototypes -Winline -Wstrict-prototypes \
	  -D__KERNEL__ -DMODULE -DCPU=686 -pipe \
	  -fomit-frame-pointer -fno-strength-reduce \
	  -malign-loops=2 -malign-jumps=2 -malign-functions=2 -m486 \
	  -I/usr/src/linux/include -g -O2 \
	 
LDFLAGS	= -r

all : test_mod.o

binpatch.h : stub_head stub_tail binpatch.pl
	./binpatch.pl

binpatch.o : binpatch.h binpatch.c
	$(CC) $(CCFLAGS) -c binpatch.c

test_lkm.o : binpatch.h test_lkm.c
	$(CC) $(CCFLAGS) -c test_lkm.c

test_mod.o : binpatch.o test_lkm.o
	$(LD) $(LDFLAGS) -o test_mod.o binpatch.o test_lkm.o



#
# Make clean rule, for convenience...
#

clean :
	rm *.o binpatch.h

