#**********************************************************************
# Copyright (c) 2000, 2004 IBM Corporation and others.
# All rights reserved. This program and the accompanying materials 
# are made available under the terms of the Common Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/cpl-v10.html
#********************************************************************** 
#
# Makefile for creating core auto-refresh library

# Define the installation directories for various products.
# Your system may have these in a different place.
IVE_HOME   = /home/johna/sun142/

JAVA_JNI=$(IVE_HOME)/include

CC = gcc
LD = ld

FAM_CFLAGS = `pkg-config --cflags glib-2.0`
FAM_LIBS = -lfam `pkg-config --libs glib-2.0`

#
#  Target Rules
#

all: make_refresh

make_refresh: librefresh.so

# All about Linking

librefresh.so: refresh.o
	$(LD) -x -shared -o librefresh.so refresh.o $(FAM_LIBS)

# All about Compiling

CFLAGS = -c -O -s -DLINUX -fpic -fPIC -I$(JAVA_JNI) -I/usr/lib/j2sdk1.3/include/linux $(FAM_CFLAGS) -Wall

refresh.o: LinuxNatives.c LinuxNatives.h
	$(CC) -o refresh.o $(CFLAGS) LinuxNatives.c

clean:
	rm -f *.o *.so
