Makefile

Mon, 18 Jul 2016 14:58:32 +0200

author
David Demelier <markand@malikania.fr>
date
Mon, 18 Jul 2016 14:58:32 +0200
changeset 0
73a371432d36
child 1
4402b74acda0
permissions
-rw-r--r--

misc: initial import

0
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
1 #
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
2 # Makefile for backlight
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
3 #
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
4 # Copyright (c) 2010-2016 David Demelier <markand@malikania.fr>
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
5 #
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
6 # Permission to use, copy, modify, and distribute this software for any
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
7 # purpose with or without fee is hereby granted, provided that the above
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
8 # copyright notice and this permission notice appear in all copies.
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
9 #
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
10 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
11 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
12 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
13 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
14 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
15 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
16 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
17 #
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
18
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
19 PREFIX= /usr/local/bin
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
20
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
21 CC= gcc
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
22 CFLAGS= -Wall -Wextra -ansi -pedantic -DNDEBUG
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
23
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
24 ECHO= echo
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
25 RM= rm -f
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
26 INSTALL= install -o root -g wheel -m 4755
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
27
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
28 all: backlight
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
29
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
30 main.o: main.c
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
31 @echo CC $<
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
32 @${CC} ${CFLAGS} -c -o $@ $<
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
33
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
34 backlight: main.o
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
35 @echo LD $@
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
36 @${CC} ${CFLAGS} -o $@ $<
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
37
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
38 clean:
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
39 ${RM} *.o backlight
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
40
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
41 install: backlight
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
42 ${INSTALL} $< ${PREFIX}
73a371432d36 misc: initial import
David Demelier <markand@malikania.fr>
parents:
diff changeset
43

mercurial