openbsd-ports/graphics/libraw/patches/patch-Makefile
phessler 02a811396f use -fPIC so the library can be used in some other software (coming soon)
while here, adjust .pc file to be in the same style as other .pc files

bump REVISION

OK landry@
2010-10-24 12:13:27 +00:00

96 lines
5.2 KiB
Plaintext

$OpenBSD: patch-Makefile,v 1.2 2010/10/24 12:13:27 phessler Exp $
--- Makefile.orig Sun Mar 28 20:10:18 2010
+++ Makefile Sun Aug 22 14:44:17 2010
@@ -1,6 +1,6 @@
all: library all_samples
-CFLAGS=-O4 -I. -w
+CFLAGS+= -I. -w -fPIC
# OpenMP support
#CFLAGS=-O4 -I. -w -fopenmp
@@ -28,48 +28,48 @@ install-binaries: all_samples
#binaries
bin/raw-identify: lib/libraw.a samples/raw-identify.cpp
- g++ -DLIBRAW_NOTHREADS ${LCMS_DEF} ${CFLAGS} -o bin/raw-identify samples/raw-identify.cpp -L./lib -lraw -lm ${LCMS_LIB}
+ ${CXX} -DLIBRAW_NOTHREADS ${LCMS_DEF} ${CFLAGS} -o bin/raw-identify samples/raw-identify.cpp -L./lib -lraw -lm ${LCMS_LIB}
bin/unprocessed_raw: lib/libraw.a samples/unprocessed_raw.cpp
- g++ -DLIBRAW_NOTHREADS ${LCMS_DEF} ${CFLAGS} -o bin/unprocessed_raw samples/unprocessed_raw.cpp -L./lib -lraw -lm ${LCMS_LIB}
+ ${CXX} -DLIBRAW_NOTHREADS ${LCMS_DEF} ${CFLAGS} -o bin/unprocessed_raw samples/unprocessed_raw.cpp -L./lib -lraw -lm ${LCMS_LIB}
bin/4channels: lib/libraw.a samples/4channels.cpp
- g++ -DLIBRAW_NOTHREADS ${LCMS_DEF} ${CFLAGS} -o bin/4channels samples/4channels.cpp -L./lib -lraw -lm ${LCMS_LIB}
+ ${CXX} -DLIBRAW_NOTHREADS ${LCMS_DEF} ${CFLAGS} -o bin/4channels samples/4channels.cpp -L./lib -lraw -lm ${LCMS_LIB}
bin/simple_dcraw: lib/libraw.a samples/simple_dcraw.cpp
- g++ -DLIBRAW_NOTHREADS ${LCMS_DEF} ${CFLAGS} -o bin/simple_dcraw samples/simple_dcraw.cpp -L./lib -lraw -lm ${LCMS_LIB}
+ ${CXX} -DLIBRAW_NOTHREADS ${LCMS_DEF} ${CFLAGS} -o bin/simple_dcraw samples/simple_dcraw.cpp -L./lib -lraw -lm ${LCMS_LIB}
bin/mem_image: lib/libraw.a samples/mem_image.cpp
- g++ -DLIBRAW_NOTHREADS ${LCMS_DEF} ${CFLAGS} -o bin/mem_image samples/mem_image.cpp -L./lib -lraw -lm ${LCMS_LIB}
+ ${CXX} -DLIBRAW_NOTHREADS ${LCMS_DEF} ${CFLAGS} -o bin/mem_image samples/mem_image.cpp -L./lib -lraw -lm ${LCMS_LIB}
bin/dcraw_half: lib/libraw.a object/dcraw_half.o
- gcc -DLIBRAW_NOTHREADS ${LCMS_DEF} ${CFLAGS} -o bin/dcraw_half object/dcraw_half.o -L./lib -lraw -lm -lstdc++ ${LCMS_LIB}
+ ${CC} -DLIBRAW_NOTHREADS ${LCMS_DEF} ${CFLAGS} -o bin/dcraw_half object/dcraw_half.o -L./lib -lraw -lm -lstdc++ ${LCMS_LIB}
bin/half_mt: lib/libraw_r.a object/half_mt.o
- gcc ${LCMS_DEF} -pthread ${CFLAGS} -o bin/half_mt object/half_mt.o -L./lib -lraw_r -lm -lstdc++ ${LCMS_LIB}
+ ${CC} ${LCMS_DEF} -pthread ${CFLAGS} -o bin/half_mt object/half_mt.o -L./lib -lraw_r -lm -lstdc++ ${LCMS_LIB}
bin/dcraw_emu: lib/libraw.a samples/dcraw_emu.cpp
- g++ -DLIBRAW_NOTHREADS ${LCMS_DEF} ${CFLAGS} -o bin/dcraw_emu samples/dcraw_emu.cpp -L./lib -lraw -lm ${LCMS_LIB}
+ ${CXX} -DLIBRAW_NOTHREADS ${LCMS_DEF} ${CFLAGS} -o bin/dcraw_emu samples/dcraw_emu.cpp -L./lib -lraw -lm ${LCMS_LIB}
#objects
object/dcraw_common.o: internal/dcraw_common.cpp
- g++ -c -DLIBRAW_NOTHREADS ${LCMS_DEF} ${CFLAGS} -o object/dcraw_common.o internal/dcraw_common.cpp
+ ${CXX} -c -DLIBRAW_NOTHREADS ${LCMS_DEF} ${CFLAGS} -o object/dcraw_common.o internal/dcraw_common.cpp
object/dcraw_fileio.o: internal/dcraw_fileio.cpp
- g++ -c -DLIBRAW_NOTHREADS ${CFLAGS} ${LCMS_DEF} -o object/dcraw_fileio.o internal/dcraw_fileio.cpp
+ ${CXX} -c -DLIBRAW_NOTHREADS ${CFLAGS} ${LCMS_DEF} -o object/dcraw_fileio.o internal/dcraw_fileio.cpp
object/libraw_cxx.o: src/libraw_cxx.cpp
- g++ -c -DLIBRAW_NOTHREADS ${LCMS_DEF} ${CFLAGS} -o object/libraw_cxx.o src/libraw_cxx.cpp
+ ${CXX} -c -DLIBRAW_NOTHREADS ${LCMS_DEF} ${CFLAGS} -o object/libraw_cxx.o src/libraw_cxx.cpp
object/libraw_c_api.o: src/libraw_c_api.cpp
- g++ -c -DLIBRAW_NOTHREADS ${LCMS_DEF} ${CFLAGS} -o object/libraw_c_api.o src/libraw_c_api.cpp
+ ${CXX} -c -DLIBRAW_NOTHREADS ${LCMS_DEF} ${CFLAGS} -o object/libraw_c_api.o src/libraw_c_api.cpp
object/dcraw_half.o: samples/dcraw_half.c
- gcc -c -DLIBRAW_NOTHREADS ${LCMS_DEF} ${CFLAGS} -o object/dcraw_half.o samples/dcraw_half.c
+ ${CC} -c -DLIBRAW_NOTHREADS ${LCMS_DEF} ${CFLAGS} -o object/dcraw_half.o samples/dcraw_half.c
object/half_mt.o: samples/half_mt.c
- gcc -c -pthread ${LCMS_DEF} ${CFLAGS} -o object/half_mt.o samples/half_mt.c
+ ${CC} -c -pthread ${LCMS_DEF} ${CFLAGS} -o object/half_mt.o samples/half_mt.c
lib/libraw.a: ${DCRAW_LIB_OBJECTS}
@@ -83,16 +83,16 @@ lib/libraw_r.a: ${DCRAW_LIB_MT_OBJECTS}
ranlib lib/libraw_r.a
object/dcraw_common_mt.o: internal/dcraw_common.cpp
- g++ -c -pthread ${LCMS_DEF} ${CFLAGS} -o object/dcraw_common_mt.o internal/dcraw_common.cpp
+ ${CXX} -c -pthread ${LCMS_DEF} ${CFLAGS} -o object/dcraw_common_mt.o internal/dcraw_common.cpp
object/dcraw_fileio_mt.o: internal/dcraw_fileio.cpp
- g++ -c -pthread ${LCMS_DEF} ${CFLAGS} -o object/dcraw_fileio_mt.o internal/dcraw_fileio.cpp
+ ${CXX} -c -pthread ${LCMS_DEF} ${CFLAGS} -o object/dcraw_fileio_mt.o internal/dcraw_fileio.cpp
object/libraw_cxx_mt.o: src/libraw_cxx.cpp
- g++ -c ${LCMS_DEF} -pthread ${CFLAGS} -o object/libraw_cxx_mt.o src/libraw_cxx.cpp
+ ${CXX} -c ${LCMS_DEF} -pthread ${CFLAGS} -o object/libraw_cxx_mt.o src/libraw_cxx.cpp
object/libraw_c_api_mt.o: src/libraw_c_api.cpp
- g++ -c ${LCMS_DEF} -pthread ${CFLAGS} -o object/libraw_c_api_mt.o src/libraw_c_api.cpp
+ ${CXX} -c ${LCMS_DEF} -pthread ${CFLAGS} -o object/libraw_c_api_mt.o src/libraw_c_api.cpp
clean:
rm -fr bin/*.dSYM