Changeset 22824

Show
Ignore:
Timestamp:
01.09.2010 10:36:46 (9 years ago)
Author:
mdewsnip
Message:

Lots of makefile tidy ups (both Windows and Linux), for consistency and flexibility.

Location:
main/trunk/gs2-core
Files:
14 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/gs2-core/common-src/src/lib/Makefile.am

    r22795 r22824  
    1111 
    1212COMMON_SRC_DIR = @top_srcdir@ 
     13GSDL_DIR = $(COMMON_SRC_DIR)/.. 
    1314 
    1415 
     
    1920libgsdllib_a_CPPFLAGS = \ 
    2021    $(COMPAT32BITFLAGS) 
     22 
     23# Option: SQLite support 
     24if USE_SQLITE 
     25  libgsdllib_a_CPPFLAGS += -I$(GSDL_DIR)/common-src/packages/sqlite/include 
     26endif 
    2127 
    2228# Sources for libgsdllib.a 
     
    4147# Option: SQLite support 
    4248if USE_SQLITE 
    43   libgsdllib_a_CPPFLAGS += -I$(COMMON_SRC_DIR)/packages/sqlite/include 
    4449  libgsdllib_a_SOURCES += sqlitedbclass.cpp 
    4550endif 
  • main/trunk/gs2-core/common-src/src/lib/Makefile.in

    r22795 r22824  
    4949 
    5050# Option: SQLite support 
    51 @USE_SQLITE_TRUE@am__append_1 = -I$(COMMON_SRC_DIR)/packages/sqlite/include 
     51@USE_SQLITE_TRUE@am__append_1 = -I$(GSDL_DIR)/common-src/packages/sqlite/include 
     52 
     53# Option: SQLite support 
    5254@USE_SQLITE_TRUE@am__append_2 = sqlitedbclass.cpp 
    5355subdir = src/lib 
     
    183185target_alias = @target_alias@ 
    184186COMMON_SRC_DIR = @top_srcdir@ 
     187GSDL_DIR = $(COMMON_SRC_DIR)/.. 
    185188 
    186189# Libraries compiled 
  • main/trunk/gs2-core/common-src/src/lib/win32.mak

    r22795 r22824  
    1010 
    1111 
    12 GSDL_DIR = $(GSDLHOME) 
     12COMMON_SRC_DIR = ..\.. 
     13GSDL_DIR = $(COMMON_SRC_DIR)\.. 
    1314 
    1415 
    1516# Libraries compiled 
    16 LIBRARIES = gsdllib.lib 
     17LIBRARIES = libgsdllib.lib 
    1718 
    18 # Library: gsdllib.lib 
     19# Library: libgsdllib.lib 
    1920LIBGSDL_CPPFLAGS = 
    2021 
    21 # Objects for gsdllib.lib 
     22# Option: SQLite support (enabled by default) 
     23USE_SQLITE = 1 
     24!IF $(USE_SQLITE) 
     25LIBGSDL_CPPFLAGS = -DUSE_SQLITE $(LIBGSDL_CPPFLAGS) -I"$(GSDL_DIR)\common-src\packages\sqlite\include" 
     26!ENDIF 
     27 
     28# Objects for libgsdllib.lib 
    2229LIBGSDL_OBJECTS = \ 
    2330    cfgread.obj \ 
     
    3845    unitool.obj 
    3946 
    40  
    41 # Option: SQLite support 
     47# Option: SQLite support (enabled by default) 
     48USE_SQLITE = 1 
    4249!IF $(USE_SQLITE) 
    43 LIBGSDL_CPPFLAGS = -DUSE_SQLITE $(LIBGSDL_CPPFLAGS) -I"$(GSDL_DIR)\common-src\packages\sqlite\include" 
    4450LIBGSDL_OBJECTS = $(LIBGSDL_OBJECTS) sqlitedbclass.obj 
    4551!ENDIF 
     
    5662 
    5763 
    58 gsdllib.lib: $(LIBGSDL_OBJECTS)  
    59     if EXIST gsdllib.lib del gsdllib.lib 
    60     lib -nologo /out:gsdllib.lib $(LIBGSDL_OBJECTS) 
     64libgsdllib.lib: $(LIBGSDL_OBJECTS)  
     65    if EXIST libgsdllib.lib del libgsdllib.lib 
     66    lib -nologo /out:libgsdllib.lib $(LIBGSDL_OBJECTS) 
    6167 
    6268all: $(LIBRARIES) 
  • main/trunk/gs2-core/common-src/win32.mak

    r22763 r22824  
    1010 
    1111 
    12 # Option: Lucene support 
     12# Option: Lucene support (enabled by default) 
     13ENABLE_LUCENE = 1 
    1314!IF $(ENABLE_LUCENE) 
    1415LUCENE_SUBDIRS = indexers packages\expat 
    1516!ENDIF 
    1617 
    17 # Option: SQLite support 
     18# Option: SQLite support (enabled by default) 
     19USE_SQLITE = 1 
    1820!IF $(USE_SQLITE) 
    1921SQLITE_SUBDIRS = packages\sqlite 
  • main/trunk/gs2-core/runtime-src/src/colservr/Makefile.am

    r22740 r22824  
    2222    -I$(GSDL_DIR)/common-src/src/lib \ 
    2323    $(COMPAT32BITFLAGS) 
     24 
     25# Option: Lucene support 
     26if ENABLE_LUCENE 
     27  libgsdlcolservr_a_CPPFLAGS += -I$(GSDL_DIR)/common-src/packages/expat/include 
     28endif 
     29 
     30# Option: SQLite support 
     31if USE_SQLITE 
     32  libgsdlcolservr_a_CPPFLAGS += -I$(GSDL_DIR)/common-src/packages/sqlite/include 
     33endif 
    2434 
    2535# Sources for libgsdlcolservr.a 
     
    4757# Option: Lucene support 
    4858if ENABLE_LUCENE 
    49   libgsdlcolservr_a_CPPFLAGS += -I$(GSDL_DIR)/common-src/packages/expat/include 
    5059  libgsdlcolservr_a_SOURCES += expat_document.cpp expat_resultset.cpp 
    5160endif 
    52  
    53 # Option: SQLite support 
    54 if USE_SQLITE 
    55   libgsdlcolservr_a_CPPFLAGS += -I$(GSDL_DIR)/common-src/packages/sqlite/include 
    56 endif 
  • main/trunk/gs2-core/runtime-src/src/colservr/Makefile.in

    r22740 r22824  
    5050# Option: Lucene support 
    5151@ENABLE_LUCENE_TRUE@am__append_1 = -I$(GSDL_DIR)/common-src/packages/expat/include 
    52 @ENABLE_LUCENE_TRUE@am__append_2 = expat_document.cpp expat_resultset.cpp 
    5352 
    5453# Option: SQLite support 
    55 @USE_SQLITE_TRUE@am__append_3 = -I$(GSDL_DIR)/common-src/packages/sqlite/include 
     54@USE_SQLITE_TRUE@am__append_2 = -I$(GSDL_DIR)/common-src/packages/sqlite/include 
     55 
     56# Option: Lucene support 
     57@ENABLE_LUCENE_TRUE@am__append_3 = expat_document.cpp expat_resultset.cpp 
    5658subdir = src/colservr 
    5759DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in 
     
    210212# Do NOT add the "recpt" directory here: the colserver should be independent of the receptionist! 
    211213libgsdlcolservr_a_CPPFLAGS = -I$(GSDL_DIR)/common-src/src/lib \ 
    212     $(COMPAT32BITFLAGS) $(am__append_1) $(am__append_3) 
     214    $(COMPAT32BITFLAGS) $(am__append_1) $(am__append_2) 
    213215 
    214216# Sources for libgsdlcolservr.a 
     
    218220    maptools.cpp phrasesearch.cpp querycache.cpp queryfilter.cpp \ 
    219221    queryinfo.cpp search.cpp source.cpp sqlbrowsefilter.cpp \ 
    220     sqlfilter.cpp sqlqueryfilter.cpp $(am__append_2) 
     222    sqlfilter.cpp sqlqueryfilter.cpp $(am__append_3) 
    221223all: all-am 
    222224 
  • main/trunk/gs2-core/runtime-src/src/colservr/win32.mak

    r22763 r22824  
    1010 
    1111 
    12 GSDL_DIR = $(GSDLHOME) 
     12RUNTIME_SRC_DIR = ..\.. 
     13GSDL_DIR = $(RUNTIME_SRC_DIR)\.. 
    1314 
    1415 
    1516# Libraries compiled 
    16 LIBRARIES = gsdlcolservr.lib 
     17LIBRARIES = libgsdlcolservr.lib 
    1718 
    18 # Library: gsdlcolservr.lib 
     19# Library: libgsdlcolservr.lib 
    1920# Do NOT add the "recpt" directory here: the colserver should be independent of the receptionist! 
    2021LIBCOLSERVR_CPPFLAGS = \ 
    2122    -I"$(GSDL_DIR)\common-src\src\lib" 
     23 
     24# Option: Lucene support (enabled by default) 
     25ENABLE_LUCENE = 1 
     26!IF $(ENABLE_LUCENE) 
     27LIBCOLSERVR_CPPFLAGS = -DENABLE_LUCENE $(LIBCOLSERVR_CPPFLAGS) -I"$(GSDL_DIR)\common-src\packages\expat\include" 
     28!ENDIF 
     29 
     30# Option: SQLite support (enabled by default) 
     31USE_SQLITE = 1 
     32!IF $(USE_SQLITE) 
     33LIBCOLSERVR_CPPFLAGS = -DUSE_SQLITE $(LIBCOLSERVR_CPPFLAGS) -I"$(GSDL_DIR)\common-src\packages\sqlite\include" 
     34!ENDIF 
    2235 
    2336LIBCOLSERVR_OBJECTS = \ 
     
    4255    sqlqueryfilter.obj 
    4356 
    44  
    45 # Option: Lucene support 
     57# Option: Lucene support (enabled by default) 
     58ENABLE_LUCENE = 1 
    4659!IF $(ENABLE_LUCENE) 
    47 LIBCOLSERVR_CPPFLAGS = -DENABLE_LUCENE $(LIBCOLSERVR_CPPFLAGS) -I"$(GSDL_DIR)\common-src\packages\expat\include" 
    4860LIBCOLSERVR_OBJECTS = $(LIBCOLSERVR_OBJECTS) expat_document.obj expat_resultset.obj 
    49 !ENDIF 
    50  
    51 # Option: SQLite support 
    52 !IF $(USE_SQLITE) 
    53 LIBCOLSERVR_CPPFLAGS = -DUSE_SQLITE $(LIBCOLSERVR_CPPFLAGS) -I"$(GSDL_DIR)\common-src\packages\sqlite\include" 
    5461!ENDIF 
    5562 
     
    6572 
    6673 
    67 gsdlcolservr.lib: $(LIBCOLSERVR_OBJECTS) 
    68     if EXIST gsdlcolservr.lib del gsdlcolservr.lib 
    69     lib -nologo /out:gsdlcolservr.lib $(LIBCOLSERVR_OBJECTS) 
     74libgsdlcolservr.lib: $(LIBCOLSERVR_OBJECTS) 
     75    if EXIST libgsdlcolservr.lib del libgsdlcolservr.lib 
     76    lib -nologo /out:libgsdlcolservr.lib $(LIBCOLSERVR_OBJECTS) 
    7077 
    7178all: $(LIBRARIES) 
  • main/trunk/gs2-core/runtime-src/src/oaiservr/Makefile.am

    r22740 r22824  
    5555    $(GSDL_DIR)/common-src/src/lib/libgsdllib.a 
    5656 
    57 oaiserver_cgi_LDFLAGS = $(COMPAT32BITFLAGS) 
    58  
    5957# Option: Lucene support 
    6058if ENABLE_LUCENE 
     
    6664  oaiserver_cgi_LDADD += $(GSDL_DIR)/common-src/packages/sqlite/lib/libsqlite3.a -ldl -lpthread 
    6765endif 
     66 
     67oaiserver_cgi_LDFLAGS = $(COMPAT32BITFLAGS) 
  • main/trunk/gs2-core/runtime-src/src/oaiservr/win32.mak

    r22763 r22824  
    1010 
    1111 
    12 GSDL_DIR = $(GSDLHOME) 
     12RUNTIME_SRC_DIR = ..\.. 
     13GSDL_DIR = $(RUNTIME_SRC_DIR)\.. 
    1314 
    1415 
     
    4950 
    5051OAISERVER_CGI_LDADD = \ 
    51     "$(GSDL_DIR)\runtime-src\src\protocol\gsdlprotocol.lib" \ 
    52     "$(GSDL_DIR)\runtime-src\src\colservr\gsdlcolservr.lib" \ 
    53     "$(GSDL_DIR)\common-src\src\lib\gsdllib.lib" 
     52    "$(GSDL_DIR)\runtime-src\src\protocol\libgsdlprotocol.lib" \ 
     53    "$(GSDL_DIR)\runtime-src\src\colservr\libgsdlcolservr.lib" \ 
     54    "$(GSDL_DIR)\common-src\src\lib\libgsdllib.lib" 
    5455 
    55  
    56 # Option: Lucene support 
     56# Option: Lucene support (enabled by default) 
     57ENABLE_LUCENE = 1 
    5758!IF $(ENABLE_LUCENE) 
    5859OAISERVER_CGI_LDADD = $(OAISERVER_CGI_LDADD) "$(GSDL_DIR)\common-src\packages\expat\lib\libexpat.lib" 
    5960!ENDIF 
    6061 
    61 # Option: SQLite support 
     62# Option: SQLite support (enabled by default) 
     63USE_SQLITE = 1 
    6264!IF $(USE_SQLITE) 
    6365OAISERVER_CGI_LDADD = $(OAISERVER_CGI_LDADD) "$(GSDL_DIR)\common-src\packages\sqlite\lib\sqlite3.lib" 
  • main/trunk/gs2-core/runtime-src/src/protocol/win32.mak

    r22740 r22824  
    1010 
    1111 
    12 GSDL_DIR = $(GSDLHOME) 
     12RUNTIME_SRC_DIR = ..\.. 
     13GSDL_DIR = $(RUNTIME_SRC_DIR)\.. 
    1314 
    1415 
    1516# Libraries compiled 
    16 LIBRARIES = gsdlprotocol.lib 
     17LIBRARIES = libgsdlprotocol.lib 
    1718 
    18 # Library: gsdlprotocol.lib 
     19# Library: libgsdlprotocol.lib 
    1920# Do NOT add the "recpt" directory here: the protocol should be independent of the receptionist! 
    2021LIBPROTOCOL_CPPFLAGS = \ 
     
    3839 
    3940 
    40 gsdlprotocol.lib: $(LIBPROTOCOL_OBJECTS)  
    41     if EXIST gsdlprotocol.lib del gsdlprotocol.lib 
    42     lib -nologo /out:gsdlprotocol.lib $(LIBPROTOCOL_OBJECTS) 
     41libgsdlprotocol.lib: $(LIBPROTOCOL_OBJECTS)  
     42    if EXIST libgsdlprotocol.lib del libgsdlprotocol.lib 
     43    lib -nologo /out:libgsdlprotocol.lib $(LIBPROTOCOL_OBJECTS) 
    4344 
    4445all: $(LIBRARIES) 
  • main/trunk/gs2-core/runtime-src/src/recpt/Makefile.am

    r22799 r22824  
    2424    -I$(GSDL_DIR)/runtime-src/src/protocol \ 
    2525    $(COMPAT32BITFLAGS) 
     26 
     27# Option: SQLite support 
     28if USE_SQLITE 
     29  library_cgi_CPPFLAGS += -I$(GSDL_DIR)/common-src/packages/sqlite/include 
     30endif 
    2631 
    2732# Sources for library.cgi 
     
    7782    $(GSDL_DIR)/common-src/src/lib/libgsdllib.a 
    7883 
    79 library_cgi_LDFLAGS = $(COMPAT32BITFLAGS) 
    80  
    8184# Option: Lucene support 
    8285if ENABLE_LUCENE 
     
    8689# Option: SQLite support 
    8790if USE_SQLITE 
    88   library_cgi_CPPFLAGS += -I$(GSDL_DIR)/common-src/packages/sqlite/include 
    8991  library_cgi_LDADD += $(GSDL_DIR)/common-src/packages/sqlite/lib/libsqlite3.a -ldl -lpthread 
    9092endif 
     93 
     94library_cgi_LDFLAGS = $(COMPAT32BITFLAGS) 
  • main/trunk/gs2-core/runtime-src/src/recpt/Makefile.in

    r22799 r22824  
    4949cgibin_PROGRAMS = library.cgi$(EXEEXT) 
    5050 
     51# Option: SQLite support 
     52@USE_SQLITE_TRUE@am__append_1 = -I$(GSDL_DIR)/common-src/packages/sqlite/include 
     53 
    5154# Option: Lucene support 
    52 @ENABLE_LUCENE_TRUE@am__append_1 = $(GSDL_DIR)/common-src/packages/expat/lib/libexpat.a 
     55@ENABLE_LUCENE_TRUE@am__append_2 = $(GSDL_DIR)/common-src/packages/expat/lib/libexpat.a 
    5356 
    5457# Option: SQLite support 
    55 @USE_SQLITE_TRUE@am__append_2 = -I$(GSDL_DIR)/common-src/packages/sqlite/include 
    5658@USE_SQLITE_TRUE@am__append_3 = $(GSDL_DIR)/common-src/packages/sqlite/lib/libsqlite3.a -ldl -lpthread 
    5759subdir = src/recpt 
     
    228230    -I$(GSDL_DIR)/runtime-src/src/colservr \ 
    229231    -I$(GSDL_DIR)/runtime-src/src/protocol $(COMPAT32BITFLAGS) \ 
    230     $(am__append_2) 
     232    $(am__append_1) 
    231233 
    232234# Sources for library.cgi 
     
    280282    $(GSDL_DIR)/runtime-src/src/protocol/libgsdlprotocol.a \ 
    281283    $(GSDL_DIR)/runtime-src/src/colservr/libgsdlcolservr.a \ 
    282     $(GSDL_DIR)/common-src/src/lib/libgsdllib.a $(am__append_1) \ 
     284    $(GSDL_DIR)/common-src/src/lib/libgsdllib.a $(am__append_2) \ 
    283285    $(am__append_3) 
    284286library_cgi_LDFLAGS = $(COMPAT32BITFLAGS) 
  • main/trunk/gs2-core/runtime-src/src/recpt/win32.mak

    r22799 r22824  
    1010 
    1111 
    12 GSDL_DIR = $(GSDLHOME) 
     12RUNTIME_SRC_DIR = ..\.. 
     13GSDL_DIR = $(RUNTIME_SRC_DIR)\.. 
    1314 
    1415 
     
    2324    -I"$(GSDL_DIR)\runtime-src\src\protocol" \ 
    2425    -I"$(GSDL_DIR)\common-src\packages\windows\crypt\crypt" 
     26 
     27# Option: Lucene support (enabled by default) 
     28ENABLE_LUCENE = 1 
     29!IF $(ENABLE_LUCENE) 
     30LIBRARY_CGI_CPPFLAGS = -DENABLE_LUCENE $(LIBRARY_CGI_CPPFLAGS) 
     31!ENDIF 
     32 
     33# Option: SQLite support (enabled by default) 
     34USE_SQLITE = 1 
     35!IF $(USE_SQLITE) 
     36LIBRARY_CGI_CPPFLAGS = -DUSE_SQLITE $(LIBRARY_CGI_CPPFLAGS) -I"$(GSDL_DIR)\common-src\packages\sqlite\include" 
     37!ENDIF 
    2538 
    2639# Objects for library.cgi 
     
    7285 
    7386LIBRARY_CGI_LDADD = \ 
    74     "$(GSDL_DIR)\runtime-src\src\protocol\gsdlprotocol.lib" \ 
    75     "$(GSDL_DIR)\runtime-src\src\colservr\gsdlcolservr.lib" \ 
    76     "$(GSDL_DIR)\common-src\src\lib\gsdllib.lib" \ 
     87    "$(GSDL_DIR)\runtime-src\src\protocol\libgsdlprotocol.lib" \ 
     88    "$(GSDL_DIR)\runtime-src\src\colservr\libgsdlcolservr.lib" \ 
     89    "$(GSDL_DIR)\common-src\src\lib\libgsdllib.lib" \ 
    7790    "$(GSDL_DIR)\common-src\packages\windows\crypt\crypt\crypt.lib" 
    7891 
    79  
    80 # Option: Lucene support 
     92# Option: Lucene support (enabled by default) 
     93ENABLE_LUCENE = 1 
    8194!IF $(ENABLE_LUCENE) 
    82 LIBRARY_CGI_CPPFLAGS = -DENABLE_LUCENE $(LIBRARY_CGI_CPPFLAGS) 
    8395LIBRARY_CGI_LDADD = $(LIBRARY_CGI_LDADD) "$(GSDL_DIR)\common-src\packages\expat\lib\libexpat.lib" 
    8496!ENDIF 
    8597 
    86 # Option: SQLite support 
     98# Option: SQLite support (enabled by default) 
     99USE_SQLITE = 1 
    87100!IF $(USE_SQLITE) 
    88 LIBRARY_CGI_CPPFLAGS = -DUSE_SQLITE $(LIBRARY_CGI_CPPFLAGS) -I"$(GSDL_DIR)\common-src\packages\sqlite\include" 
    89101LIBRARY_CGI_LDADD = $(LIBRARY_CGI_LDADD) "$(GSDL_DIR)\common-src\packages\sqlite\lib\sqlite3.lib" 
    90102!ENDIF 
  • main/trunk/gs2-core/win32.mak

    r22728 r22824  
    1010 
    1111 
    12 GSDL_DIR = $(MAKEDIR) 
    13 MAKE = $(MAKE) GSDLHOME=$(GSDL_DIR) 
    14  
    15  
    1612# Option: Lucene support (enabled by default) 
    1713ENABLE_LUCENE = 1 
    18 !IF $(ENABLE_LUCENE) 
    19 MAKE = $(MAKE) ENABLE_LUCENE=1 
    20 !ENDIF 
     14MAKE = $(MAKE) ENABLE_LUCENE=$(ENABLE_LUCENE) 
    2115 
    2216# Option: SQLite support (enabled by default) 
    2317USE_SQLITE = 1 
    24 !IF $(USE_SQLITE) 
    25 MAKE = $(MAKE) USE_SQLITE=1 
    26 !ENDIF 
     18MAKE = $(MAKE) USE_SQLITE=$(USE_SQLITE) 
    2719 
    2820