X-Git-Url: https://git.xandkar.net/?a=blobdiff_plain;f=x5%2FMakefile;h=a70c48fc521eafefd3aafa32eb2995a167422dff;hb=544b083562fc2c9470e045a5cf4d47361147c620;hp=816deff6602af647068639ca27d93039947147cd;hpb=fabb877142fbe4686ef7fcaf7fa0f4f92c1fe254;p=khatus.git diff --git a/x5/Makefile b/x5/Makefile index 816deff..a70c48f 100644 --- a/x5/Makefile +++ b/x5/Makefile @@ -1,18 +1,34 @@ -CFLAGS := -Wall -LDLIBS := -lX11 +CPPFLAGS := -D_POSIX_C_SOURCE=200809L +CFLAGS := -std=c99 -Wall -Wextra +LDLIBS := -lX11 -EXECUTABLES := khatus +.PHONY: build clean rebuild -.PHONY: \ - build \ - clean \ - rebuild +build: \ + khatus \ + khatus_sensor_battery \ + khatus_sensor_time -build: $(EXECUTABLES) +khatus: \ + khatus_lib_log.o \ + khatus_lib_time.o + +khatus_sensor_battery: \ + khatus_lib_log.o \ + khatus_lib_sensor.o \ + khatus_lib_time.o + +khatus_sensor_time: \ + khatus_lib_log.o \ + khatus_lib_sensor.o \ + khatus_lib_time.o + +khatus_lib_time.o: khatus_lib_log.o clean: - @find . -name '*.o' -type f -delete - @rm -f $(EXECUTABLES) + @find . -type f -executable -delete + @find . -type f -name '*.o' -delete -rebuild: clean +rebuild: + @$(MAKE) -s clean @$(MAKE) -s build