]> granicus.if.org Git - yasm/commitdiff
Move yasm core files into a libyasm shared library (avoiding backlinking).
authorPeter Johnson <peter@tortall.net>
Mon, 23 Sep 2002 06:16:59 +0000 (06:16 -0000)
committerPeter Johnson <peter@tortall.net>
Mon, 23 Sep 2002 06:16:59 +0000 (06:16 -0000)
Some cleanups still needed; a few things in globals should really be somewhere
else, or named differently.

svn path=/trunk/yasm/; revision=705

Makefile.am
frontends/yasm/Makefile.inc
libyasm/Makefile.inc
libyasm/tests/Makefile.inc
modules/Makefile.inc
modules/objfmts/bin/Makefile.inc
modules/objfmts/dbg/Makefile.inc
src/Makefile.inc
src/objfmts/bin/Makefile.inc
src/objfmts/dbg/Makefile.inc
src/tests/Makefile.inc

index 51adcf7abbd702d785e73c5019b5721344a38860..3e835203faeab36d5be74c25161a92e92f61f9da 100644 (file)
@@ -1,6 +1,6 @@
 # $IdPath$
 
-SUBDIRS = libltdl m4 po
+SUBDIRS = libltdl m4 po .
 
 CFLAGS = @ANSI_CFLAGS@
 AM_YFLAGS = -d
@@ -15,10 +15,10 @@ TESTS =
 noinst_PROGRAMS =
 
 yasm_SOURCES =
-yasm_LDFLAGS = -export-dynamic
-yasm_LDADD = @LIBLTDL@ @LIBOBJS@ $(INTLLIBS) @LIBADD_DL@
+yasm_LDFLAGS =
+yasm_LDADD = libyasm.la @LIBLTDL@ @LIBOBJS@ $(INTLLIBS) @LIBADD_DL@
 
-lib_LTLIBRARIES =
+lib_LTLIBRARIES = libyasm.la
 BUILT_SOURCES =
 # configure.lineno doesn't clean up after itself?
 CLEANFILES = configure.lineno
index 32a54f5e4056b82ee7fc1897886580da983b8047..bfaae450009e54687b68c80b2a0db8c56aecebbf 100644 (file)
@@ -1,9 +1,11 @@
 # $IdPath$
 
-YASMBASEFILES = \
+libyasm_la_SOURCES = \
        src/bytecode.c          \
        src/bytecode.h          \
        src/bc-int.h            \
+       src/errwarn.c           \
+       src/errwarn.h           \
        src/expr.c              \
        src/expr.h              \
        src/expr-int.h          \
@@ -19,13 +21,10 @@ YASMBASEFILES = \
        src/section.h           \
        src/arch.c              \
        src/arch.h              \
-       src/objfmt.c            \
        src/objfmt.h            \
-       src/preproc.c           \
-       src/preproc.h           \
-       src/parser.c            \
-       src/parser.h            \
        src/optimizer.h         \
+       src/parser.h            \
+       src/preproc.h           \
        src/intnum.c            \
        src/intnum.h            \
        src/floatnum.c          \
@@ -42,11 +41,11 @@ YASMBASEFILES = \
 
 yasm_SOURCES += \
        src/main.c              \
-       src/errwarn.c           \
-       src/errwarn.h           \
        src/options.c           \
        src/options.h           \
-       $(YASMBASEFILES)
+       src/objfmt.c            \
+       src/preproc.c           \
+       src/parser.c
 
 
 EXTRA_DIST += \
index 32a54f5e4056b82ee7fc1897886580da983b8047..bfaae450009e54687b68c80b2a0db8c56aecebbf 100644 (file)
@@ -1,9 +1,11 @@
 # $IdPath$
 
-YASMBASEFILES = \
+libyasm_la_SOURCES = \
        src/bytecode.c          \
        src/bytecode.h          \
        src/bc-int.h            \
+       src/errwarn.c           \
+       src/errwarn.h           \
        src/expr.c              \
        src/expr.h              \
        src/expr-int.h          \
@@ -19,13 +21,10 @@ YASMBASEFILES = \
        src/section.h           \
        src/arch.c              \
        src/arch.h              \
-       src/objfmt.c            \
        src/objfmt.h            \
-       src/preproc.c           \
-       src/preproc.h           \
-       src/parser.c            \
-       src/parser.h            \
        src/optimizer.h         \
+       src/parser.h            \
+       src/preproc.h           \
        src/intnum.c            \
        src/intnum.h            \
        src/floatnum.c          \
@@ -42,11 +41,11 @@ YASMBASEFILES = \
 
 yasm_SOURCES += \
        src/main.c              \
-       src/errwarn.c           \
-       src/errwarn.h           \
        src/options.c           \
        src/options.h           \
-       $(YASMBASEFILES)
+       src/objfmt.c            \
+       src/preproc.c           \
+       src/parser.c
 
 
 EXTRA_DIST += \
index 43ca0c14613646714ec74c2054a2ea1fe04db9d3..51c444689963d813c88346922baeda1fdaebeda9 100644 (file)
@@ -10,51 +10,39 @@ noinst_PROGRAMS += \
 
 bitvect_test_SOURCES = \
        src/tests/bitvect_test.c        \
-       src/errwarn.c                   \
-       $(YASMBASEFILES)                \
        $(YASMPARSERFILES)              \
        $(YASMPREPROCFILES)             \
        $(YASMOPTIMIZERFILES)           \
        $(YASMOBJFMTFILES)              \
        $(YASMARCHFILES)                \
        $(CHECKFILES)
-bitvect_test_LDFLAGS = -export-dynamic
-bitvect_test_LDADD = @LIBLTDL@ @LIBOBJS@ $(INTLLIBS) @LIBADD_DL@
+bitvect_test_LDFLAGS =
+bitvect_test_LDADD = libyasm.la @LIBLTDL@ @LIBOBJS@ $(INTLLIBS) @LIBADD_DL@
 
 #bytecode_test_SOURCES = \
 #      src/tests/bytecode_test.c       \
-#      src/errwarn.c                   \
-#      $(YASMBASEFILES)                \
 #      $(YASMPARSERFILES)              \
 #      $(YASMPREPROCFILES)             \
 #      $(YASMOPTIMIZERFILES)           \
 #      $(YASMOBJFMTFILES)              \
 #      $(YASMARCHFILES)                \
 #      $(CHECKFILES)
-#bytecode_test_LDFLAGS = -export-dynamic
-#bytecode_test_LDADD = @LIBLTDL@ @LIBOBJS@ $(INTLLIBS) @LIBADD_DL@
+#bytecode_test_LDFLAGS =
+#bytecode_test_LDADD = libyasm.la @LIBLTDL@ @LIBOBJS@ $(INTLLIBS) @LIBADD_DL@
 
 floatnum_test_SOURCES = \
        src/tests/floatnum_test.c       \
-       src/errwarn.c                   \
-       src/globals.c                   \
-       src/hamt.c                      \
-       src/bitvect.c                   \
-       src/xmalloc.c                   \
-       src/xstrdup.c                   \
        $(CHECKFILES)
-floatnum_test_LDFLAGS = -export-dynamic
-floatnum_test_LDADD = @LIBLTDL@ @LIBOBJS@ $(INTLLIBS) @LIBADD_DL@
+floatnum_test_LDFLAGS =
+floatnum_test_LDADD = libyasm.la @LIBLTDL@ @LIBOBJS@ $(INTLLIBS) @LIBADD_DL@
 
 #memexpr_test_SOURCES = \
 #      src/tests/memexpr_test.c        \
-#      src/errwarn.c                   \
-#      $(YASMBASEFILES)                \
 #      $(YASMPARSERFILES)              \
 #      $(YASMPREPROCFILES)             \
 #      $(YASMOPTIMIZERFILES)           \
 #      $(YASMOBJFMTFILES)              \
 #      $(YASMARCHFILES)                \
 #      $(CHECKFILES)
-#memexpr_test_LDFLAGS = -export-dynamic
-#memexpr_test_LDADD = @LIBLTDL@ @LIBOBJS@ $(INTLLIBS) @LIBADD_DL@
+#memexpr_test_LDFLAGS =
+#memexpr_test_LDADD = libyasm.la @LIBLTDL@ @LIBOBJS@ $(INTLLIBS) @LIBADD_DL@
index 32a54f5e4056b82ee7fc1897886580da983b8047..bfaae450009e54687b68c80b2a0db8c56aecebbf 100644 (file)
@@ -1,9 +1,11 @@
 # $IdPath$
 
-YASMBASEFILES = \
+libyasm_la_SOURCES = \
        src/bytecode.c          \
        src/bytecode.h          \
        src/bc-int.h            \
+       src/errwarn.c           \
+       src/errwarn.h           \
        src/expr.c              \
        src/expr.h              \
        src/expr-int.h          \
@@ -19,13 +21,10 @@ YASMBASEFILES = \
        src/section.h           \
        src/arch.c              \
        src/arch.h              \
-       src/objfmt.c            \
        src/objfmt.h            \
-       src/preproc.c           \
-       src/preproc.h           \
-       src/parser.c            \
-       src/parser.h            \
        src/optimizer.h         \
+       src/parser.h            \
+       src/preproc.h           \
        src/intnum.c            \
        src/intnum.h            \
        src/floatnum.c          \
@@ -42,11 +41,11 @@ YASMBASEFILES = \
 
 yasm_SOURCES += \
        src/main.c              \
-       src/errwarn.c           \
-       src/errwarn.h           \
        src/options.c           \
        src/options.h           \
-       $(YASMBASEFILES)
+       src/objfmt.c            \
+       src/preproc.c           \
+       src/parser.c
 
 
 EXTRA_DIST += \
index 88a027cd53d07721abbe7c6569def6c5fb8ca28b..271a4a8ce365fc2b2f624e8762934f28f7e0ffdd 100644 (file)
@@ -5,6 +5,7 @@ lib_LTLIBRARIES += yasm-bin.la
 yasm_bin_la_SOURCES = \
        src/objfmts/bin/bin-objfmt.c
 yasm_bin_la_LDFLAGS = -module
+yasm_bin_la_LDADD = libyasm.la
 yasm_LDADD += -dlopen yasm-bin.la
 
 EXTRA_DIST += \
index 1083df36651452626d189cd36c67c15ae6759aae..502c62924df49af618ca5efa34bd51fb825dc216 100644 (file)
@@ -5,4 +5,5 @@ lib_LTLIBRARIES += yasm-dbg.la
 yasm_dbg_la_SOURCES = \
        src/objfmts/dbg/dbg-objfmt.c
 yasm_dbg_la_LDFLAGS = -module
+yasm_dbg_la_LDADD = libyasm.la
 yasm_LDADD += -dlopen yasm-dbg.la
index 32a54f5e4056b82ee7fc1897886580da983b8047..bfaae450009e54687b68c80b2a0db8c56aecebbf 100644 (file)
@@ -1,9 +1,11 @@
 # $IdPath$
 
-YASMBASEFILES = \
+libyasm_la_SOURCES = \
        src/bytecode.c          \
        src/bytecode.h          \
        src/bc-int.h            \
+       src/errwarn.c           \
+       src/errwarn.h           \
        src/expr.c              \
        src/expr.h              \
        src/expr-int.h          \
@@ -19,13 +21,10 @@ YASMBASEFILES = \
        src/section.h           \
        src/arch.c              \
        src/arch.h              \
-       src/objfmt.c            \
        src/objfmt.h            \
-       src/preproc.c           \
-       src/preproc.h           \
-       src/parser.c            \
-       src/parser.h            \
        src/optimizer.h         \
+       src/parser.h            \
+       src/preproc.h           \
        src/intnum.c            \
        src/intnum.h            \
        src/floatnum.c          \
@@ -42,11 +41,11 @@ YASMBASEFILES = \
 
 yasm_SOURCES += \
        src/main.c              \
-       src/errwarn.c           \
-       src/errwarn.h           \
        src/options.c           \
        src/options.h           \
-       $(YASMBASEFILES)
+       src/objfmt.c            \
+       src/preproc.c           \
+       src/parser.c
 
 
 EXTRA_DIST += \
index 88a027cd53d07721abbe7c6569def6c5fb8ca28b..271a4a8ce365fc2b2f624e8762934f28f7e0ffdd 100644 (file)
@@ -5,6 +5,7 @@ lib_LTLIBRARIES += yasm-bin.la
 yasm_bin_la_SOURCES = \
        src/objfmts/bin/bin-objfmt.c
 yasm_bin_la_LDFLAGS = -module
+yasm_bin_la_LDADD = libyasm.la
 yasm_LDADD += -dlopen yasm-bin.la
 
 EXTRA_DIST += \
index 1083df36651452626d189cd36c67c15ae6759aae..502c62924df49af618ca5efa34bd51fb825dc216 100644 (file)
@@ -5,4 +5,5 @@ lib_LTLIBRARIES += yasm-dbg.la
 yasm_dbg_la_SOURCES = \
        src/objfmts/dbg/dbg-objfmt.c
 yasm_dbg_la_LDFLAGS = -module
+yasm_dbg_la_LDADD = libyasm.la
 yasm_LDADD += -dlopen yasm-dbg.la
index 43ca0c14613646714ec74c2054a2ea1fe04db9d3..51c444689963d813c88346922baeda1fdaebeda9 100644 (file)
@@ -10,51 +10,39 @@ noinst_PROGRAMS += \
 
 bitvect_test_SOURCES = \
        src/tests/bitvect_test.c        \
-       src/errwarn.c                   \
-       $(YASMBASEFILES)                \
        $(YASMPARSERFILES)              \
        $(YASMPREPROCFILES)             \
        $(YASMOPTIMIZERFILES)           \
        $(YASMOBJFMTFILES)              \
        $(YASMARCHFILES)                \
        $(CHECKFILES)
-bitvect_test_LDFLAGS = -export-dynamic
-bitvect_test_LDADD = @LIBLTDL@ @LIBOBJS@ $(INTLLIBS) @LIBADD_DL@
+bitvect_test_LDFLAGS =
+bitvect_test_LDADD = libyasm.la @LIBLTDL@ @LIBOBJS@ $(INTLLIBS) @LIBADD_DL@
 
 #bytecode_test_SOURCES = \
 #      src/tests/bytecode_test.c       \
-#      src/errwarn.c                   \
-#      $(YASMBASEFILES)                \
 #      $(YASMPARSERFILES)              \
 #      $(YASMPREPROCFILES)             \
 #      $(YASMOPTIMIZERFILES)           \
 #      $(YASMOBJFMTFILES)              \
 #      $(YASMARCHFILES)                \
 #      $(CHECKFILES)
-#bytecode_test_LDFLAGS = -export-dynamic
-#bytecode_test_LDADD = @LIBLTDL@ @LIBOBJS@ $(INTLLIBS) @LIBADD_DL@
+#bytecode_test_LDFLAGS =
+#bytecode_test_LDADD = libyasm.la @LIBLTDL@ @LIBOBJS@ $(INTLLIBS) @LIBADD_DL@
 
 floatnum_test_SOURCES = \
        src/tests/floatnum_test.c       \
-       src/errwarn.c                   \
-       src/globals.c                   \
-       src/hamt.c                      \
-       src/bitvect.c                   \
-       src/xmalloc.c                   \
-       src/xstrdup.c                   \
        $(CHECKFILES)
-floatnum_test_LDFLAGS = -export-dynamic
-floatnum_test_LDADD = @LIBLTDL@ @LIBOBJS@ $(INTLLIBS) @LIBADD_DL@
+floatnum_test_LDFLAGS =
+floatnum_test_LDADD = libyasm.la @LIBLTDL@ @LIBOBJS@ $(INTLLIBS) @LIBADD_DL@
 
 #memexpr_test_SOURCES = \
 #      src/tests/memexpr_test.c        \
-#      src/errwarn.c                   \
-#      $(YASMBASEFILES)                \
 #      $(YASMPARSERFILES)              \
 #      $(YASMPREPROCFILES)             \
 #      $(YASMOPTIMIZERFILES)           \
 #      $(YASMOBJFMTFILES)              \
 #      $(YASMARCHFILES)                \
 #      $(CHECKFILES)
-#memexpr_test_LDFLAGS = -export-dynamic
-#memexpr_test_LDADD = @LIBLTDL@ @LIBOBJS@ $(INTLLIBS) @LIBADD_DL@
+#memexpr_test_LDFLAGS =
+#memexpr_test_LDADD = libyasm.la @LIBLTDL@ @LIBOBJS@ $(INTLLIBS) @LIBADD_DL@