forked from RamonUnch/AltSnap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MakefileClang
87 lines (73 loc) · 2.03 KB
/
MakefileClang
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
85
86
87
CC=clang
WR=llvm-rc
# We need to include MINGW headers files (for i386 here)
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=-Os -std=c99 \
-target i386-pc-windows-gnu \
-finput-charset=UTF-8 \
-m32 -march=i386 -mtune=i686 \
-momit-leaf-frame-pointer \
-fno-stack-check \
-fno-stack-protector \
-fno-ident \
-fomit-frame-pointer \
-fshort-enums \
-fno-exceptions \
-fno-dwarf2-cfi-asm \
-fno-asynchronous-unwind-tables \
-D__USE_MINGW_ANSI_STDIO=0 \
-Wp,-D_FORTIFY_SOURCE=2 \
$(WARNINGS) \
$(MINGW) \
-DCLANG
LDFLAGS=-nostdlib \
-lkernel32 \
-luser32 \
-lgdi32 \
-s \
-Wl,-s,-dynamicbase \
-Wl,-nxcompat \
-Wl,--no-seh \
-Wl,--enable-auto-import
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 altsnap.res AltSnap.exe hooks.res hooks.dll