Skip to content

Commit

Permalink
use libtool for building
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Thurston committed Jul 19, 2016
1 parent 2297aa2 commit a085d81
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 14 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
/config.h
/config.cache
/config.status
/config.guess
/config.sub
/ltmain.sh
/Makefile
/Makefile.in
/configure
Expand All @@ -12,6 +15,7 @@
/aclocal.m4
/autom4te.cache
/compile
/libtool

/build

Expand Down
1 change: 1 addition & 0 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

set -x

libtoolize --copy --force
aclocal
autoheader
automake --foreign --add-missing
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ AC_PROG_CC
AC_PROG_CXX
AC_CHECK_TOOL(AR, ar)
AC_PROG_RANLIB
AC_PROG_LIBTOOL

dnl Set test on c++ compiler.
AC_LANG_CPLUSPLUS
Expand Down
7 changes: 5 additions & 2 deletions src/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
/rlhc
/rlhc.c

/*.lo

# Parsing
/if.h
/if.cc
Expand Down Expand Up @@ -43,5 +45,6 @@
/util.cmi
/util.cmx

/libragel.a
/libfsm.a
/libragel.la
/libfsm.la
/.libs
24 changes: 12 additions & 12 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ RAGEL = @RAGEL@
# Libfsm contains only the FSM construction code and the backend code
# generators. It is useful for building code generators in programs not
# connected to the ragel language.
lib_LIBRARIES = libfsm.a
lib_LTLIBRARIES = libfsm.la

if BUILD_PROGRAM

bin_PROGRAMS = ragel

# Libragel includes the ragel parsers. It is the programm wrapped up with a
# libragel call in place of main.
lib_LIBRARIES += libragel.a
lib_LTLIBRARIES += libragel.la

endif

Expand Down Expand Up @@ -66,13 +66,13 @@ version.h: Makefile
echo '#define VERSION "$(PACKAGE_VERSION)"' > version.h
echo '#define PUBDATE "$(PUBDATE)"' >> version.h

nodist_libragel_a_SOURCES = $(nodist_ragel_SOURCES)
libragel_a_SOURCES = $(ragel_SOURCES)
libragel_a_CPPFLAGS = -Dmain=main_lib -I$(top_srcdir)/aapl -DBINDIR='"@bindir@"'
nodist_libragel_la_SOURCES = $(nodist_ragel_SOURCES)
libragel_la_SOURCES = $(ragel_SOURCES)
libragel_la_CPPFLAGS = -Dmain=main_lib -I$(top_srcdir)/aapl -DBINDIR='"@bindir@"'

nodist_libfsm_a_SOURCES = version.h
libfsm_a_SOURCES = $(LIBFSM_SRC)
libfsm_a_CPPFLAGS = -I$(top_srcdir)/aapl
nodist_libfsm_la_SOURCES = version.h
libfsm_la_SOURCES = $(LIBFSM_SRC)
libfsm_la_CPPFLAGS = -I$(top_srcdir)/aapl

EXTRA_DIST = \
ragel.lm \
Expand Down Expand Up @@ -123,10 +123,10 @@ ragel-load.$(OBJEXT): parse.c
ragel-commit.$(OBJEXT): parse.c
ragel-reducer.$(OBJEXT): parse.c

libragel_a-if.$(OBJEXT): parse.c
libragel_a-load.$(OBJEXT): parse.c
libragel_a-commit.$(OBJEXT): parse.c
libragel_a-reducer.$(OBJEXT): parse.c
libragel_la-if.$(OBJEXT): parse.c
libragel_la-load.$(OBJEXT): parse.c
libragel_la-commit.$(OBJEXT): parse.c
libragel_la-reducer.$(OBJEXT): parse.c

RLHC = \
rlhc-host.lm \
Expand Down

0 comments on commit a085d81

Please sign in to comment.