#
# The output of the make process will be sidplug.so
# Install this file either in
#	/usr/lib/netscape/plugins/
#	(or)
#	~/.netscape/plugins/
#	(or) in any convenient directory and point environment variable
#	     NPX_PLUGIN_PATH to point to the directory. It is advisable
#	     that the plugins (.so) are the only files in that directory.
#
# This makefile contains some of our defines for the compiler:
#
# XP_UNIX	This needs to get defined for npapi.h on unix platforms.
# PLUGIN_TRACE	Enable this define to get debug prints whenever the plugin
#		api gets control.
#		
# WARNING: Motif libraries are built static into the navigator and cannot
#          be accessed from the plugin.
#          

PLUGIN_SDK_PATH = ./PluginSDK30b5
PLUGIN_DEFINES= -DXP_UNIX -I$(PLUGIN_SDK_PATH)/include

CC         = gcc
OPTIMIZER  = -O
CFLAGS     =  $(OPTIMIZER) $(PLUGIN_DEFINES)

SRC= sidplug.c npunix.c 
OBJ= sidplug.o npunix.o

SHAREDTARGET=npsidplug.so

default all: $(SHAREDTARGET)

$(SHAREDTARGET): $(OBJ)
	$(CC) -shared -o $(SHAREDTARGET) $(OBJ) $(LDFLAGS)

npunix.o: npunix.c
	$(CC) -c $(CFLAGS) npunix.c

sidplug.o: sidplug.c
	$(CC) -c $(CFLAGS) sidplug.c

#install:
#	cp -fv sidplug.so /home/ms/.netscape/plugins/npsidplug.so

clean:
	$(RM) $(OBJ) $(SHAREDTARGET)
