source: lib/Makefile @ 858ea01

Last change on this file since 858ea01 was b0a89cc, checked in by Wilmer van der Gaast <wilmer@…>, at 2010-08-27T08:48:18Z

Use nifty gcc -MD feature to automatically track .h dependencies of all C
files, this finally gives proper dependencies, which means the end of
getting broken binaries around headerfile changes, etc.

Sure, this may not work on obscurux with superawesomeincompatiblecc while
autoconf does, but at least BitlBee's configure script still runs in <1s.
:-)

  • Property mode set to 100644
File size: 861 bytes
RevLine 
[df1694b]1###########################
2## Makefile for BitlBee  ##
3##                       ##
4## Copyright 2006 Lintux ##
5###########################
6
7### DEFINITIONS
8
9-include ../Makefile.settings
[f60079b]10ifdef SRCDIR
11SRCDIR := $(SRCDIR)lib/
12endif
[df1694b]13
14# [SH] Program variables
[ec86b22]15objects = arc.o base64.o $(EVENT_HANDLER) ftutil.o http_client.o ini.o md5.o misc.o oauth.o proxy.o sha1.o $(SSL_CLIENT) url.o xmltree.o
[df1694b]16
17LFLAGS += -r
18
19# [SH] Phony targets
20all: lib.o
[a51be64]21check: all
[fc5cf88]22lcov: check
[a51be64]23gcov:
24        gcov *.c
[2c7df62]25
[df1694b]26.PHONY: all clean distclean
27
28clean: $(subdirs)
29        rm -f *.o $(OUTFILE) core
30
31distclean: clean $(subdirs)
[b0a89cc]32        rm -rf .depend
[df1694b]33
34### MAIN PROGRAM
35
36lib.o: $(objects) $(subdirs)
37        @echo '*' Linking lib.o
38        @$(LD) $(LFLAGS) $(objects) -o lib.o
39
40$(objects): ../Makefile.settings Makefile
41
[f60079b]42$(objects): %.o: $(SRCDIR)%.c
[df1694b]43        @echo '*' Compiling $<
44        @$(CC) -c $(CFLAGS) $< -o $@
[b0a89cc]45
46-include .depend/*.d
Note: See TracBrowser for help on using the repository browser.