Adapted Makefile.am/Makefile.nix to build choice: shared xor static

This commit is contained in:
Winfried 2010-12-14 03:33:31 +00:00
parent 4c9a4ee2fa
commit 1c1c123897
5 changed files with 23 additions and 16 deletions

View File

@ -203,7 +203,6 @@ libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@

View File

@ -4,8 +4,10 @@ USERLIBS =
INCLUDES = -I. -I../libjp3dvm
CFLAGS = -Wall $(INCLUDES)
if with_staticlibs
CFLAGS += -static
if with_sharedlibs
CFLAGS += -DOPJ_EXPORTS
else
CFLAGS += -DOPJ_STATIC
endif
bin_PROGRAMS = jp3d_to_volume volume_to_jp3d

View File

@ -37,7 +37,8 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
@with_staticlibs_TRUE@am__append_1 = -static
@with_sharedlibs_TRUE@am__append_1 = -DOPJ_EXPORTS
@with_sharedlibs_FALSE@am__append_2 = -DOPJ_STATIC
bin_PROGRAMS = jp3d_to_volume$(EXEEXT) volume_to_jp3d$(EXEEXT)
subdir = jp3d/codec
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
@ -93,7 +94,7 @@ AWK = @AWK@
BUILD_NR = @BUILD_NR@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = -Wall $(INCLUDES) $(am__append_1)
CFLAGS = -Wall $(INCLUDES) $(am__append_1) $(am__append_2)
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
@ -198,7 +199,6 @@ libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@

View File

@ -27,10 +27,16 @@ DOS2UNIX = dos2unix
dos2unix:
@$(DOS2UNIX) $(SRCS) $(INCLS)
INCLUDES = -I../.. -I.. -I.
INCLUDES = -I../.. -I.
COMPILERFLAGS = -Wall -O3 -ffast-math -std=c99
if with_sharedlibs
COMPILERFLAGS += -DOPJ_EXPORTS
else
COMPILERFLAGS += -DOPJ_STATIC
libopenjp3dvm_la_LDFLAGS += -static
endif
CFLAGS = $(COMPILERFLAGS) $(INCLUDES)
#CFLAGS += -DJP3D_VERSION="\"$(MAJOR).$(MINOR).$(BUILD)\""
@ -56,7 +62,6 @@ all-local:
install-data-hook:
(cd $(DESTDIR)${prefix}/include && rm -f openjpeg3d.h)
(cd ${prefix}/include/${headerdir} && mv openjpeg3d.h openjpeg3d.h)
(cd $(DESTDIR)${prefix}/include && \
$(LN_S) ${headerdir}/openjpeg3d.h openjpeg3d.h)

View File

@ -36,6 +36,9 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
@with_sharedlibs_TRUE@am__append_1 = -DOPJ_EXPORTS
@with_sharedlibs_FALSE@am__append_2 = -DOPJ_STATIC
@with_sharedlibs_FALSE@am__append_3 = -static
subdir = jp3d/libjp3dvm
DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
@ -215,7 +218,6 @@ libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
@ -248,9 +250,8 @@ MINOR = @JP3D_MINOR_NR@
BUILD = @JP3D_BUILD_NR@
CURRENT = `expr $(MAJOR) + $(MINOR)`
lib_LTLIBRARIES = libopenjp3dvm.la
libopenjp3dvm_la_LDFLAGS = -no-undefined \
-version-info $(CURRENT):$(BUILD):$(MINOR)
libopenjp3dvm_la_LDFLAGS = -no-undefined -version-info \
$(CURRENT):$(BUILD):$(MINOR) $(am__append_3)
SRCS = bio.c cio.c dwt.c event.c jp3d.c jp3d_lib.c volume.c mct.c mqc.c \
openjpeg.c pi.c raw.c t1.c t1_3d.c t2.c tcd.c tgt.c
@ -262,8 +263,9 @@ include_HEADERS = openjpeg3d.h
# Converts cr/lf to just lf
DOS2UNIX = dos2unix
INCLUDES = -I../.. -I.. -I.
COMPILERFLAGS = -Wall -O3 -ffast-math -std=c99
INCLUDES = -I../.. -I.
COMPILERFLAGS = -Wall -O3 -ffast-math -std=c99 $(am__append_1) \
$(am__append_2)
#CFLAGS += -DJP3D_VERSION="\"$(MAJOR).$(MINOR).$(BUILD)\""
headerdir = openjpeg3d-$(MAJOR).$(MINOR)
all: all-am
@ -634,7 +636,6 @@ all-local:
install-data-hook:
(cd $(DESTDIR)${prefix}/include && rm -f openjpeg3d.h)
(cd ${prefix}/include/${headerdir} && mv openjpeg3d.h openjpeg3d.h)
(cd $(DESTDIR)${prefix}/include && \
$(LN_S) ${headerdir}/openjpeg3d.h openjpeg3d.h)