| 1 | CPPFLAGS := -D_POSIX_C_SOURCE=200809L |
| 2 | CFLAGS := -std=c99 -Wall -Wextra |
| 3 | LDLIBS := -lX11 |
| 4 | |
| 5 | .PHONY: build clean rebuild |
| 6 | |
| 7 | build: \ |
| 8 | khatus \ |
| 9 | khatus_sensor_battery \ |
| 10 | khatus_sensor_time |
| 11 | |
| 12 | khatus: \ |
| 13 | khlib_log.o \ |
| 14 | khlib_time.o |
| 15 | |
| 16 | khatus_sensor_battery: \ |
| 17 | khlib_log.o \ |
| 18 | khlib_time.o |
| 19 | |
| 20 | khatus_sensor_time: \ |
| 21 | khlib_log.o \ |
| 22 | khlib_time.o |
| 23 | |
| 24 | khlib_time.o: khlib_log.o |
| 25 | |
| 26 | clean: |
| 27 | @find . -type f -executable -delete |
| 28 | @find . -type f -name '*.o' -delete |
| 29 | |
| 30 | rebuild: |
| 31 | @$(MAKE) -s clean |
| 32 | @$(MAKE) -s build |