X-Git-Url: https://git.xinqibao.xyz/slstatus.git/blobdiff_plain/f56e50a2694e92d972a060d71b2f80c72fd23365..d8ce4e694217bc69e95372f705d023e71dd70115:/Makefile

diff --git a/Makefile b/Makefile
index 505b526..0e925cc 100644
--- a/Makefile
+++ b/Makefile
@@ -5,33 +5,33 @@
 include config.mk
 
 REQ = util
-HDR = arg.h config.h
 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/load_avg\
+	components/netspeeds\
+	components/num_files\
+	components/ram\
+	components/run_command\
+	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 $(HDR) $(REQ:=.h)
-$(COM:=.o): config.mk $(HDR) $(REQ:=.h)
+slstatus.o: slstatus.c slstatus.h arg.h config.h config.mk $(REQ:=.h)
+$(COM:=.o): config.mk $(REQ:=.h)
 
 config.h:
 	cp config.def.h $@
@@ -40,16 +40,16 @@ config.h:
 	$(CC) -o $@ $(LDFLAGS) $< $(COM:=.o) $(REQ:=.o) $(LDLIBS)
 
 .c.o:
-	$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
+	$(CC) -o $@ -c $(CPPFLAGS) $(CFLAGS) $<
 
 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 \
-	      $(HDR) slstatus.c $(COM:=.c) $(REQ:=.c) $(REQ:=.h) \
+	      arg.h slstatus.c $(COM:=.c) $(REQ:=.c) $(REQ:=.h) \
 	      slstatus.1 "slstatus-$(VERSION)"
 	tar -cf - "slstatus-$(VERSION)" | gzip -c > "slstatus-$(VERSION).tar.gz"
 	rm -rf "slstatus-$(VERSION)"