X-Git-Url: https://git.xinqibao.xyz/slstatus.git/blobdiff_plain/61e44e894890c1521a01148fbf969cbd4dbb4cae..2b0f50d1aaf22e79272df8b3b0fe37f338ea1dae:/Makefile diff --git a/Makefile b/Makefile index 1a90431..2f93b87 100644 --- a/Makefile +++ b/Makefile @@ -6,47 +6,49 @@ include config.mk REQ = util COM =\ - battery\ - cpu\ - datetime\ - disk\ - entropy\ - hostname\ - ip\ - kernel_release\ - keyboard_indicators\ - load_avg\ - num_files\ - ram\ - run_command\ - swap\ - temperature\ - uptime\ - user\ - volume\ - wifi + components/battery\ + components/cpu\ + components/datetime\ + components/disk\ + components/entropy\ + components/hostname\ + components/ip\ + components/kernel_release\ + components/keyboard_indicators\ + components/keymap\ + components/load_avg\ + components/netspeeds\ + components/num_files\ + components/ram\ + components/run_command\ + components/separator\ + components/swap\ + components/temperature\ + components/uptime\ + components/user\ + components/volume\ + components/wifi all: slstatus -slstatus: slstatus.o $(COM:=.o) $(REQ:=.o) -slstatus.o: slstatus.c slstatus.h arg.h config.h $(REQ:=.h) $(COM:=.o): config.mk $(REQ:=.h) +slstatus.o: slstatus.c slstatus.h arg.h config.h config.mk $(REQ:=.h) + +.c.o: + $(CC) -o $@ -c $(CPPFLAGS) $(CFLAGS) $< config.h: cp config.def.h $@ -.o: - $(CC) -o $@ $(LDFLAGS) $< $(COM:=.o) $(REQ:=.o) $(LDLIBS) - -.c.o: - $(CC) -c $(CPPFLAGS) $(CFLAGS) $< +slstatus: slstatus.o $(COM:=.o) $(REQ:=.o) + $(CC) -o $@ $(LDFLAGS) $(COM:=.o) $(REQ:=.o) slstatus.o $(LDLIBS) clean: rm -f slstatus slstatus.o $(COM:=.o) $(REQ:=.o) dist: rm -rf "slstatus-$(VERSION)" - mkdir -p "slstatus-$(VERSION)" + mkdir -p "slstatus-$(VERSION)/components" cp -R LICENSE Makefile README config.mk config.def.h \ arg.h slstatus.c $(COM:=.c) $(REQ:=.c) $(REQ:=.h) \ slstatus.1 "slstatus-$(VERSION)"