add install target to Makefile and corresponding prefix variable to config.mk
This commit is contained in:
		
							
								
								
									
										5
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								Makefile
									
									
									
									
									
								
							| @@ -53,5 +53,10 @@ dwl: xdg-shell-protocol.o wlr-layer-shell-unstable-v1-protocol.o idle-protocol.o | |||||||
| clean: | clean: | ||||||
| 	rm -f dwl *.o *-protocol.h *-protocol.c | 	rm -f dwl *.o *-protocol.h *-protocol.c | ||||||
|  |  | ||||||
|  | install: dwl | ||||||
|  | 	mkdir -p $(PREFIX)/bin | ||||||
|  | 	cp -f dwl $(PREFIX)/bin | ||||||
|  | 	chmod 755 $(PREFIX)/bin/dwl | ||||||
|  |  | ||||||
| .DEFAULT_GOAL=dwl | .DEFAULT_GOAL=dwl | ||||||
| .PHONY: clean | .PHONY: clean | ||||||
|   | |||||||
| @@ -1,3 +1,6 @@ | |||||||
|  | # paths | ||||||
|  | PREFIX = /usr/local | ||||||
|  |  | ||||||
| # Default compile flags (overridable by environment) | # Default compile flags (overridable by environment) | ||||||
| CFLAGS ?= -g -Wall -Wextra -Werror -Wno-unused-parameter -Wno-sign-compare -Wno-error=unused-function | CFLAGS ?= -g -Wall -Wextra -Werror -Wno-unused-parameter -Wno-sign-compare -Wno-error=unused-function | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user