Поскольку пакет Gambas поддержан инструментом automake
, вы должны определить Makefile.am
файл, который
объясняет, как компилировать компонент, и что устанавливать.
Чтобы получить инофрмацию об automake
, вы можете
просмотреть информацию по руководству в вашей Linux коробке или купить
книгу, как сделал я. Я купил GNU AUTOCONF, AUTOMAKE, and
LIBTOOL , New Riders Publishing , написанную
авторами этих GNU инструментов. Эта книга, хотя и не полная, помогла
мне много в использовании мощных, но неясных GNU инструментов.
Вот, например, модифицированный Makefile.am
файл,
который пришел из исоходников gb.db
компонента :
## If the component directory has subdirectories, put them here
SUBDIRS = ...
## The component description file has to be distributed
EXTRA_DIST = *.component
## This is necessary to have gambas.h and other useful include files in the path
INCLUDES = -I$(top_srcdir)/src/share
## The component file name
lib_LTLIBRARIES = lib.gb.db.la
## Put there the shared library you need to link with the component.
lib_gb_la_LIBADD = ...
## The source files and header files of the component
lib_gb_db_la_SOURCES = \
gb.db.h main.h main.c \
CDatabase.h CDatabase.c \
CTable.h CTable.c \
CResult.h CResult.c
## Tells automake how to install the component description file
install-exec-local:
@cp -f *.component $(libdir)
## Of course, you can put every specific rule you need to compile your component