-
Notifications
You must be signed in to change notification settings - Fork 613
/
Copy pathMakefile.win
84 lines (70 loc) · 1.98 KB
/
Makefile.win
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Makefile
# By Ron Bowes
# Created January, 2013
#
# (See LICENSE.md)
#
# Should work for Linux and BSD make.
CC=i686-w64-mingw32-gcc
DEBUG_CFLAGS?=-DTESTMEMORY -Werror -O0
RELEASE_CFLAGS?=-Os
# CFLAGS?=--std=c89 -I. -Wall -D_DEFAULT_SOURCE -Wformat -Wformat-security -g -DWIN32=1 -DWINDOWS=1
CFLAGS?=-I. -g
LIBS=-pie -Wl,-z,relro,-z,now
LDFLAGS= -lws2_32 -ldnsapi
OS=$(shell uname -s)
ifeq ($(OS),SunOS)
# Solaris CC
LDFLAGS = -lsocket -lnsl
endif
OBJS=controller/packet.o \
controller/session.o \
controller/controller.o \
drivers/driver.o \
drivers/command/driver_command.o \
drivers/command/command_packet.o \
drivers/driver_console.o \
drivers/driver_exec.o \
drivers/driver_ping.o \
libs/buffer.o \
libs/crypto/encryptor.o \
libs/crypto/micro-ecc/uECC.o \
libs/crypto/salsa20.o \
libs/crypto/sha3.o \
libs/dns.o \
libs/ll.o \
libs/log.o \
libs/memory.o \
libs/select_group.o \
libs/tcp.o \
libs/types.o \
libs/udp.o \
tunnel_drivers/driver_dns.o \
DNSCAT_DNS_OBJS=${OBJS} dnscat.o
all: dnscat.exe
@echo "*** Build complete! Run 'make debug' to build a debug version!"
debug: CFLAGS += $(DEBUG_CFLAGS)
debug: dnscat
@echo "*** Debug build complete"
release: CFLAGS += ${RELEASE_CFLAGS}
release: dnscat
nocrypto: CFLAGS += -DNO_ENCRYPTION
nocrypto: all
remove:
rm -f /usr/local/bin/dnscat
uninstall: remove
clean:
-rm -f *.o */*.o */*/*.o */*/*/*.o *.exe *.stackdump dnscat tcpcat test driver_tcp driver_dns
-rm -rf win32/Debug/
-rm -rf win32/Release/
-rm -rf win32/*.ncb
-rm -rf win32/*.sln
-rm -rf win32/*.suo
-rm -rf win32/*.vcproj.*
dnscat.exe: ${DNSCAT_DNS_OBJS}
${CC} ${CFLAGS} -o dnscat.exe ${DNSCAT_DNS_OBJS} ${LDFLAGS}
@echo "*** dnscat successfully compiled"
COMMANDS=drivers/command/commands_standard.h \
drivers/command/commands_tunnel.h
drivers/command/driver_command.o: drivers/command/driver_command.c ${COMMANDS}
${CC} -c ${CFLAGS} -o drivers/command/driver_command.o drivers/command/driver_command.c