-
-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathMakefile.static
55 lines (44 loc) · 969 Bytes
/
Makefile.static
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
CC = gcc
CFLAGS += -pedantic -Wconversion -Wall -Werror -Wextra -Wstrict-prototypes -std=gnu99 \
-Iinclude -I./external/libssh-0.9.3/include -g -D_GNU_SOURCE -DLIBSSH_STATIC
LDFLAGS += -L./external/libssh-0.9.3/build/src \
-lssh \
-lrt \
-lcrypto \
-lz \
-lpthread \
-ldl \
-static
NAME = cbrutekrag
SRCS := cbrutekrag.c \
context.c \
log.c \
str.c \
iprange.c \
progress.c \
progressbar.c \
bruteforce_ssh.c \
detection.c target.c \
credentials.c
OBJS := $(SRCS:%.c=obj/%.o)
all: dirs $(NAME)
dirs:
mkdir -p obj
$(NAME): $(OBJS)
@$(CC) $(OBJS) $(LDFLAGS) -o $@
@echo "Linking complete!"
$(OBJS): obj/%.o : src/%.c
@$(CC) $(CFLAGS) -c $< -o $@
@echo "Compiled "$<" successfully!"
clean:
rm -f $(OBJS)
fclean: clean
rm -f $(NAME)
re: fclean all
.PHONY: install
install: $(NAME)
mkdir -p $(DESTDIR)$(PREFIX)/$(BINDIR)
cp $(NAME) $(DESTDIR)$(PREFIX)/$(BINDIR)/$(NAME)
.PHONY: uninstall
uninstall:
rm -f $(DESTDIR)$(PREFIX)/$(BINDIR)/$(NAME)