# $Id: Makefile.in 137 2018-08-27 01:11:08Z gyunaev $
CC = @CC@
CFLAGS = -Wall -Wno-misleading-indentation -Wno-unused-function -Wno-nonnull -DIN_BUILDING_LIBIRC @CFLAGS@
AR=@AR@ cr
RANLIB=@RANLIB@
INCLUDES=-I../include
DESTDIR=
APIVERSION = 1

OBJS = libircclient.o

all:	@TARGET@

static:	libircclient.a
shared: libircclient.so
shared_mingw: libircclient.dll

install:
	-mkdir -p $(DESTDIR)@prefix@/include
	-mkdir -p $(DESTDIR)@libdir@
	cp ../include/libircclient.h $(DESTDIR)@prefix@/include/libircclient.h
	cp ../include/libirc_errors.h $(DESTDIR)@prefix@/include/libirc_errors.h
	cp ../include/libirc_events.h  $(DESTDIR)@prefix@/include/libirc_events.h 
	cp ../include/libirc_options.h  $(DESTDIR)@prefix@/include/libirc_options.h 
	cp ../include/libirc_rfcnumeric.h  $(DESTDIR)@prefix@/include/libirc_rfcnumeric.h 
	cp libircclient.so $(DESTDIR)@libdir@/libircclient.so.$(APIVERSION)
	ln -fs libircclient.so.$(APIVERSION) $(DESTDIR)@libdir@/libircclient.so

libircclient.so: libircclient.o
	$(CC) -shared -s -Wl,-soname,libircclient.so.$(APIVERSION) -o libircclient.so libircclient.o @LDFLAGS@ @LIBS@

libircclient.dll: libircclient.o
	$(CC) -shared -s -o libircclient.dll -Wl,-out-implib,libircclient.lib libircclient.o libircclient.def -lkernel32 -lwsock32 @LIBS@

libircclient.a: libircclient.o
	$(AR) libircclient.a libircclient.o
	$(RANLIB) libircclient.a

clean:
	rm -f libircclient.a libircclient.o

distclean: clean
	-rm -f Makefile

.c.o:
	$(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
