Copied from old documentation. Removed all Gedcom_val details.
[gedcom-parse.git] / gedcom / Makefile.am
index 7a46ae8bbe76d590a6280d4a89d7a4f0babd8dca..abbfe56d72ea9de8b76a91fbe74b2a5f3fa341a1 100644 (file)
@@ -5,11 +5,12 @@
 SUBDIRS = calendar .
 
 localedir = $(datadir)/locale
-INCLUDES = -I $(srcdir)/../intl -I $(srcdir)/../include -I $(srcdir)/calendar \
+INCLUDES = -I$(srcdir)/../intl -I$(srcdir)/../include -I$(srcdir)/calendar \
+           -I$(srcdir)/../utf8 \
            -DPKGDATADIR=\"$(pkgdatadir)\" -DLOCALEDIR=\"$(localedir)\"
 YFLAGS   = --debug --defines
 LFLAGS   = -8
-CFLAGS   = -g -O2 -W -Wall -pedantic -Wno-long-long
+CFLAGS   = -O2 -W -Wall -pedantic -Wno-long-long @EXTRA_CFLAGS@
 
 lib_LTLIBRARIES = libgedcom.la
 libgedcom_la_SOURCES = lex.gedcom_1byte_.c \
@@ -26,9 +27,12 @@ libgedcom_la_SOURCES = lex.gedcom_1byte_.c \
                       hash.c \
                       xref.c \
                       age.c \
-                      compat.c
-libgedcom_la_LDFLAGS = -export-dynamic -version-info $(LIBVERSION) $(LIBICONV)
-libgedcom_la_LIBADD  = calendar/libcalendar.la
+                      compat.c \
+                      buffer.c \
+                      write.c \
+                      encoding_state.c
+libgedcom_la_LDFLAGS = -export-dynamic -version-info $(LIBVERSION)
+libgedcom_la_LIBADD  = calendar/libcalendar.la @INTLLIBS@
 BUILT_SOURCES = lex.gedcom_1byte_.c \
                lex.gedcom_hilo_.c \
                lex.gedcom_lohi_.c \
@@ -38,7 +42,8 @@ BUILT_SOURCES = lex.gedcom_1byte_.c \
                gedcom.tabgen.h \
                gedcom_date.tab.c \
                gedcom_date.tab.h \
-               gedcom_date.tabgen.h
+               gedcom_date.tabgen.h \
+               tag_names.h
 noinst_HEADERS = encoding.h \
                 gedcom_internal.h \
                 interface.h \
@@ -47,14 +52,32 @@ noinst_HEADERS = encoding.h \
                 hash.h \
                 xref.h \
                 age.h \
-                compat.h
+                compat.h \
+                buffer.h \
+                tag_data.h \
+                encoding_state.h
 EXTRA_DIST = gedcom.y \
             gedcom_date.y \
             gedcom_1byte.lex \
             gedcom_hilo.lex \
             gedcom_lohi.lex \
             gedcom_date.lex \
-            gedcom_lex_common.c
+            gedcom_lex_common.c \
+            lex.gedcom_1byte_.c \
+            lex.gedcom_hilo_.c \
+            lex.gedcom_lohi_.c \
+            lex.gedcom_date_.c \
+            gedcom.tab.c \
+            gedcom_date.tab.c \
+            gedcom.tab.h \
+            gedcom_date.tab.h \
+             gedcom.tabgen.h \
+            gedcom_date.tabgen.h \
+            tag_names.h \
+            process_tags
+            $(BUILT_SOURCES)
+
+include $(top_srcdir)/Makefile.inc
 
 gedcom.tab.c gedcom.tab.h:     gedcom.y
        $(YACC) $(YFLAGS) --name-prefix=gedcom_ $<
@@ -74,6 +97,10 @@ lex.gedcom_lohi_.c:  gedcom_lohi.lex
 lex.gedcom_date_.c:    gedcom_date.lex
        $(LEX) $(LFLAGS) -Pgedcom_date_ $<
 
+tag_names.h:   $(srcdir)/gedcom.tabgen.h process_tags
+       srcdir=$(srcdir); export srcdir; \
+        perl $(srcdir)/process_tags
+
 lex.gedcom_1byte_.c:   gedcom.tabgen.h gedcom_lex_common.c
 lex.gedcom_hilo_.c:    gedcom.tabgen.h gedcom_lex_common.c
 lex.gedcom_lohi_.c:    gedcom.tabgen.h gedcom_lex_common.c
@@ -98,14 +125,3 @@ lex.gedcom_lohi_.test.o:    lex.gedcom_lohi_.c
 
 clean-local:
        rm -f $(EXTRA_PROGRAMS)
-
-%.tabgen.h:    %.tab.h
-       if [ ! -r $(srcdir)/$@ ] ; \
-       then \
-         touch $(srcdir)/$@; \
-       fi
-       if ! diff -q $< $(srcdir)/$@ > /dev/null; \
-       then \
-         rm $(srcdir)/$@; \
-         cp $(srcdir)/$< $(srcdir)/$@; \
-       fi