######################################################################
# Copyright (C) 1998  Andrey V. Savochkin <saw@msu.ru>
#
# Makefile for libpniam - the core of PNIAM package.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the LGPL.  See COPYING file for details.
#
# $Id: Makefile,v 1.5 1999/01/14 08:25:23 saw Rel $
#
######################################################################

######################################################################
# Tunable part

HPATH = ../include
COPTFLAGS = -g -O2

######################################################################
# Fixed part

.EXPORT_ALL_VARIABLES:

SRCS = $(wildcard *.c)
OBJS = $(SRCS:.c=.o)

all: libpniam.so

include .depend

%.o: %.c
	gcc -c -o $(@) $(CFLAGS) $(COPTFLAGS) -I$(HPATH) $(<)

libpniam.so: $(OBJS)
	gcc -shared -o $(@) $(SONAMEFLAGS) $(^) -ldl

.depend:
	gcc -M $(CFLAGS) -I$(HPATH) $(SRCS) >$(@)

dep:

clean:
	rm -f .depend *.o libpniam.{a,so} *.bak

.PHONY: all clean dep
