# MacOSX makefile for OpenJPEG VER_MAJOR = 2 VER_MINOR = 1.5.0-dotnet-1 SRCS = ./libopenjpeg/bio.c ./libopenjpeg/cio.c ./libopenjpeg/dwt.c ./libopenjpeg/event.c ./libopenjpeg/image.c ./libopenjpeg/j2k.c ./libopenjpeg/j2k_lib.c ./libopenjpeg/jp2.c ./libopenjpeg/jpt.c ./libopenjpeg/mct.c ./libopenjpeg/mqc.c ./libopenjpeg/openjpeg.c ./libopenjpeg/pi.c ./libopenjpeg/raw.c ./libopenjpeg/t1.c ./libopenjpeg/t2.c ./libopenjpeg/tcd.c ./libopenjpeg/tgt.c ./libopenjpeg/cidx_manager.c ./libopenjpeg/phix_manager.c ./libopenjpeg/ppix_manager.c ./libopenjpeg/thix_manager.c ./libopenjpeg/tpix_manager.c CPPSRCS = ./dotnet/dotnet.cpp INCLS = ./libopenjpeg/bio.h ./libopenjpeg/cio.h ./libopenjpeg/dwt.h ./libopenjpeg/event.h ./libopenjpeg/fix.h ./libopenjpeg/image.h ./libopenjpeg/int.h ./libopenjpeg/j2k.h ./libopenjpeg/j2k_lib.h ./libopenjpeg/jp2.h ./libopenjpeg/jpt.h ./libopenjpeg/mct.h ./libopenjpeg/mqc.h ./libopenjpeg/openjpeg.h ./libopenjpeg/pi.h ./libopenjpeg/raw.h ./libopenjpeg/t1.h ./libopenjpeg/t2.h ./libopenjpeg/tcd.h ./libopenjpeg/tgt.h ./libopenjpeg/opj_includes.h ./dotnet/dotnet.h ./libopenjpeg/cidx_manager.h ./libopenjpeg/indexbox_manager.h INCLUDE = -Ilibopenjpeg # General configuration variables: CC = gcc LIBTOOLSTAT = libtool LIBTOOLDYN = g++ COMPILERFLAGS = -O3 -fPIC -m32 MODULES = $(SRCS:.c=.o) CPPMODULES = $(CPPSRCS:.cpp=.o) CFLAGS = $(COMPILERFLAGS) $(INCLUDE) TARGET = openjpeg-dotnet SHAREDLIB = lib$(TARGET)-$(VER_MAJOR)-$(VER_MINOR).dylib LIBNAME = lib$(TARGET).dylib default: all all: OpenJPEG dos2unix: @$(DOS2UNIX) $(SRCS) $(INCLS) dist: OpenJPEG install -d ../bin cp $(SHAREDLIB) ../bin/ OpenJPEG: $(STATICLIB) $(SHAREDLIB) .c.o: $(CC) $(CFLAGS) -c $< -o $@ $(STATICLIB): $(MODULES) $(LIBTOOLSTAT) -o $@ $(MODULES) .cpp.o: $(CC) $(CFLAGS) -c $< -o $@ $(SHAREDLIB): $(MODULES) $(CPPMODULES) $(LIBTOOLDYN) -m32 -dynamiclib -o $@ $(MODULES) $(CPPMODULES) $(LIBRARIES) install: install -d ../bin cp $(SHAREDLIB) ../bin/ clean: rm -rf core dist/ u2dtmp* $(MODULES) $(STATICLIB) $(SHAREDLIB) $(LIBNAME)