source: protocols/Makefile @ 07874be

Last change on this file since 07874be was daae10f, checked in by Wilmer van der Gaast <wilmer@…>, at 2010-08-07T16:33:02Z

OpenSolaris (non-gcc) fixes, patches from Dagobert Michelsen <dam@…>
with some changes.

  • Property mode set to 100644
File size: 1.2 KB
RevLine 
[b7d3cc34]1###########################
2## Makefile for BitlBee  ##
3##                       ##
4## Copyright 2002 Lintux ##
5###########################
6
7### DEFINITIONS
8
9-include ../Makefile.settings
[f60079b]10ifdef SRCDIR
11SRCDIR := $(SRCDIR)protocols/
12endif
[b7d3cc34]13
14# [SH] Program variables
[aea8b68]15objects = account.o bee.o bee_chat.o bee_ft.o bee_user.o nogaim.o
[3ddb7477]16
[b7d3cc34]17
18# [SH] The next two lines should contain the directory name (in $(subdirs))
19#      and the name of the object file, which should be linked into
20#      protocols.o (in $(subdirobjs)). These need to be in order, i.e. the
21#      first object file should be in the first directory.
22subdirs = $(PROTOCOLS)
23subdirobjs = $(PROTOOBJS)
24
25# Expansion of variables
26subdirobjs := $(join $(subdirs),$(addprefix /,$(subdirobjs)))
27LFLAGS += -r
28
29# [SH] Phony targets
30all: protocols.o
[66b9e86e]31check: all
[fc5cf88]32lcov: check
[66b9e86e]33gcov:
34        gcov *.c
[b7d3cc34]35
36.PHONY: all clean distclean $(subdirs)
37
38clean: $(subdirs)
39        rm -f *.o $(OUTFILE) core
40
41distclean: clean $(subdirs)
42
43$(subdirs):
44        @$(MAKE) -C $@ $(MAKECMDGOALS)
45
46### MAIN PROGRAM
47
48protocols.o: $(objects) $(subdirs)
49        @echo '*' Linking protocols.o
50        @$(LD) $(LFLAGS) $(objects) $(subdirobjs) -o protocols.o
51
52$(objects): ../Makefile.settings Makefile
53
[f60079b]54$(objects): %.o: $(SRCDIR)%.c
[b7d3cc34]55        @echo '*' Compiling $<
56        @$(CC) -c $(CFLAGS) $< -o $@
Note: See TracBrowser for help on using the repository browser.