Commit dc1bb2af24f185565b066d6918bb9b839a9d49cb
Exists in
master
and in
2 other branches
Merge branch 'develop' into macos
Showing
3 changed files
with
56 additions
and
56 deletions
Show diff stats
Makefile.in
| ... | ... | @@ -24,6 +24,23 @@ |
| 24 | 24 | # erico.mendonca@gmail.com (Erico Mascarenhas de Mendonça) |
| 25 | 25 | # |
| 26 | 26 | |
| 27 | +#---[ Paths ]---------------------------------------------------------------------------- | |
| 28 | + | |
| 29 | +prefix=@prefix@ | |
| 30 | +exec_prefix=@exec_prefix@ | |
| 31 | +srcdir=@srcdir@ | |
| 32 | +bindir=@bindir@ | |
| 33 | +srcdir=@srcdir@ | |
| 34 | +sbindir=@sbindir@ | |
| 35 | +libdir=@libdir@ | |
| 36 | +includedir=@includedir@ | |
| 37 | +datarootdir=@datarootdir@ | |
| 38 | +localedir=@localedir@ | |
| 39 | +docdir=@docdir@ | |
| 40 | +sysconfdir=@sysconfdir@ | |
| 41 | +datadir=$(datarootdir)/$(PRODUCT_NAME) | |
| 42 | +confdir=$(sysconfdir)/$(PRODUCT_NAME) | |
| 43 | + | |
| 27 | 44 | #---[ Library configuration ]------------------------------------------------------------ |
| 28 | 45 | |
| 29 | 46 | SONAME=@SONAME@ |
| ... | ... | @@ -35,22 +52,22 @@ INSTALL_PACKAGES=@INSTALL_PACKAGES@ |
| 35 | 52 | NETWORK_MODULES=default openssl |
| 36 | 53 | |
| 37 | 54 | SOURCES= \ |
| 38 | - $(wildcard src/core/*.c) \ | |
| 39 | - $(wildcard src/core/keyboard/*.c) \ | |
| 40 | - $(wildcard src/core/actions/*.c) \ | |
| 41 | - $(wildcard src/core/toggles/*.c) \ | |
| 42 | - $(wildcard src/core/charset/*.c) \ | |
| 43 | - $(wildcard src/core/ft/*.c) \ | |
| 44 | - $(wildcard src/core/@OSNAME@/*.rc) \ | |
| 45 | - $(wildcard src/core/@OSNAME@/*.c) \ | |
| 46 | - $(wildcard src/core/properties/*.c) \ | |
| 47 | - $(wildcard src/selection/*.c) \ | |
| 48 | - $(wildcard src/network_modules/*.c) \ | |
| 49 | - $(BASEDIR)/.tmp/$(LIBNAME)/fallbacks.c \ | |
| 50 | - $(foreach MODULE, $(NETWORK_MODULES), $(wildcard src/network_modules/$(MODULE)/*.c)) | |
| 55 | + $(wildcard $(srcdir)/src/core/*.c) \ | |
| 56 | + $(wildcard $(srcdir)/src/core/keyboard/*.c) \ | |
| 57 | + $(wildcard $(srcdir)/src/core/actions/*.c) \ | |
| 58 | + $(wildcard $(srcdir)/src/core/toggles/*.c) \ | |
| 59 | + $(wildcard $(srcdir)/src/core/charset/*.c) \ | |
| 60 | + $(wildcard $(srcdir)/src/core/ft/*.c) \ | |
| 61 | + $(wildcard $(srcdir)/src/core/@OSNAME@/*.rc) \ | |
| 62 | + $(wildcard $(srcdir)/src/core/@OSNAME@/*.c) \ | |
| 63 | + $(wildcard $(srcdir)/src/core/properties/*.c) \ | |
| 64 | + $(wildcard $(srcdir)/src/selection/*.c) \ | |
| 65 | + $(wildcard $(srcdir)/src/network_modules/*.c) \ | |
| 66 | + $(BUILDDIR)/.tmp/$(LIBNAME)/fallbacks.c \ | |
| 67 | + $(foreach MODULE, $(NETWORK_MODULES), $(wildcard $(srcdir)/src/network_modules/$(MODULE)/*.c)) | |
| 51 | 68 | |
| 52 | 69 | TEST_SOURCES= \ |
| 53 | - $(wildcard src/testprogram/*.c) | |
| 70 | + $(wildcard $(srcdir)/src/testprogram/*.c) | |
| 54 | 71 | |
| 55 | 72 | #---[ Tools ]---------------------------------------------------------------------------- |
| 56 | 73 | |
| ... | ... | @@ -72,47 +89,28 @@ DOXYGEN=@DOXYGEN@ |
| 72 | 89 | DLLTOOL=@DLLTOOL@ |
| 73 | 90 | STRIP=@STRIP@ |
| 74 | 91 | |
| 75 | -#---[ Paths ]---------------------------------------------------------------------------- | |
| 76 | - | |
| 77 | -prefix=@prefix@ | |
| 78 | -exec_prefix=@exec_prefix@ | |
| 79 | -bindir=@bindir@ | |
| 80 | -sbindir=@sbindir@ | |
| 81 | -libdir=@libdir@ | |
| 82 | -includedir=@includedir@ | |
| 83 | -datarootdir=@datarootdir@ | |
| 84 | -localedir=@localedir@ | |
| 85 | -docdir=@docdir@ | |
| 86 | -sysconfdir=@sysconfdir@ | |
| 87 | -datadir=$(datarootdir)/$(PRODUCT_NAME) | |
| 88 | -confdir=$(sysconfdir)/$(PRODUCT_NAME) | |
| 92 | +#---[ Build Paths ]---------------------------------------------------------------------- | |
| 89 | 93 | |
| 90 | -BASEDIR=@BASEDIR@ | |
| 94 | +BUILDDIR=@BUILDDIR@ | |
| 91 | 95 | |
| 92 | -POTDIR=$(BASEDIR)/.pot | |
| 96 | +POTDIR=$(BUILDDIR)/.pot | |
| 93 | 97 | |
| 94 | -OBJDIR=$(BASEDIR)/.obj | |
| 98 | +OBJDIR=$(BUILDDIR)/.obj | |
| 95 | 99 | OBJDBG=$(OBJDIR)/Debug |
| 96 | 100 | OBJRLS=$(OBJDIR)/Release |
| 97 | 101 | |
| 98 | -BINDIR=$(BASEDIR)/.bin | |
| 102 | +BINDIR=$(BUILDDIR)/.bin | |
| 99 | 103 | BINDBG=$(BINDIR)/Debug |
| 100 | 104 | BINRLS=$(BINDIR)/Release |
| 101 | 105 | |
| 102 | 106 | #---[ Rules ]---------------------------------------------------------------------------- |
| 103 | 107 | |
| 104 | -DEPENDS= \ | |
| 105 | - Makefile \ | |
| 106 | - src/include/*.h \ | |
| 107 | - src/include/lib3270/*.h \ | |
| 108 | - src/include/@OSNAME@/lib3270/*.h \ | |
| 109 | - $(BASEDIR)/src/include/lib3270/actions.h | |
| 110 | - | |
| 111 | 108 | CFLAGS= \ |
| 112 | 109 | @CFLAGS@ \ |
| 113 | 110 | -g \ |
| 114 | - -I$(BASEDIR)/src/include \ | |
| 115 | - -I$(BASEDIR)/src/include/@OSNAME@ \ | |
| 111 | + -Isrc/include \ | |
| 112 | + -I$(srcdir)/src/include \ | |
| 113 | + -I$(srcdir)/src/include/@OSNAME@ \ | |
| 116 | 114 | @LIBSSL_CFLAGS@ \ |
| 117 | 115 | @LDAP_CFLAGS@ \ |
| 118 | 116 | @LIBCURL_CFLAGS@ |
| ... | ... | @@ -131,9 +129,8 @@ LIBS= \ |
| 131 | 129 | #---[ Debug Rules ]---------------------------------------------------------------------- |
| 132 | 130 | |
| 133 | 131 | $(OBJDBG)/%.o: \ |
| 134 | - %.c \ | |
| 135 | - $(DEPENDS) | |
| 136 | - | |
| 132 | + %.c | |
| 133 | + | |
| 137 | 134 | @echo $< ... |
| 138 | 135 | @$(MKDIR) $(dir $@) |
| 139 | 136 | |
| ... | ... | @@ -158,8 +155,7 @@ $(OBJDBG)/%.o: \ |
| 158 | 155 | #---[ Release Rules ]-------------------------------------------------------------------- |
| 159 | 156 | |
| 160 | 157 | $(OBJRLS)/%.o: \ |
| 161 | - %.c \ | |
| 162 | - $(DEPENDS) | |
| 158 | + %.c | |
| 163 | 159 | |
| 164 | 160 | @echo $< ... |
| 165 | 161 | @$(MKDIR) $(dir $@) |
| ... | ... | @@ -232,7 +228,7 @@ all-windows: \ |
| 232 | 228 | |
| 233 | 229 | @$(INSTALL_DATA) \ |
| 234 | 230 | $(BINRLS)/$(LIBNAME).def \ |
| 235 | - $(BASEDIR)/win | |
| 231 | + $(BUILDDIR)/win | |
| 236 | 232 | |
| 237 | 233 | all-linux: \ |
| 238 | 234 | $(BINRLS)/$(SONAME) \ |
| ... | ... | @@ -441,9 +437,9 @@ install-windows-dev: \ |
| 441 | 437 | |
| 442 | 438 | #---[ Misc Targets ]--------------------------------------------------------------------- |
| 443 | 439 | |
| 444 | -$(BASEDIR)/.tmp/$(LIBNAME)/fallbacks.c: \ | |
| 445 | - src/core/X3270.xad \ | |
| 446 | - $(wildcard src/mkfb/*.c) | |
| 440 | +$(BUILDDIR)/.tmp/$(LIBNAME)/fallbacks.c: \ | |
| 441 | + $(srcdir)/src/core/X3270.xad \ | |
| 442 | + $(wildcard $(srcdir)/src/mkfb/*.c) | |
| 447 | 443 | |
| 448 | 444 | @$(MKDIR) $(dir $@) |
| 449 | 445 | @$(MKDIR) $(BINDIR) |
| ... | ... | @@ -452,12 +448,12 @@ $(BASEDIR)/.tmp/$(LIBNAME)/fallbacks.c: \ |
| 452 | 448 | |
| 453 | 449 | @$(HOST_CC) \ |
| 454 | 450 | -g \ |
| 455 | - -I$(BASEDIR)/src/include \ | |
| 451 | + -Isrc/include \ | |
| 456 | 452 | -o $(BINDIR)/mkfb@EXEEXT@ \ |
| 457 | - $(wildcard src/mkfb/*.c) | |
| 453 | + $(wildcard $(srcdir)/src/mkfb/*.c) | |
| 458 | 454 | |
| 459 | 455 | @$(BINDIR)/mkfb@EXEEXT@ \ |
| 460 | - -c src/core/X3270.xad \ | |
| 456 | + -c $(srcdir)/src/core/X3270.xad \ | |
| 461 | 457 | $@ |
| 462 | 458 | |
| 463 | 459 | locale/$(PACKAGE_NAME).pot: \ |
| ... | ... | @@ -529,7 +525,7 @@ clean: \ |
| 529 | 525 | cleanDebug \ |
| 530 | 526 | cleanRelease |
| 531 | 527 | |
| 532 | - @rm -fr $(BASEDIR)/.tmp/$(LIBNAME) | |
| 528 | + @rm -fr $(BUILDDIR)/.tmp/$(LIBNAME) | |
| 533 | 529 | @rm -fr $(POTDIR)/$(LIBNAME) |
| 534 | 530 | @rm -f locale/*.pot |
| 535 | 531 | ... | ... |
autogen.sh
| 1 | 1 | #!/bin/bash |
| 2 | 2 | |
| 3 | +builddir=${PWD} | |
| 4 | + | |
| 3 | 5 | test -n "$srcdir" || srcdir=`dirname "$0"` |
| 4 | 6 | test -n "$srcdir" || srcdir=. |
| 5 | 7 | |
| ... | ... | @@ -45,7 +47,9 @@ automake --add-missing 2> /dev/null | true |
| 45 | 47 | |
| 46 | 48 | autopoint |
| 47 | 49 | |
| 48 | -test -n "$NOCONFIGURE" || "$srcdir/configure" $@ | |
| 50 | +cd "${builddir}" | |
| 51 | + | |
| 52 | +test -n "$NOCONFIGURE" || "$srcdir/configure" --srcdir=${srcdir} $@ | |
| 49 | 53 | |
| 50 | 54 | |
| 51 | 55 | ... | ... |
configure.ac
| ... | ... | @@ -676,7 +676,7 @@ dnl Directory config |
| 676 | 676 | dnl --------------------------------------------------------------------------- |
| 677 | 677 | |
| 678 | 678 | AC_ARG_WITH([build-dir], [AS_HELP_STRING([--with-build-dir], [Setup build path])], [ app_cv_buildir="$withval" ],[ app_cv_buildir="$ac_pwd" ]) |
| 679 | -AC_SUBST(BASEDIR,$app_cv_buildir) | |
| 679 | +AC_SUBST(BUILDDIR,$app_cv_buildir) | |
| 680 | 680 | |
| 681 | 681 | dnl --------------------------------------------------------------------------- |
| 682 | 682 | dnl Configure which files to generate. | ... | ... |