Changeset 26657


Ignore:
Timestamp:
2013-01-10T15:44:31+13:00 (9 years ago)
Author:
davidb
Message:

Support for cross-compilation added. This particular set of changes focus on flags that assist cross-compilation with JNI

Location:
main/trunk/greenstone2/common-src/indexers
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/common-src/indexers/mg/jni/Makefile.in

    r25168 r26657  
    2727AWK = @AWK@
    2828
    29 JNIFLAGS=@JNIFLAGS@
     29JNICFLAGS=@JNICFLAGS@
     30JNILDFLAGS=@JNILDFLAGS@
     31JNIPREFIX=@JNIPREFIX@
    3032JNISUFFIX=@JNISUFFIX@
    3133JNIINC=@JNIINC@
     
    3537mandir = $(prefix)/man/man1
    3638
    37 CCOMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS)
     39CCOMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS) $(JNICFLAGS)
    3840
    3941.SUFFIXES:
     
    5153
    5254link:
    53     $(CC) $(LDFLAGS) $(JNIFLAGS) -o libmgretrievejni.$(JNISUFFIX) MGRetrieveWrapperImpl.o $(QUERY_LIBS)
    54     $(CC) $(LDFLAGS) $(JNIFLAGS) -o libmgsearchjni.$(JNISUFFIX) MGSearchWrapperImpl.o $(QUERY_LIBS)
    55     $(CC) $(LDFLAGS)  $(JNIFLAGS) -o libmgpassjni.$(JNISUFFIX)  MGPassesWrapperImpl.o  $(PASSES_LIBS)
     55    $(CC) $(LDFLAGS) $(JNILDFLAGS) -o $(JNIPREFIX)mgretrievejni.$(JNISUFFIX) MGRetrieveWrapperImpl.o $(QUERY_LIBS)
     56    $(CC) $(LDFLAGS) $(JNILDFLAGS) -o $(JNIPREFIX)mgsearchjni.$(JNISUFFIX) MGSearchWrapperImpl.o $(QUERY_LIBS)
     57    $(CC) $(LDFLAGS)  $(JNILDFLAGS) -o $(JNIPREFIX)mgpassjni.$(JNISUFFIX)  MGPassesWrapperImpl.o  $(PASSES_LIBS)
    5658
    5759clean:
    58     rm -rf *.o libmgretrievejni.$(JNISUFFIX) libmgsearchjni.$(JNISUFFIX) libmgpassjni.$(JNISUFFIX)
     60    rm -rf *.o $(JNIPREFIX)mgretrievejni.$(JNISUFFIX) $(JNIPREFIX)mgsearchjni.$(JNISUFFIX) $(JNIPREFIX)mgpassjni.$(JNISUFFIX)
    5961
    6062distclean: clean
     
    6365install:
    6466#   ../mkinstalldirs $(libdir); \
    65 #   cp libmgjni.$(JNISUFFIX) libmgpassjni.$(JNISUFFIX)  $(libdir)/;
     67#   cp $(JNIPREFIX)mgjni.$(JNISUFFIX) $(JNIPREFIX)mgpassjni.$(JNISUFFIX)  $(libdir)/;
    6668
    6769
  • main/trunk/greenstone2/common-src/indexers/mgpp/jni/Makefile.in

    r25171 r26657  
    3535LDFLAGS = @LDFLAGS@
    3636#NOTE: libmgpptext.a needs to come before libmgpplib.a !!!
    37 QUERY_LIBS = ../text/libmgpptext.a   ../lib/libmgpplib.a $(AFLIBS)  -lstdc++ ../../../packages/iconv/lib/libiconv.a @LIBS@
    38 PASSES_LIBS = ../text/libmgpppass.a ../lib/libmgpplib.a -lstdc++ @LIBS@
     37QUERY_LIBS = ../text/libmgpptext.a   ../lib/libmgpplib.a $(AFLIBS) -static-libstdc++ ../../../packages/iconv/lib/libiconv.a @LIBS@
     38PASSES_LIBS = ../text/libmgpppass.a ../lib/libmgpplib.a -static-libstdc++ @LIBS@
    3939TOUCH = echo timestamp >
    4040AWK = @AWK@
    4141
    42 JNIFLAGS=@JNIFLAGS@
     42JNICFLAGS=@JNICFLAGS@
     43JNILDFLAGS=@JNILDFLAGS@
     44JNIPREFIX=@JNIPREFIX@
    4345JNISUFFIX=@JNISUFFIX@
    4446JNIINC=@JNIINC@
     
    4951mandir = $(prefix)/man/man1
    5052
    51 CXXCOMPILE = $(CXX) -c $(DEFS) $(INCLUDES) $(CXXFLAGS)
     53CXXCOMPILE = $(CXX) -c $(DEFS) $(INCLUDES) $(CXXFLAGS) $(JNICFLAGS)
    5254
    5355.SUFFIXES:
     
    6466    $(CXXCOMPILE) MGPPSearchWrapperImpl.cpp MGPPRetrieveWrapperImpl.cpp MGPPPassesWrapperImpl.cpp
    6567link:
    66     $(CXX) $(LDFLAGS) $(JNIFLAGS) -o libmgppretrievejni.$(JNISUFFIX) MGPPRetrieveWrapperImpl.o $(QUERY_LIBS)
    67     $(CXX) $(LDFLAGS) $(JNIFLAGS) -o libmgppsearchjni.$(JNISUFFIX) MGPPSearchWrapperImpl.o $(QUERY_LIBS)
    68     $(CXX) $(LDFLAGS) $(JNIFLAGS) -o libmgpppassjni.$(JNISUFFIX) MGPPPassesWrapperImpl.o $(PASSES_LIBS)
     68    $(CXX) $(LDFLAGS) $(JNILDFLAGS) -o $(JNIPREFIX)mgppretrievejni.$(JNISUFFIX) MGPPRetrieveWrapperImpl.o $(QUERY_LIBS)
     69    $(CXX) $(LDFLAGS) $(JNILDFLAGS) -o $(JNIPREFIX)mgppsearchjni.$(JNISUFFIX) MGPPSearchWrapperImpl.o $(QUERY_LIBS)
     70    $(CXX) $(LDFLAGS) $(JNILDFLAGS) -o $(JNIPREFIX)mgpppassjni.$(JNISUFFIX) MGPPPassesWrapperImpl.o $(PASSES_LIBS)
    6971
    7072clean:
    71     rm -rf *.o libmgppretrievejni.$(JNISUFFIX) libmgppsearchjni.$(JNISUFFIX) libmgpppassjni.$(JNISUFFIX)
     73    rm -rf *.o $(JNIPREFIX)mgppretrievejni.$(JNISUFFIX) $(JNIPREFIX)mgppsearchjni.$(JNISUFFIX) $(JNIPREFIX)mgpppassjni.$(JNISUFFIX)
    7274
    7375distclean: clean
     
    7678install:
    7779#   ../mkinstalldirs $(libdir); \
    78 #   cp libmgppjni.$(JNISUFFIX)  libmgpppassjni.$(JNISUFFIX)  $(libdir)/;
     80#   cp $(JNIPREFIX)mgppjni.$(JNISUFFIX)  $(JNIPREFIX)mgpppassjni.$(JNISUFFIX)  $(libdir)/;
    7981
    8082
Note: See TracChangeset for help on using the changeset viewer.