-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmakefile
51 lines (43 loc) · 1.15 KB
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Copyright 2009-2011 Nicolas Limare <nicolas.limare@cmla.ens-cachan.fr>
#
# Copying and distribution of this file, with or without
# modification, are permitted in any medium without royalty provided
# the copyright notice and this notice are preserved. This file is
# offered as-is, without any warranty.
# source code, C language
SRC = io_png.c balance_lib.c colorbalance_lib.c balance.c
# object files (partial compilation)
OBJ = $(SRC:.c=.o)
# binary executable programs
BIN = balance
# C compiler optimization options
COPT = -O2
# complete C compiler options
CFLAGS = $(COPT)
# preprocessor options
CPPFLAGS = -I. -DNDEBUG
# linker options
LDFLAGS =
# libraries
LDLIBS = -lpng
# default target: the binary executable programs
default: $(BIN)
# dependencies
-include makefile.dep
# partial C compilation xxx.c -> xxx.o
%.o : %.c
$(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
# final link
balance : $(OBJ)
$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
# cleanup
.PHONY : clean distclean
clean :
$(RM) $(OBJ)
distclean : clean
$(RM) $(BIN)
$(RM) -r srcdoc
################################################
# dev tasks
PROJECT = simplest_color_balance
-include makefile.dev