aboutsummaryrefslogtreecommitdiffstats
path: root/src/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'src/Makefile.am')
-rw-r--r--src/Makefile.am44
1 files changed, 31 insertions, 13 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 74d89be..51b2ea9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -30,7 +30,15 @@ extra_cppflags =
endif
localedir = $(datadir)/locale
+
bin_PROGRAMS = gpg-error
+
+if HAVE_W32_SYSTEM
+noinst_PROGRAMS = gen-w32-lock-obj
+else
+noinst_PROGRAMS = gen-posix-lock-obj
+endif
+
lib_LTLIBRARIES = libgpg-error.la
include_HEADERS = gpg-error.h
bin_SCRIPTS = gpg-error-config
@@ -42,7 +50,8 @@ EXTRA_DIST = mkstrtable.awk err-sources.h.in err-codes.h.in \
mkerrcodes.awk mkerrcodes1.awk mkerrcodes2.awk mkerrcodes.c \
mkheader.c gpg-error.h.in mkw32errmap.c w32-add.h w32ce-add.h \
err-sources.h err-codes.h gpg-error-config.in gpg-error.m4 \
- gpg-error.def.in versioninfo.rc.in
+ gpg-error.def.in versioninfo.rc.in \
+ w32-lock-obj-pub.in
BUILT_SOURCES = err-sources.h err-codes.h code-to-errno.h code-from-errno.h \
err-sources-sym.h err-codes-sym.h errnos-sym.h gpg-error.h \
@@ -53,11 +62,10 @@ tmp_files = _mkerrcodes.h _gpg-error.def.h mkw32errmap.tab.h mkw32errmap.map.c
CLEANFILES = err-sources.h err-codes.h code-to-errno.h code-from-errno.h \
gpg-error.h mkerrcodes mkerrcodes.h gpg-error.def mkw32errmap.tab.h \
mkw32errmap.map.c err-sources-sym.h err-codes-sym.h errnos-sym.h \
- gpg-extra/errno.h mkheader $(tmp_files)
+ gpg-extra/errno.h mkheader $(tmp_files) posix-lock-obj-pub.in
if HAVE_W32_SYSTEM
-arch_sources = w32-gettext.c
-
+arch_sources = w32-gettext.c w32-lock.c w32-lock-obj.h w32-thread.c
RCCOMPILE = $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
-DLOCALEDIR=\"$(localedir)\" $(AM_CPPFLAGS) $(CPPFLAGS)
LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RCCOMPILE)
@@ -82,7 +90,7 @@ libgpg_error_la_DEPENDENCIES = $(gpg_error_res) gpg-error.def
intllibs =
else
-arch_sources =
+arch_sources = posix-lock.c posix-lock-obj.h posix-thread.c
gpg_error_res =
no_undefined =
export_symbols =
@@ -98,17 +106,22 @@ libgpg_error_la_LDFLAGS = -version-info \
@LIBGPG_ERROR_LT_CURRENT@:@LIBGPG_ERROR_LT_REVISION@:@LIBGPG_ERROR_LT_AGE@ \
$(no_undefined) $(export_symbols)
-parts_of_gpg_error_h = \
- gpg-error.h.in \
- err-sources.h.in \
- err-codes.h.in \
- errnos.in \
- w32-add.h \
- w32ce-add.h
+parts_of_gpg_error_h = \
+ gpg-error.h.in \
+ err-sources.h.in \
+ err-codes.h.in \
+ errnos.in \
+ w32-add.h \
+ w32ce-add.h \
+ w32-lock-obj-pub.in
+
+if ! HAVE_W32_SYSTEM
+parts_of_gpg_error_h += posix-lock-obj-pub.in
+endif
libgpg_error_la_SOURCES = gpg-error.h gettext.h $(arch_sources) \
- init.c init.h version.c \
+ init.c init.h version.c lock.h thread.h \
strsource.c strerror.c code-to-errno.c code-from-errno.c
# Note that RCCOMPILE needs the same defines as ..._la_CPPFLAGS but
@@ -195,9 +208,14 @@ errnos-sym.h: Makefile mkstrtable.awk errnos.in
-v prefix=GPG_ERR_ -v namespace=errnos_ \
$(srcdir)/errnos.in >$@
+
mkheader: mkheader.c Makefile
$(CC_FOR_BUILD) -g -O0 -I. -I$(srcdir) -o $@ $(srcdir)/mkheader.c
+
+posix-lock-obj-pub.in: Makefile gen-posix-lock-obj posix-lock-obj.h
+ ./gen-posix-lock-obj >$@
+
# We also depend on versioninfo.rc because that is build by
# config.status and thus has up-to-date version numbers.
gpg-error.h: Makefile mkheader $(parts_of_gpg_error_h) versioninfo.rc