# IBM_PROLOG_BEGIN_TAG 
# This is an automatically generated prolog. 
#  
# bos720 src/bos/usr/samples/ahafs/samplePrograms/kextEvProd/Makefile 1.1 
#  
# Licensed Materials - Property of IBM 
#  
# Restricted Materials of IBM 
#  
# COPYRIGHT International Business Machines Corp. 2009 
# All Rights Reserved 
#  
# US Government Users Restricted Rights - Use, duplication or 
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp. 
#  
# IBM_PROLOG_END_TAG 
DEFINES = -DDEBUG -D_KERNEL -D_POWER_MP -D_POWER_64 -D__64BIT_KERNEL
LIST	= -qsource -qlist 
CC	= /usr/vac/bin/cc

IMPORTS1 = /usr/lib/kernex.exp

LIBS    =  -lsys -lcsys 
CFLAGS = $(DEFINES) $(LIBS) $(LIST) -I. -q64
LDFLAGS =  -b64

PROG = testKext

MAIN = init_kext

MAP     = $(PROG).map 

all: kexload testKext triggerEvent

kexload: kexload.c
	$(CC) -o kexload -q64 kexload.c 
	chmod a+rx kexload 

testKext: testKext.o
	/usr/bin/ld -o $(PROG) $(LDFLAGS) testKext.o  -bmap:$(MAP) \
	-bI:$(IMPORTS1) -bE:./testKext_syscalls.exp  $(LIBS) -e $(MAIN)
	chmod a+rx testKext

testKext.o : testKext.c
	$(CC) -c testKext.c $(CFLAGS) -e $(MAIN)

triggerEvent : triggerEvent.c
	$(CC) -o triggerEvent -q64 -bI:./testKext_syscalls.exp triggerEvent.c 
	chmod a+rx triggerEvent 

clean:
	rm -f testKext *.s *.o *.lst *.map  kexload triggerEvent
