Makefile tweaks
Modified according to [dwm](http://git.suckless.org/dwm/file/Makefile.html) 's Makefile file.
This commit is contained in:
		
							
								
								
									
										34
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										34
									
								
								Makefile
									
									
									
									
									
								
							@@ -1,17 +1,31 @@
 | 
				
			|||||||
PREFIX ?= /usr/local
 | 
					PREFIX  ?= /usr/local
 | 
				
			||||||
CC ?= cc
 | 
					CC      ?= cc
 | 
				
			||||||
 | 
					CFLAGS  = -pedantic -Wall -Wno-deprecated-declarations -Os
 | 
				
			||||||
LDFLAGS = -lX11
 | 
					LDFLAGS = -lX11
 | 
				
			||||||
 | 
					
 | 
				
			||||||
output: dwmblocks.c blocks.def.h blocks.h
 | 
					all: options dwmblocks
 | 
				
			||||||
	${CC}  dwmblocks.c $(LDFLAGS) -o dwmblocks
 | 
					
 | 
				
			||||||
 | 
					options:
 | 
				
			||||||
 | 
						@echo dwmblocks build options:
 | 
				
			||||||
 | 
						@echo "CFLAGS  = ${CFLAGS}"
 | 
				
			||||||
 | 
						@echo "LDFLAGS = ${LDFLAGS}"
 | 
				
			||||||
 | 
						@echo "CC      = ${CC}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					dwmblocks: dwmblocks.c blocks.def.h blocks.h
 | 
				
			||||||
 | 
						${CC} -o dwmblocks dwmblocks.c ${CFLAGS} ${LDFLAGS}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
blocks.h:
 | 
					blocks.h:
 | 
				
			||||||
	cp blocks.def.h $@
 | 
						cp blocks.def.h $@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
clean:
 | 
					clean:
 | 
				
			||||||
	rm -f *.o *.gch dwmblocks
 | 
						${RM} *.o *.gch dwmblocks
 | 
				
			||||||
install: output
 | 
					
 | 
				
			||||||
	mkdir -p $(DESTDIR)$(PREFIX)/bin
 | 
					install: dwmblocks
 | 
				
			||||||
	install -m 0755 dwmblocks $(DESTDIR)$(PREFIX)/bin/dwmblocks
 | 
						mkdir -p ${DESTDIR}${PREFIX}/bin
 | 
				
			||||||
 | 
						cp -f dwmblocks ${DESTDIR}${PREFIX}/bin
 | 
				
			||||||
 | 
						chmod 755 ${DESTDIR}${PREFIX}/bin/dwmblocks
 | 
				
			||||||
 | 
					
 | 
				
			||||||
uninstall:
 | 
					uninstall:
 | 
				
			||||||
	rm -f $(DESTDIR)$(PREFIX)/bin/dwmblocks
 | 
						${RM} ${DESTDIR}${PREFIX}/bin/dwmblocks
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.PHONY: all options clean install uninstall
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user