-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (37 loc) · 1.01 KB
/
Makefile
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
!IF "$(CPU)"=="AMD64" || "$(TARGET_CPU)"=="x64" || "$(Platform)"=="x64" || DEFINED(AMD64)
WIN64=1
!ENDIF
!IFDEF WIN64
arch=x64
fileidarch=amd64
!ELSE
arch=x86
fileidarch=i386
!ENDIF
CFLAGS = -nologo -MD
# Specify the directory of Win32 FileID API Library with FILEIDAPIDIR.
!IFDEF FILEIDAPIDIR
# _WIN32_WINNT should be < 0x0600 in order not to include FileID API
# declaration from winbase.h. Needed for WinXP.
CFLAGS = $(CFLAGS) -DUSE_FILEEXTD -DWINVER=0x0501 -D_WIN32_WINNT=0x0501 -I$(FILEIDAPIDIR)/inc
LIB = $(FILEIDAPIDIR)/lib/$(fileidarch);$(LIB)
NTDLLSTUB = ntdllstub/$(arch)/ntdllstub.lib
!ELSE
NTDLLSTUB =
!ENDIF
all: ptycheck.exe
ptycheck.exe: ptycheck.obj iscygpty.obj $(NTDLLSTUB)
$(CC) $(CFLAGS) /Fe$@ $** fileextd.lib kernel32.lib
ptycheck.obj: ptycheck.c
$(CC) $(CFLAGS) /c /Fo$@ $*.c
iscygpty.obj: iscygpty.c
$(CC) $(CFLAGS) /c /Fo$@ $*.c
ntdllstub/$(arch)/ntdllstub.lib:
cd ntdllstub
$(MAKE) /nologo
cd ..
clean:
del ptycheck.exe ptycheck.obj iscygpty.obj
cd ntdllstub
$(MAKE) /nologo clean
cd ..