Permalink
Cannot retrieve contributors at this time
45 lines (30 sloc)
1.39 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # SPDX-License-Identifier: BSD-2-Clause-FreeBSD | |
| # | |
| .if defined(DEBUG) | |
| CFLAGS+= -g3 -ggdb | |
| .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 | |
| 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 | |