#
# Clp makefile for C interface (Unix/Linux systems).
#

# The Clp library directory
CLPLIB = ../../lib

CC = cc
CFLAGS = -O -c

#Linux
L = -ldl -lpthread -lm
#Solaris 
#L = -ldl -lsocket -lnsl -lm

# The Clp include directory
CLPINCLUDE = ../include

.c.o :; $(CC) $(CFLAGS) -I$(CLPINCLUDE) $*.c

clp_c_test: driverClp.o $(CLPLIB)/libCoin.so $(CLPLIB)/libClp.a
	$(CC) -o clp_c_test driverClp.o $(CLPLIB)/libCoin.so $(CLPLIB)/libClp.a $(L)

# This test the dynamicly loadable clp library
clp_c_test2: driverClp.o $(CLPLIB)/libCoin.so $(CLPLIB)/libClp.so
	$(CC) -o clp_c_test2 driverClp.o $(CLPLIB)/libCoin.so $(CLPLIB)/libClp.so $(L)


clean:
	rm -f *.o *.out clp_c_test

test: clp_c_test 
	./clp_c_test


## shared object library
test2: clp_c_test2
	./clp_c_test2



