Lot of small changes
This commit is contained in:
		
							
								
								
									
										31
									
								
								vim/.vim/UltiSnips/make.snippets
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								vim/.vim/UltiSnips/make.snippets
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,31 @@ | ||||
| snippet base "tonitch's makefile base" b | ||||
|  | ||||
| .PHONY: all clean run | ||||
| VERSION = 0.0.1 | ||||
|  | ||||
| LIBS =  | ||||
| CMACRO = -DVERSION=\"$(VERSION)\" | ||||
|  | ||||
| CC = gcc | ||||
| CFLAGS = -g -Wall -Wextra -pedantic $(shell pkg-config $(LIBS) --cflags) $(CMACRO) | ||||
| LDFLAGS = $(shell pkg-config $(LIBS) --libs) | ||||
|  | ||||
| all: main | ||||
|  | ||||
| main: main.o | ||||
| 	$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) | ||||
|  | ||||
| %.o: %.c | ||||
| 	$(CC) $(CFLAGS) -c -o $@ $< | ||||
|  | ||||
| clean:  | ||||
| 	rm -f *.o | ||||
| 	rm -f main | ||||
|  | ||||
| bear: clean | ||||
| 	bear -- make | ||||
|  | ||||
| run: main | ||||
| 	./$< | ||||
|  | ||||
| endsnippet | ||||
		Reference in New Issue
	
	Block a user