Skip to content

Commit 06dc36c

Browse files
committed
Adjust build instruction for LibRaw 201910
1 parent 031bb6c commit 06dc36c

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

library/raw/Makefile.linux

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Makefile for Linux, FreeBSD, macOS
2+
# See Readme.txt to install libraw
3+
4+
CFLAGS= -DLIBRAW_NOTHREADS -O3 -w -fPIC $(arch_flags)
5+
OSTYPE = $(shell uname)
6+
7+
ifneq ($(findstring BSD,$(OSTYPE)),)
8+
CXX = c++
9+
else
10+
CXX = g++
11+
endif
12+
13+
ifneq ($(findstring Darwin,$(OSTYPE)),)
14+
SO_Name = libpasraw.dylib
15+
LIBFLAGS = -Wl,-single_module -dynamiclib
16+
# on macOS, link libraw statically in a single library
17+
LIBS = /usr/local/lib/libraw.a -mmacosx-version-min=10.10
18+
else
19+
SOName = libpasraw.so.1
20+
SO_Name = libpasraw.so.1.1
21+
LIBFLAGS = -shared -Wl,-soname,$(SOName)
22+
#LIBFLAGS = -L/usr/local/lib -I/usr/local/include -shared -Wl,-soname,$(SOName)
23+
# on Linux, use the standard shared library
24+
LIBS = -lraw
25+
endif
26+
27+
SRC = pasraw.cpp
28+
29+
all: $(SO_Name)
30+
31+
$(SO_Name): $(OBJS)
32+
$(CXX) $(CFLAGS) $(LIBFLAGS) -o $@ $(SRC) $(LIBS)
33+
34+
clean:
35+
rm -f *.a *.o $(SO_Name)

library/raw/Readme.txt

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ This library exist because we cannot link a C++ object directly from Pascal.
44
It export C function we can link from Pascal to load a raw buffer and return
55
a pointer to the raw data.
66
The rest of the processing is in the Pascal code.
7+
8+
This procedure is tested with "LibRaw 201910 snapshot" it may require adjustement with another version.
79

810
LINUX:
911
======

0 commit comments

Comments
 (0)