forked from RamonUnch/AltSnap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MakefileClangdb
81 lines (67 loc) · 1.97 KB
/
MakefileClangdb
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
CC=clang
WR=llvm-rc
# We need to include GCC headers files (for i386 here)
#MINGW=-ID:\Straw\tdm64\x86_64-w64-mingw32\include \
# -LD:\Straw\tdm64\x86_64-w64-mingw32\lib32
MINGW=-ID:\Straw\llvm-mingw\include \
-LD:\Straw\llvm-mingw\i686-w64-mingw32\lib
WARNINGS=-Wall \
-Wformat-security \
-Wstrict-overflow \
-Wsign-compare \
-Wempty-body \
-Wignored-qualifiers \
-Wuninitialized \
-Wtype-limits \
-Wno-multichar \
-Wno-attributes \
-Wnull-dereference \
-Wno-unused-function \
-Wshadow \
-Werror=vla \
-Wno-typedef-redefinition \
-Wno-macro-redefined \
-Wno-unknown-pragmas \
-Wno-missing-declarations \
-Wno-pragma-pack
# -Wunused-parameter
# -Wtraditional-conversion
# -fira-region=one/mixed
# -Wstack-usage=2048
# -finput-charset=UTF-8
# -Wc++-compat
CFLAGS=-Og -g -std=c99 \
-target i386-pc-windows-gnu \
-finput-charset=UTF-8 \
-m32 -march=i386 -mtune=i686 \
-fshort-enums \
-fno-asynchronous-unwind-tables \
-fsanitize=address \
-fno-omit-frame-pointer \
-D__USE_MINGW_ANSI_STDIO=0 \
-Wp,-D_FORTIFY_SOURCE=2 \
$(WARNINGS) \
$(MINGW) \
-DCLANG
LDFLAGS=-lkernel32 \
-luser32 \
-lgdi32 \
-Wl,-dynamicbase \
-Wl,-nxcompat \
-Wl,--no-seh
EXELD = $(LDFLAGS) \
-Wl,--tsaware \
-lcomctl32 \
-ladvapi32 \
-lshell32 \
default: AltSnap.exe hooks.dll
hooks.dll : hooks.c hooks.h hooksr.o unfuck.h nanolibc.h zones.c snap.c
$(CC) -o hooks.dll hooks.c hooks.res $(CFLAGS) $(LDFLAGS) -shared -e_DllMain@12 -v -Wl,--kill-at
AltSnap.exe : altsnapr.o altsnap.c hooks.h tray.c config.c languages.h languages.c unfuck.h nanolibc.h
$(CC) -o AltSnap.exe altsnap.c altsnap.res $(CFLAGS) $(EXELD) -mwindows -e_unfuckWinMain@0 -v
altsnapr.o : altsnap.rc window.rc resource.h AltSnap.exe.manifest media/find.cur media/find.ico media/icon.ico media/tray-disabled.ico media/tray-enabled.ico
$(WR) altsnap.rc
hooksr.o: hooks.rc
$(WR) hooks.rc
clean :
rm altsnapr.o AltSnap.exe hooksr.o hooks.dll