Changeset 0b9daac for Makefile


Ignore:
Timestamp:
2015-02-20T23:16:08Z (9 years ago)
Author:
dequis <dx@…>
Parents:
5ebff60
git-author:
dequis <dx@…> (27-12-14 04:06:45)
git-committer:
dequis <dx@…> (20-02-15 23:16:08)
Message:

Reorganize include files to avoid conflicts with other libs

  • Change all header includes to be relative to the project root
  • Remove -I${includedir} from bitlbee.pc Cflags
  • Install lib and protocols headers to their own directories. So now it is:

/usr/include/bitlbee/*.h
/usr/include/bitlbee/lib/*.h
/usr/include/bitlbee/protocols/*.h

This breaks backwards compatibility of third party plugins, but now
they don't have to do ambiguous includes like #include <proxy.h>

This also fixes trac ticket 1170 - conflicts when libproxy and liboauth
are installed at the same time bitlbee is built, which the macports
project ran into several times.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r5ebff60 r0b9daac  
    1111# Program variables
    1212objects = bitlbee.o dcc.o help.o ipc.o irc.o irc_im.o irc_channel.o irc_commands.o irc_send.o irc_user.o irc_util.o nick.o $(OTR_BI) query.o root_commands.o set.o storage.o $(STORAGE_OBJS) unix.o conf.o log.o
    13 headers = $(wildcard $(_SRCDIR_)*.h $(_SRCDIR_)lib/*.h $(_SRCDIR_)protocols/*.h)
     13headers = $(foreach dir,./ ./lib/ ./protocols/,$(patsubst $(_SRCDIR_)%,%,$(wildcard $(_SRCDIR_)$(dir)*.h)))
    1414subdirs = lib protocols
    1515
     
    9292
    9393install-dev:
    94         mkdir -p $(DESTDIR)$(INCLUDEDIR)
     94        mkdir -p $(DESTDIR)$(INCLUDEDIR) $(DESTDIR)$(INCLUDEDIR)lib $(DESTDIR)$(INCLUDEDIR)protocols
    9595        $(INSTALL) -m 0644 config.h $(DESTDIR)$(INCLUDEDIR)
    96         for i in $(headers); do $(INSTALL) -m 0644 $$i $(DESTDIR)$(INCLUDEDIR); done
     96        for i in $(headers); do $(INSTALL) -m 0644 $(_SRCDIR_)$$i $(DESTDIR)$(INCLUDEDIR)$$i; done
    9797        mkdir -p $(DESTDIR)$(PCDIR)
    9898        $(INSTALL) -m 0644 bitlbee.pc $(DESTDIR)$(PCDIR)
    9999
    100100uninstall-dev:
    101         rm -f $(foreach hdr,$(headers),$(DESTDIR)$(INCLUDEDIR)/$(hdr))
    102         -rmdir $(DESTDIR)$(INCLUDEDIR)
     101        rm -f $(foreach hdr,$(headers),$(DESTDIR)$(INCLUDEDIR)$(hdr))
     102        -rmdir $(DESTDIR)$(INCLUDEDIR)lib $(DESTDIR)$(INCLUDEDIR)protocols $(DESTDIR)$(INCLUDEDIR)
    103103        rm -f $(DESTDIR)$(PCDIR)/bitlbee.pc
    104104
Note: See TracChangeset for help on using the changeset viewer.