All pastes #213841 Raw Edit

Mine

public text v1 · immutable
#213841 ·published 2006-10-21 17:37 UTC
rendered paste body
bash-3.00# nl Makefile
     1  ###########################
     2  ## Makefile for BitlBee  ##
     3  ##                       ##
     4  ## Copyright 2002 Lintux ##
     5  ###########################

     6  ### DEFINITIONS

     7  include Makefile.settings

     8  # Program variables
     9  objects = account.o bitlbee.o commands.o conf.o crypting.o help.o ini.o irc.o log.o nick.o query.o set.o unix.o url.o user.o util.o

    10  subdirs = protocols
    11  # Expansion of variables
    12  subdirobjs = $(foreach dir,$(subdirs),$(dir)/$(dir).o)
    13  CFLAGS += -Wall

    14  all: $(OUTFILE)
    15          $(MAKE) -C doc

    16  uninstall: uninstall-bin uninstall-doc
    17          @echo -e '\nmake uninstall does not remove files in '$(DESTDIR)$(ETCDIR)', you can use make uninstall-etc to do that.\n'

    18  install: install-bin install-doc
    19          @if ! [ -d $(DESTDIR)$(CONFIG) ]; then echo -e '\nThe configuration directory $(DESTDIR)$(CONFIG) does not exist yet, don'\''t forget to create it!'; fi
    20          @if ! [ -e $(DESTDIR)$(ETCDIR)/bitlbee.conf ]; then echo -e '\nNo files are installed in '$(DESTDIR)$(ETCDIR)' by make install. Run make install-etc to do that.'; fi
    21          @echo

    22  .PHONY:   install   install-bin   install-etc   install-doc \
    23          uninstall uninstall-bin uninstall-etc uninstall-doc \
    24          all clean distclean tar $(subdirs)

    25  Makefile.settings:
    26          @echo
    27          @echo Run ./configure to create Makefile.settings, then rerun make
    28          @echo

    29  clean: $(subdirs)
    30          rm -f *.o $(OUTFILE) core utils/bitlbeed encode decode

    31  distclean: clean $(subdirs)
    32          rm -f Makefile.settings config.h
    33          find . -name 'DEADJOE' -o -name '*.orig' -o -name '*.rej' -o -name '*~' -exec rm -f {} \;

    34  install-doc:
    35          $(MAKE) -C doc install

    36  uninstall-doc:
    37          $(MAKE) -C doc uninstall

    38  install-bin:
    39          mkdir -p $(DESTDIR)$(BINDIR)
    40          install -m 0755 $(OUTFILE) $(DESTDIR)$(BINDIR)/$(OUTFILE)

    41  uninstall-bin:
    42          rm -f $(DESTDIR)$(BINDIR)/$(OUTFILE)

    43  install-etc:
    44          mkdir -p $(DESTDIR)$(ETCDIR)
    45          install -m 0644 motd.txt $(DESTDIR)$(ETCDIR)/motd.txt
    46          install -m 0644 bitlbee.conf $(DESTDIR)$(ETCDIR)/bitlbee.conf

    47  uninstall-etc:
    48          rm -f $(DESTDIR)$(ETCDIR)/motd.txt
    49          rm -f $(DESTDIR)$(ETCDIR)/bitlbee.conf
    50          -rmdir $(DESTDIR)$(ETCDIR)

    51  tar:
    52          fakeroot debian/rules clean || make distclean
    53          x=$$(basename $$(pwd)); \
    54          cd ..; \
    55          tar czf $$x.tar.gz --exclude=debian --exclude=.bzr $$x

    56  $(subdirs):
    57          @$(MAKE) -C $@ $(MAKECMDGOALS)

    58  $(objects): %.o: %.c
    59          @echo '*' Compiling $<
    60          @$(CC) -c $(CFLAGS) $< -o $@

    61  $(objects): Makefile Makefile.settings config.h

    62  $(OUTFILE): $(objects) $(subdirs)
    63          @echo '*' Linking $(OUTFILE)
    64          @$(CC) $(objects) $(subdirobjs) -o $(OUTFILE) $(LFLAGS) $(EFLAGS)
    65  ifndef DEBUG
    66          @echo '*' Stripping $(OUTFILE)
    67          @-$(STRIP) $(OUTFILE)
    68  endif

    69  encode: crypting.c
    70          $(CC) crypting.c protocols/md5.c $(CFLAGS) -o encode -DCRYPTING_MAIN $(CFLAGS) $(EFLAGS) $(LFLAGS)

    71  decode: encode
    72          cp encode decode

    73  ctags:
    74          ctags `find . -name "*.c"` `find . -name "*.h"`
bash-3.00#