aboutsummaryrefslogtreecommitdiff
path: root/ssh/Makefile
blob: 487bb46d4cce37f6bf7ecadf315a12808b0468b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
CC = gcc
CFLAGS = -Wall -Wextra -std=c11 -g -O2 -fwrapv -pthread -D_DEFAULT_SOURCE
LDFLAGS = -pthread
CFLAGS += $(shell pkg-config --cflags libssh)
LDFLAGS += $(shell pkg-config --libs libssh)

TARGETS = server_proxy client_proxy ssh_client


.PHONY: all clean

all: $(TARGETS)

clean:
	rm -f $(TARGETS) *.o


server_proxy: server_proxy.o util.o
	$(CC) -o $@ $^ $(LDFLAGS)

client_proxy: client_proxy.o sshnc.o util.o
	$(CC) -o $@ $^ $(LDFLAGS)

ssh_client: ssh_client.o sshnc.o util.o
	$(CC) -o $@ $^ $(LDFLAGS)

%.o: %.c $(wildcard *.h)
	$(CC) $(CFLAGS) -c -o $@ $<