Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2010-07

Help to create a Makefile to build a shared library on Linux

3 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Pierre Y.

Hi,

Can you help me creating a Makefile to replace this ugly "build.sh" script ?

# cat build.sh
#!/usr/bin/env bash

PROJECT=nepudf
UIB_ROOT=../uib/source
MACHINE_TYPE=`uname -m`

if [ ${MACHINE_TYPE} == 'x86_64' ]; then
# 64-bit stuff here
FB_ROOT=/usr/lib64/firebird/2.1
fpc -B -dFB21 -fPIC -Xs -Fi${UIB_ROOT} -Fu${UIB_ROOT} -Fl${FB_ROOT}/lib ${PROJECT}.dpr
else
# 32-bit stuff here
FB_ROOT=/usr/lib/firebird/2.1
fpc -B -dFB21 -Xs -Fi${UIB_ROOT} -Fu${UIB_ROOT} -Fl${FB_ROOT}/lib ${PROJECT}.dpr
fi

if [ `id -u` = 0 ]
then
install --mode 555 --owner root --group root --strip lib${PROJECT}.so ${FB_ROOT}/UDF/${PROJECT}.so
install --mode 444 --owner root --group root ${PROJECT}.sql ${FB_ROOT}/UDF/

echo Since you are root, ${PROJECT}.so and ${PROJECT}.sql have been installed into ${FB_ROOT}/UDF
fi

The idea is quite simple : the sources for this firebird user defined functions library is hosted on my subversion repository, it only requires firebird to be installed and the uib components, in an ideal world I would just have to install firebird, fpc, checkout UIB from svn, checkout my poject from svn so that the directory tree look like that :

~/src
~/src/nepudf
~/src/uib

Then :

~/src/nepudf $ fpcmake... && make && sudo make install

I found non Makefile.fpc example to build a shared library.

Many thanks for your help, regards,

Pierre Yager
Codebue Fabio - P-Soft
to Pierre Y.

I'm developping an application for my winCE device.

When I try to save an csv file to disk I want to write on my Pc directly with do it manually with windows explorer.
But If I try to see my pc resources... I can't find them?

There are some way to see my computer disk from my windows CE device?

Codebue Fabio
.--------------------------------.
P-Soft di Codebue Fabio
via Nuova, 9
24060 Tavernola B.sca - BG
Web : www.p-soft.biz
EMail:

Zaher Dirkey
to Codebue Fabio - P-Soft

On Sat, Jul 31, 2010 at 5:37 PM, Codebue Fabio - P-Soft <

wrote: There are some way to see my computer disk from my windows CE device?

Saving directly From WinCE to PC, No.

Zaher Dirkey