File: Makefile.msvc

package info (click to toggle)
libraw 0.19.2-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 4,396 kB
  • sloc: cpp: 39,147; ansic: 23,363; perl: 145; makefile: 87; sh: 77
file content (133 lines) | stat: -rwxr-xr-x 6,091 bytes parent folder | download | duplicates (2)
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# Additional compiler flags (OpenMP, SSEx, AVX, ...)

#COPT_OPT=/arch:SSE2 /arch:AVX

# Compile with RawSpeed support
#CFLAGS_RAWSPEED=/DUSE_RAWSPEED /I"..\\RawSpeed" /I"..\\RawSpeed\include" /I"..\\RawSpeed\include\libjpeg"
#LDFLAGS_RAWSPEED=..\RawSpeed\lib\rawspeed.lib ..\RawSpeed\lib\libxml2.lib ..\RawSpeed\lib\iconv.lib ..\RawSpeed\lib\charset.lib ..\RawSpeed\lib\turbojpeg-static.lib

# Compile with DNG SDK support
#CFLAGS_DNG=/DUSE_DNGSDK /I"..\\dng_sdk\\source"
#LDFLAGS_DNG=..\\dng_sdk\\release\\libdng.lib  ..\\dng_sdk\\release\\XMPCore.lib 
# you may also need to specify zlib.lib and jpeg.lib in the line above

# LCMS 1.x support
#LCMS_DEF=/DUSE_LCMS /DCMS_DLL /I..\lcms-1.19\include
#LCMS_LIB=..\lcms-1.19\bin\lcms.lib

# LCMS 2.x support
#LCMS_DEF=/DUSE_LCMS2 /DCMS_DLL /I..\lcms2-2.3\include
#LCMS_LIB=..\lcms2-2.3\bin\lcms2_dll.lib

# JPEG support for DNG
#JPEG_DEF=/DUSE_JPEG /I..\jpeg-8d
#JPEG_LIB=..\jpeg-8d\Release\jpeg.lib


SAMPLES=bin\raw-identify.exe bin\simple_dcraw.exe  bin\dcraw_emu.exe bin\dcraw_half.exe bin\half_mt.exe bin\mem_image.exe bin\unprocessed_raw.exe bin\4channels.exe bin\multirender_test.exe bin\postprocessing_benchmark.exe bin\openbayer_sample.exe

LIBSTATIC=lib\libraw_static.lib
DLL=bin\libraw.dll
LIBDLL=lib\libraw.lib

all: $(DLL) $(SAMPLES) $(LIBSTATIC) 

# Guess LIBPATH from $INCLUDE

LIB_OBJECTS=object\dcraw_common_st.obj object\dcraw_fileio_st.obj  object\libraw_cxx_st.obj object\libraw_datastream_st.obj object\libraw_c_api_st.obj object\demosaic_packs_st.obj
DLL_OBJECTS=object\dcraw_common.obj object\dcraw_fileio.obj  object\libraw_cxx.obj object\libraw_datastream.obj object\libraw_c_api.obj  object\demosaic_packs.obj

CC=cl.exe
COPT=/EHsc /MP /MD /I. /DWIN32 /O2 /W0 /nologo $(COPT_OPT) $(CFLAGSG2) $(CFLAGSG3) $(LCMS_DEF) $(JPEG_DEF) $(CFLAGS_RAWSPEED) $(CFLAGS_DNG)

LINKLIB=$(LIBDLL) $(LDFLAGS_RAWSPEED) $(LDFLAGS_DNG)

# Samples - default to dynamic (DLL) link, uncomment next lines 
#CFLAGS2=/DLIBRAW_NODLL
#LINKLIB=$(LIBSTATIC)

bin\raw-identify.exe: $(LINKLIB) samples\raw-identify.cpp
	$(CC) $(COPT) $(CFLAGS2) /Fe"bin\\raw-identify.exe" /Fo"object\\" samples\raw-identify.cpp $(LINKLIB)

bin\unprocessed_raw.exe: $(LINKLIB) samples\unprocessed_raw.cpp
	$(CC) $(COPT) $(CFLAGS2) /Fe"bin\\unprocessed_raw.exe" /Fo"object\\" samples\unprocessed_raw.cpp $(LINKLIB) ws2_32.lib

bin\4channels.exe: $(LINKLIB) samples\4channels.cpp
	$(CC) $(COPT) $(CFLAGS2) /Fe"bin\\4channels.exe" /Fo"object\\" samples\4channels.cpp $(LINKLIB)

bin\simple_dcraw.exe: $(LINKLIB) samples\simple_dcraw.cpp
	$(CC) $(COPT) $(CFLAGS2) /Fe"bin\\simple_dcraw.exe" /Fo"object\\" samples\simple_dcraw.cpp $(LINKLIB)

bin\postprocessing_benchmark.exe: $(LINKLIB) samples\postprocessing_benchmark.cpp
	$(CC) $(COPT) $(CFLAGS2) /Fe"bin\\postprocessing_benchmark.exe" /Fo"object\\" samples\postprocessing_benchmark.cpp $(LINKLIB)

bin\multirender_test.exe: $(LINKLIB) samples\multirender_test.cpp
	$(CC) $(COPT) $(CFLAGS2) /Fe"bin\\multirender_test.exe" /Fo"object\\" samples\multirender_test.cpp $(LINKLIB)

bin\openbayer_sample.exe: $(LINKLIB) samples\openbayer_sample.cpp
	$(CC) $(COPT) $(CFLAGS2) /Fe"bin\\openbayer_sample.exe" /Fo"object\\" samples\openbayer_sample.cpp $(LINKLIB)

bin\mem_image.exe: $(LINKLIB) samples\mem_image.cpp
	$(CC) $(COPT) $(CFLAGS2) /Fe"bin\\mem_image.exe" /Fo"object\\" samples\mem_image.cpp $(LINKLIB)

bin\dcraw_emu.exe: $(LINKLIB) samples\dcraw_emu.cpp
	$(CC) $(COPT) $(CFLAGS2) /Fe"bin\\dcraw_emu.exe" /Fo"object\\" samples\dcraw_emu.cpp $(LINKLIB)

bin\dcraw_half.exe: $(LINKLIB) samples\dcraw_half.c
	$(CC) $(COPT) $(CFLAGS2) /Fe"bin\\dcraw_half.exe" /Fo"object\\" samples\dcraw_half.c $(LINKLIB)

bin\half_mt.exe: $(LINKLIB) samples\half_mt_win32.c
	$(CC) $(COPT) $(CFLAGS2) /Fe"bin\\half_mt.exe" /Fo"object\\" samples\half_mt_win32.c $(LINKLIB)

# DLL build

$(DLL): $(DLL_OBJECTS)
	-del /f $(DLL) $(LIBDLL)
	cl $(COPT) /LD $(DLL_OBJECTS) $(LDFLAGS_RAWSPEED) $(LDFLAGS_DNG) $(LCMS_LIB) $(JPEG_LIB) /link /out:"$(DLL)" /implib:"$(LIBDLL)"

object\dcraw_common.obj: internal\dcraw_common.cpp
	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\dcraw_common.obj" /c internal\dcraw_common.cpp

object\dcraw_fileio.obj: internal\dcraw_fileio.cpp
	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\dcraw_fileio.obj" /c internal\dcraw_fileio.cpp

object\demosaic_packs.obj: internal\demosaic_packs.cpp
	$(CC) $(COPT) $(CFLAGS_DP2) $(CFLAGS_DP3) /DLIBRAW_BUILDLIB /Fo"object\\demosaic_packs.obj" /c internal\demosaic_packs.cpp

object\libraw_cxx.obj: src\libraw_cxx.cpp src\libraw_fuji_compressed.cpp
	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\libraw_cxx.obj" /c src\libraw_cxx.cpp

object\libraw_datastream.obj: src\libraw_datastream.cpp
	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\libraw_datastream.obj" /c src\libraw_datastream.cpp

object\libraw_c_api.obj: src\libraw_c_api.cpp
	$(CC) $(COPT) /DLIBRAW_BUILDLIB /Fo"object\\libraw_c_api.obj" /c src\libraw_c_api.cpp


# LIBRARY BUILD
$(LIBSTATIC): $(LIB_OBJECTS)
        -del /f $(LIBSTATIC)
	lib /OUT:$(LIBSTATIC) /LTCG $(LIB_OBJECTS)

object\dcraw_common_st.obj: internal\dcraw_common.cpp
	$(CC) $(COPT) /DLIBRAW_NODLL /Fo"object\\dcraw_common_st.obj" /c internal\dcraw_common.cpp

object\dcraw_fileio_st.obj: internal\dcraw_fileio.cpp
	$(CC) $(COPT) /DLIBRAW_NODLL /Fo"object\\dcraw_fileio_st.obj" /c internal\dcraw_fileio.cpp

object\demosaic_packs_st.obj: internal\demosaic_packs.cpp
	$(CC) $(COPT)  $(CFLAGS_DP2) $(CFLAGS_DP3)  /DLIBRAW_NODLL /Fo"object\\demosaic_packs_st.obj" /c internal\demosaic_packs.cpp

object\libraw_cxx_st.obj: src\libraw_cxx.cpp src\libraw_fuji_compressed.cpp
	$(CC) $(COPT) /DLIBRAW_NODLL /Fo"object\\libraw_cxx_st.obj" /c src\libraw_cxx.cpp

object\libraw_datastream_st.obj: src\libraw_datastream.cpp
	$(CC) $(COPT) /DLIBRAW_NODLL /Fo"object\\libraw_datastream_st.obj" /c src\libraw_datastream.cpp

object\libraw_c_api_st.obj: src\libraw_c_api.cpp
	$(CC) $(COPT) /DLIBRAW_NODLL /Fo"object\\libraw_c_api_st.obj" /c src\libraw_c_api.cpp

clean:
	-del $(LIBSTATIC) $(LIBDLL) lib\*.exp
	-del $(LIB_OBJECTS) $(DLL_OBJECTS)
	-del $(DLL) $(SAMPLES)