X-Git-Url: https://git.xinqibao.xyz/slstatus.git/blobdiff_plain/19f3c8f545237f9db5e994220f3529b192b4bf39..d42870d6ca7fb587b38f8cf6d6821ae33a53a696:/Makefile diff --git a/Makefile b/Makefile index 067ef57..c68a271 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,11 @@ COM =\ components/$(OS)/uptime \ components/user\ components/volume\ - components/wifi + components/$(OS)/wifi + +SLSCFLAGS = -I$(X11INC) -D_DEFAULT_SOURCE $(CFLAGS) +SLSLDFLAGS = -L$(X11LIB) $(LDFLAGS) +SLSLIBS = -lX11 $(OSLIBS) $(LIBS) all: slstatus @@ -37,14 +41,18 @@ config.h: cp config.def.h $@ .o: - $(CC) -o $@ $(LDFLAGS) $< $(COM:=.o) $(REQ:=.o) $(LDLIBS) + $(CC) -o $@ $(SLSLDFLAGS) $< $(COM:=.o) $(REQ:=.o) $(SLSLIBS) .c.o: - $(CC) -o $@ -c $(CPPFLAGS) $(CFLAGS) $< + $(CC) -o $@ -c $(SLSCFLAGS) $< clean: rm -f slstatus slstatus.o $(COM:=.o) $(REQ:=.o) +distclean: + for os in Linux OpenBSD; do make OS="$$os" clean; done + rm -f os.mk + dist: rm -rf "slstatus-$(VERSION)" mkdir -p "slstatus-$(VERSION)/components"