Changeset 4952


Ignore:
Timestamp:
07/20/12 05:19:15 (6 years ago)
Author:
quintiliani
Message:

Added Mole makefiles for unix architectures

Location:
trunk/src/archiving/mole
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/archiving/mole/README

    r4919 r4952  
    136136            - Earthworm environment configuration. 
    137137            - Connector/C (libmysql), a MySQL client library for C development. 
    138               It must be compiled as 32-bit ! 
    139               Download binaries of sources for your platform from 
    140               http://www.mysql.com/downloads/connector/c/ 
    141               To compile you need cmake, for example on unix machine: 
    142                  # mkdir /somewhere/mysql-connector-32bit 
     138              Source from http://www.mysql.com/downloads/connector/c/ must be 
     139              compiled as 32-bit ! 
     140            - Compiling Connector/C (libmysql) requires 'cmake'. 
     141 
     142        Automatic compilation procedure: 
     143                # cd mole 
     144                # make -f makefile.XXX  
     145 
     146        The automatic procedure approximately executes, for example on a unix machine: 
     147                 # cd mysql-connector-c-build 
     148                 # cd mysql-connector-c-6.0.2 
    143149                 # Within ./CMakeLists.txt add the option "-m32" to variables CMAKE_C**_FLAGS 
    144                  # cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/somewhere/mysql-connector-32bit 
     150                 # cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=../mysql-connector-c-build 
    145151                 # make  
    146152                 # make install  
    147                  # export DYLD_LIBRARY_PATH=/somewhere/mysql-connector-c-32bit/lib 
    148                  # export LD_LIBRARY_PATH=/somewhere/mysql-connector-c-32bit/lib 
    149         - cd ew2moledb 
    150         - Edit the makefile for your architecture and set properly 
     153                 # cd ../ew2moledb 
     154                 # make makefile.ux 
     155        If the compilation is not static, then set properly the variable LD_LIBRARY_PATH, i.e. 
     156                 # export LD_LIBRARY_PATH=/somewhere/mysql-connector-c-build/lib 
     157 
     158        If you have already installed somewhere the mysql library as 32-bit, then you 
     159        could compile ew2moledb following these steps: 
     160           - cd ew2moledb 
     161           - Edit the makefile.XXX for your architecture and set properly 
    151162                MYSQL_CONFIG_PROG_PATH 
    152163                with the path of program mysql_config 
    153         - Run "make -f makefile.XXX" and good luck ;-) 
     164           - Run "make -f makefile.XXX dynamic" and good luck ;-) 
    154165 
    155166  * Configure ew2moledb: 
  • trunk/src/archiving/mole/ew2moledb/makefile.ux

    r4920 r4952  
    99CFLAGS += -Wall -g 
    1010 
    11 # Change the appropriate path to 32bit mysql_config executable 
    12 # MYSQL_CONFIG_PROG_PATH = /opt/pkgs-32/opt/mysql/mysql/bin 
    13 MYSQL_CONFIG_PROG_PATH = /Users/mtheo/mysql-connector-c-32bit/bin 
     11MYSQL_CONNECTOR_C_PATH_BUILD=../mysql-connector-c-build 
     12# In case of need, change the appropriate path to 32bit mysql_config executable 
     13MYSQL_CONFIG_PROG_PATH = $(MYSQL_CONNECTOR_C_PATH_BUILD)/bin 
    1414MYSQL_CONFIG_PROG = $(MYSQL_CONFIG_PROG_PATH)/mysql_config 
    15  
    16 CFLAGS += `$(MYSQL_CONFIG_PROG) --cflags` 
    17 LDFLAGS += `$(MYSQL_CONFIG_PROG) --libs_r` 
    18  
    1915 
    2016APP = ew2moledb 
     
    3026           $L/sleep_ew.o $L/time_ew.o $L/threads_ew.o $L/sema_ew.o  $L/dirops_ew.o 
    3127 
    32 all: $B/$(APP) 
     28all: static 
     29 
     30dynamic: $B/$(APP) 
     31 
     32static: $(BINARIES) 
     33        $(CC) -o $B/ew2moledb $(CFLAGS) $(LDFLAGS) $(MYSQL_CONNECTOR_C_PATH_BUILD)/lib/libmysqlclient.a $(BINARIES) -lpthread 
    3334 
    3435$B/$(APP): $(BINARIES) 
    35         $(CC) -o $B/ew2moledb $(CFLAGS) $(LDFLAGS) $(BINARIES) -lpthread 
     36        $(CC) -o $B/ew2moledb $(CFLAGS) `$(MYSQL_CONFIG_PROG) --cflags` $(LDFLAGS) `$(MYSQL_CONFIG_PROG) --libs_r` $(BINARIES) -lpthread 
    3637 
    3738.c.o: 
    38         $(CC) -c $(CFLAGS) $< 
     39        $(CC) -c $(CFLAGS) `$(MYSQL_CONFIG_PROG) --cflags` $< 
    3940 
    4041 
Note: See TracChangeset for help on using the changeset viewer.