blob: f33e02f0dbc802fa94f11d3bbfe9b49c918aafe3 (
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
29
30
31
|
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 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)
client: client.o tomsg_clientlib.o sshnc.o string_view.o
$(CC) -o $@ $^ $(LDFLAGS)
%.o: %.c $(wildcard *.h)
$(CC) $(CFLAGS) -c -o $@ $<
|