27 lines
550 B
Makefile
27 lines
550 B
Makefile
CROSS_COMPILE ?=
|
|
CC := $(CROSS_COMPILE)gcc
|
|
STRIP := $(CROSS_COMPILE)strip
|
|
CFLAGS = -Wall -g -O3
|
|
LIB = -lssh2 -pthread
|
|
OBJ = tunnel
|
|
|
|
SSH2_LIB := $(shell pkg-config --static --libs --cflags libssh2)
|
|
|
|
|
|
all:forward-tunnel reverse-tunnel
|
|
|
|
forward-tunnel: forward-tunnel.o
|
|
$(CC) $(CFLAGS) -o forward-tunnel $^ $(SSH2_LIB) $(LIB)
|
|
$(STRIP) forward-tunnel
|
|
|
|
reverse-tunnel: reverse-tunnel.o
|
|
$(CC) $(CFLAGS) -o reverse-tunnel $^ $(SSH2_LIB) $(LIB)
|
|
$(STRIP) reverse-tunnel
|
|
|
|
.c.o:
|
|
$(CC) $(CFLAGS) -c $<
|
|
|
|
clean:
|
|
rm -rf *.o
|
|
rm reverse-tunnel forward-tunnel
|