# Cygwin/Linux-GCC Makefile
# (C) 2007, Photonfocus AG
#
# $Id: Makefile,v 1.4 2008-12-19 10:16:24 hofmann Exp $
#
# This is the GNU Makefile to compile a user comdll
# to handle the interface with the frame grabber
#
#  Usage:
#
#    make clean              remove the library and object file
#    make all                to create the comdll_fg library
#
############################################################################
# CONFIGURATION

CC = gcc

#This variables should not be changed
DLLCSRCS = comdll_fg.c
INCLUDES = -I. -I/opt/siso/include 
#INCLUDES = -I.
OPTIMIZATIONS = -finline-functions#-O2



############################################################################
#frame grabber settings
#please change this settings for your frame grabber

#for Leutron frame grabber
#FG_DIR = /usr/lib/lvsds 
#DLLDEPS = -L$(FG_DIR) -llvdsy

#for siso grabber
#FG_DIR = /siso/menable/lib
#DLLDEPS = -L$(FG_DIR) -lsiso20 -lclserme3

#FG_DIR = ../siso
#DLLDEPS = -L$(FG_DIR) -lsisoiolibrt -lclserme4

#for euresys grabber
#FG_DIR = /usr/lib
#DLLDEPS = -L$(FG_DIR) -lclseremc1

# for comserver proxy no additional libraries are required
FG_DIR = 
DLLDEPS = 

############################################################################
all:	
	$(CC) -m32 -o comdll_fg.o -c $(DLLCSRCS) $(INCLUDES) $(OPTIMIZATIONS) -Wall -fPIC
	$(CC) -m32 -shared -o libcomdll_fg.so comdll_fg.o -lm $(DLLDEPS) -Wl,-E -static


install:
	cp libcomdll_fg.so ../lib


clean:
	rm -f comdll_fg.o
	rm -f libcomdll_fg.so
