-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmakefile
56 lines (48 loc) · 1.86 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
47
48
49
50
51
52
53
54
55
56
TITLE= jxlwic
BUILDDIR= $(MAKEDIR)
ROOTDIR= $(BUILDDIR)\..
SRCDIR= $(BUILDDIR)\src
INCDIR= $(BUILDDIR)\inc
BINDIR32= $(BUILDDIR)\bin\x86_32
BINDIR64= $(BUILDDIR)\bin\x86_64
LIBDIR32= $(BUILDDIR)\lib\x86_32
LIBDIR64= $(BUILDDIR)\lib\x86_64
UTILDIR= $(BUILDDIR)\util
RELEASEDIR= $(BUILDDIR)\release
RELEASEINCDIR= $(RELEASEDIR)\inc\$(TITLE)
RELEASELIBDIR32= $(RELEASEDIR)\lib\x86_32
RELEASEBINDIR32= $(RELEASEDIR)\bin\x86_32
RELEASELIBDIR64= $(RELEASEDIR)\lib\x86_64
RELEASEBINDIR64= $(RELEASEDIR)\bin\x86_64
TEMPDIR= $(BUILDDIR)\.build_win32
VERFILE= $(RELEASEDIR)\$(TITLE).version
INCARG= /I$(SRCDIR) /I$(INCDIR)
SRCARG= $(SRCDIR)\*.cpp
LIBARG32=
LIBARG64= hwy.lib jxl-static.lib jxl.lib jxl_threads-static.lib jxl_threads.lib user32.lib ole32.lib shell32.lib windowscodecs.lib
CC= cl.exe
CFLAGS= $(INCARG) /std:c++14 /EHsc /MT /permissive- /W0 /Gm /Zi /O2 /Fo"$(TEMPDIR)/" /D"WIN32" /D"_CRT_SECURE_NO_DEPRECATE" /D"WIN32_LEAN_AND_MEAN" /D"NOMINMAX" /D"UNICODE" /D"_UNICODE" /D"_CONSOLE"
LDFLAGS32=
LDFLAGS64= $(LIBARG64) /LIBPATH:$(LIBDIR64) /DEF:"jxlwic.def" /MACHINE:X64
dll64: setup
$(CC) /c $(SRCARG) $(CFLAGS)
link.exe /dll /out:$(RELEASEBINDIR64)/$(TITLE).dll $(TEMPDIR)/*.obj $(LDFLAGS64)
echo F | xcopy /E /Y /F $(BINDIR64)\* $(RELEASEBINDIR64)
del /Q $(RELEASEBINDIR64)\*.exp
del /Q $(RELEASEBINDIR64)\*.lib
setup:
- if NOT EXIST "$(RELEASEDIR)" mkdir "$(RELEASEDIR)"
- if NOT EXIST "$(RELEASEINCDIR)" mkdir "$(RELEASEINCDIR)"
- if NOT EXIST "$(RELEASEBINDIR32)" mkdir "$(RELEASEBINDIR32)"
- if NOT EXIST "$(RELEASELIBDIR32)" mkdir "$(RELEASELIBDIR32)"
- if NOT EXIST "$(RELEASEBINDIR64)" mkdir "$(RELEASEBINDIR64)"
- if NOT EXIST "$(RELEASELIBDIR64)" mkdir "$(RELEASELIBDIR64)"
- if NOT EXIST "$(TEMPDIR)" mkdir "$(TEMPDIR)"
clean: cleantmp
del /Q $(RELEASEDIR)
rd /S /Q $(RELEASEDIR) || rem
cleantmp:
del /Q $(TEMPDIR)
rd /Q $(TEMPDIR) || rem
del /Q *.idb
del /Q *.pdb