# Makefile for ctrlproxy
-# Copyright (C) 2002-2008 Jelmer Vernooij <jelmer@samba.org>
+# Copyright (C) 2002-2009 Jelmer Vernooij <jelmer@samba.org>
# NOTE: This file is *NOT* autogenerated.
include Makefile.settings
doxygen:
doxygen
-lib_objs = \
- lib/state.o \
- lib/client.o \
- lib/transport.o \
- lib/line.o \
- lib/isupport.o \
- lib/connection.o \
- lib/url.o \
- lib/util.o \
- lib/listener.o
+libircdir = libirc
objs = src/posix.o \
src/cache.o \
src/network.o \
$(SSL_OBJS)
-lib_headers = \
- lib/state.h \
- lib/client.h \
- lib/line.h \
- lib/isupport.h \
- lib/irc.h \
- lib/connection.h \
- lib/url.h \
- lib/listener.h \
- lib/util.h
+libirc_objs = \
+ $(libircdir)/state.o \
+ $(libircdir)/client.o \
+ $(libircdir)/transport.o \
+ $(libircdir)/line.o \
+ $(libircdir)/isupport.o \
+ $(libircdir)/connection.o \
+ $(libircdir)/url.o \
+ $(libircdir)/util.o \
+ $(libircdir)/listener.o
+
+libirc_headers = \
+ $(libircdir)/state.h \
+ $(libircdir)/client.h \
+ $(libircdir)/line.h \
+ $(libircdir)/isupport.h \
+ $(libircdir)/irc.h \
+ $(libircdir)/connection.h \
+ $(libircdir)/url.h \
+ $(libircdir)/listener.h \
+ $(libircdir)/util.h
headers = src/admin.h \
src/ctcp.h \
%.o: %.c
@echo Compiling $<
- @$(CC) -I. -Ilib -Isrc $(CFLAGS) $(GCOV_CFLAGS) -c $< -o $@
+ @$(CC) -I. -I$(libircdir) -Isrc $(CFLAGS) $(GCOV_CFLAGS) -c $< -o $@
%.d: %.c config.h
- @$(CC) -I. -Ilib -Isrc -M -MT $(<:.c=.o) $(CFLAGS) $< -o $@
+ @$(CC) -I. -I$(libircdir) -Isrc -M -MT $(<:.c=.o) $(CFLAGS) $< -o $@
# This looks a bit weird but is here to ensure that we never try to
# run ./autogen.sh outside of bzr checkouts
$(INSTALL) $(SBINS) $(DESTDIR)$(sbindir)
uninstall-header:
- -rm -f $(patsubst %,$(DESTDIR)$(destincludedir)/%,$(notdir $(headers) $(lib_headers)))
+ -rm -f $(patsubst %,$(DESTDIR)$(destincludedir)/%,$(notdir $(headers) $(libirc_headers)))
-rmdir $(DESTDIR)$(destincludedir)
install-header::
$(INSTALL) -d $(DESTDIR)$(destincludedir)
- $(INSTALL) -m 0644 $(lib_headers) $(headers) $(DESTDIR)$(destincludedir)
+ $(INSTALL) -m 0644 $(libirc_headers) $(headers) $(DESTDIR)$(destincludedir)
doc::
$(MAKE) -C doc PACKAGE_VERSION=$(PACKAGE_VERSION)
lcov --base-directory `pwd` --directory . --capture --output-file ctrlproxy.info
genhtml -o coverage ctrlproxy.info
-$(LIBIRC_STATIC): $(lib_objs)
+$(LIBIRC_STATIC): $(libirc_objs)
@echo Linking $@
@ar -rcs $@ $^
-$(LIBIRC_SHARED): $(lib_objs)
+$(LIBIRC_SHARED): $(libirc_objs)
$(LD) -shared $(LDFLAGS) -Wl,-soname,$(LIBIRC_SONAME) -o $@ $^
cscope.out::
@echo Removing dependency files
@rm -f $(dep_files)
@echo Removing object files and executables
- @rm -f src/*.o lib/*.o daemon/*.o testsuite/check ctrlproxy$(EXEEXT) testsuite/*.o *~
+ @rm -f src/*.o $(libircdir)/*.o daemon/*.o testsuite/check ctrlproxy$(EXEEXT) testsuite/*.o *~
@rm -f linestack-cmd$(EXEEXT) ctrlproxy-admin$(EXEEXT)
@rm -f ctrlproxyd$(EXEEXT)
@rm -f $(LIBIRC_STATIC) $(LIBIRC_SHARED)
examples:: example/libfoo.$(SHLIBEXT) example/libirc-simple
example/libfoo.$(SHLIBEXT): example/foo.o
-example/foo.o: CFLAGS+=-Ilib
+example/foo.o: CFLAGS+=-I$(libircdir)
example/libirc-simple: example/irc_simple.o $(LIBIRC)
$(CC) -o $@ $^
-example/irc_simple.o: CFLAGS+=-Ilib
+example/irc_simple.o: CFLAGS+=-I$(libircdir)
-include $(dep_files)