-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
45 lines (30 loc) · 1.42 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
#
# SPDX-License-Identifier: BSD-2-Clause-FreeBSD
#
.if defined(DEBUG)
CFLAGS+= -g3 -ggdb -fno-common
.endif
CFLAGS+= -Werror -Wall -Wextra -Wformat=2 -Wbad-function-cast -Wcast-align -Wdeclaration-after-statement -Wdisabled-optimization -Wfloat-equal -Winline -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpacked -Wpointer-arith -Wredundant-decls -Wstrict-prototypes -Wunreachable-code -Wwrite-strings -fno-common
SRCS= main.c boards.c output.c chip_w83792d.c chip_w83793g.c chip_x6dva.c smbus_io.c
OBJS= ${SRCS:.c=.o}
all: depend bsdhwmon man
bsdhwmon: ${OBJS}
${CC} -o ${.TARGET} ${.ALLSRC}
# BSD make will read the .depend file automatically on invocation, which
# tracks allOBJS targets, and their associated source and #include
# dependencies. However, in the case an #include is removed from a .c
# file, this can result in a "stale dependency" warning. We could
# alleviate that by using .dinclude ".depend", except FreeBSD 10.3 and
# earlier lacks support for the directive. For now, just accept it.
depend:
${CC} -E -MM ${SRCS} > .depend
.-include ".depend"
man: bsdhwmon.8.txt
bsdhwmon.8.txt: bsdhwmon.8
mandoc -Tascii bsdhwmon.8 | col -bx > ${.TARGET}
clean:
-rm -f bsdhwmon bsdhwmon.8.txt ${OBJS} .depend *.core
distclean: clean
ports-test:
@echo "portlint && make stage && make check-plist && make stage-qa && make package"
.PHONY: all man clean depend distclean ports-test