File: Makefile.mingw

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 (111 lines) | stat: -rwxr-xr-x 4,002 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
all: library samples 

# OpenMP support
#OPENMP_CFLAGS=-fopenmp

# Jasper support for RedCine
#CFLAGS+=-DUSE_JASPER -I/usr/local/include
#LDADD+=-L/usr/local/lib -ljasper

# JPEG support for DNG
#CFLAGS+=-DUSE_JPEG -I/usr/local/include
#LDADD+=-L/usr/local/lib -ljpeg

# LCMS support
#LCMS_DEF=-DUSE_LCMS -I/usr/local/include
#LCMS_LIB=-L/usr/local/lib -llcms

# LCMS2.x support
#LCMS_DEF=-DUSE_LCMS2 -I/usr/local/include
#LCMS_LIB=-L/usr/local/lib -llcms2

# Non thread-safe:
CFLAGS_THREADS=-DLIBRAW_NOTHREADS

# Thread Safe:
#CFLAGS_THREADS=

# Common flags
# WARNING: library order matters
COMMON_LIBS=-lws2_32 -lm ${LCMS_LIB}
CLIBS=-L./lib  -lraw ${COMMON_LIBS}
CFLAGS=-O4 -I. -w -DLIBRAW_NODLL ${OPENMP_CFLAGS} ${CFLAGS_THREADS} ${CFLAGS2} ${CFLAGS3}

DCRAW_LIB_OBJECTS=object/libraw_cxx.o object/libraw_datastream.o object/libraw_c_api.o object/dcraw_common.o object/dcraw_fileio.o object/demosaic_packs.o

library: lib/libraw.a

samples: bin/raw-identify bin/simple_dcraw bin/dcraw_emu bin/dcraw_half bin/mem_image bin/mem_image \
        bin/unprocessed_raw bin/4channels  bin/multirender_test bin/postprocessing_benchmark

install: library
	@if [ -d /usr/local/include ] ; then cp -R libraw /usr/local/include/ ; else echo 'no /usr/local/include' ; fi
	@if [ -d /usr/local/lib ] ; then cp lib/libraw.a /usr/local/lib/ ; else echo 'no /usr/local/lib' ; fi

install-samples: samples
	@if [ -d /usr/local/bin ] ; then cp bin/[a-z]* /usr/local/bin/ ; else echo 'no /usr/local/bin' ; fi

# Samples

bin/raw-identify: lib/libraw.a samples/raw-identify.cpp
	g++ ${LCMS_DEF} ${CFLAGS} -o bin/raw-identify samples/raw-identify.cpp ${CLIBS} 

bin/unprocessed_raw: lib/libraw.a samples/unprocessed_raw.cpp
	g++ ${LCMS_DEF} ${CFLAGS} -o bin/unprocessed_raw samples/unprocessed_raw.cpp ${CLIBS}

bin/4channels: lib/libraw.a samples/4channels.cpp
	g++ ${LCMS_DEF} ${CFLAGS} -o bin/4channels samples/4channels.cpp ${CLIBS}

bin/simple_dcraw: lib/libraw.a samples/simple_dcraw.cpp
	g++ ${LCMS_DEF} ${CFLAGS} -o bin/simple_dcraw samples/simple_dcraw.cpp ${CLIBS}

bin/multirender_test: lib/libraw.a samples/multirender_test.cpp
	g++ ${LCMS_DEF} ${CFLAGS} -o bin/multirender_test samples/multirender_test.cpp ${CLIBS}

bin/postprocessing_benchmark: lib/libraw.a samples/postprocessing_benchmark.cpp
	g++ ${LCMS_DEF} ${CFLAGS} -o bin/postprocessing_benchmark samples/postprocessing_benchmark.cpp ${CLIBS}

bin/mem_image: lib/libraw.a samples/mem_image.cpp
	g++ ${LCMS_DEF} ${CFLAGS} -o bin/mem_image samples/mem_image.cpp ${CLIBS}

bin/dcraw_half: lib/libraw.a object/dcraw_half.o
	gcc ${LCMS_DEF} ${CFLAGS} -o bin/dcraw_half object/dcraw_half.o ${CLIBS} -lstdc++

bin/dcraw_emu: lib/libraw.a samples/dcraw_emu.cpp
	g++ ${LCMS_DEF} ${CFLAGS} -o bin/dcraw_emu samples/dcraw_emu.cpp ${CLIBS}

#Libraries

object/dcraw_common.o: internal/dcraw_common.cpp
	g++ -c ${LCMS_DEF} ${CFLAGS} -o object/dcraw_common.o internal/dcraw_common.cpp

object/demosaic_packs.o: internal/demosaic_packs.cpp
	g++ -c ${LCMS_DEF} ${CFLAGS} ${CFLAGS_DP2} ${CFLAGS_DP3} -o object/demosaic_packs.o internal/demosaic_packs.cpp

object/dcraw_fileio.o: internal/dcraw_fileio.cpp
	g++ -c ${LCMS_DEF} ${CFLAGS} -o object/dcraw_fileio.o internal/dcraw_fileio.cpp

object/libraw_cxx.o: src/libraw_cxx.cpp src/libraw_fuji_compressed.cpp
	g++ -c ${LCMS_DEF} ${CFLAGS} -o object/libraw_cxx.o src/libraw_cxx.cpp

object/libraw_datastream.o: src/libraw_datastream.cpp
	g++ -c ${LCMS_DEF} ${CFLAGS} -o object/libraw_datastream.o src/libraw_datastream.cpp

object/libraw_c_api.o: src/libraw_c_api.cpp
	g++ -c ${LCMS_DEF} ${CFLAGS} -o object/libraw_c_api.o src/libraw_c_api.cpp

object/dcraw_half.o: samples/dcraw_half.c
	gcc -c ${LCMS_DEF} ${CFLAGS} -o object/dcraw_half.o samples/dcraw_half.c

lib/libraw.a: ${DCRAW_LIB_OBJECTS}
	-del lib\\libraw.a
	-rm -f lib/libraw.a
	ar crv lib/libraw.a ${DCRAW_LIB_OBJECTS}
	ranlib lib/libraw.a	

# Clean	

clean:
	-del bin\\*.dSYM
	-del lib\\lib*.a bin\\*.exe object\\*o 
	-rm -f lib/lib*.a bin/*.exe object/*o