mirror of
https://github.com/darkk/redsocks.git
synced 2025-08-30 21:55:31 +00:00
Added "make .depend" and some other makefile improvements.
This commit is contained in:
parent
e3ad17a6cf
commit
8e3e630622
15
Makefile
15
Makefile
@ -1,7 +1,12 @@
|
||||
CFLAGS=-std=gnu99 -Wall -g -O0
|
||||
|
||||
.PHONY: all
|
||||
redsocks: parser.o main.o redsocks.o log.o http-connect.o socks4.o socks5.o base.o
|
||||
all: redsocks
|
||||
|
||||
obj = parser.o main.o redsocks.o log.o http-connect.o socks4.o socks5.o base.o
|
||||
src = $(patsubst %.o,%.c,$(obj))
|
||||
|
||||
redsocks: $(obj)
|
||||
$(CC) $+ -levent -o $@
|
||||
|
||||
tags: *.c *.h
|
||||
@ -9,10 +14,10 @@ tags: *.c *.h
|
||||
|
||||
.PHONY: clean distclean
|
||||
clean:
|
||||
rm -f redsocks config.h *.o
|
||||
rm -f redsocks config.h $(obj)
|
||||
|
||||
distclean: clean
|
||||
rm -f tags
|
||||
rm -f tags .depend
|
||||
|
||||
base.c: config.h
|
||||
|
||||
@ -30,4 +35,8 @@ config.h:
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -c $*.c -o $*.o
|
||||
|
||||
.depend: $(src)
|
||||
gcc -MM -MP $(src) $(CFLAGS) > .depend
|
||||
|
||||
include .depend
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user