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,6 +24,23 @@ | ||
24 | # erico.mendonca@gmail.com (Erico Mascarenhas de Mendonça) | 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 | #---[ Library configuration ]------------------------------------------------------------ | 44 | #---[ Library configuration ]------------------------------------------------------------ |
28 | 45 | ||
29 | SONAME=@SONAME@ | 46 | SONAME=@SONAME@ |
@@ -35,22 +52,22 @@ INSTALL_PACKAGES=@INSTALL_PACKAGES@ | @@ -35,22 +52,22 @@ INSTALL_PACKAGES=@INSTALL_PACKAGES@ | ||
35 | NETWORK_MODULES=default openssl | 52 | NETWORK_MODULES=default openssl |
36 | 53 | ||
37 | SOURCES= \ | 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 | TEST_SOURCES= \ | 69 | TEST_SOURCES= \ |
53 | - $(wildcard src/testprogram/*.c) | 70 | + $(wildcard $(srcdir)/src/testprogram/*.c) |
54 | 71 | ||
55 | #---[ Tools ]---------------------------------------------------------------------------- | 72 | #---[ Tools ]---------------------------------------------------------------------------- |
56 | 73 | ||
@@ -72,47 +89,28 @@ DOXYGEN=@DOXYGEN@ | @@ -72,47 +89,28 @@ DOXYGEN=@DOXYGEN@ | ||
72 | DLLTOOL=@DLLTOOL@ | 89 | DLLTOOL=@DLLTOOL@ |
73 | STRIP=@STRIP@ | 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 | OBJDBG=$(OBJDIR)/Debug | 99 | OBJDBG=$(OBJDIR)/Debug |
96 | OBJRLS=$(OBJDIR)/Release | 100 | OBJRLS=$(OBJDIR)/Release |
97 | 101 | ||
98 | -BINDIR=$(BASEDIR)/.bin | 102 | +BINDIR=$(BUILDDIR)/.bin |
99 | BINDBG=$(BINDIR)/Debug | 103 | BINDBG=$(BINDIR)/Debug |
100 | BINRLS=$(BINDIR)/Release | 104 | BINRLS=$(BINDIR)/Release |
101 | 105 | ||
102 | #---[ Rules ]---------------------------------------------------------------------------- | 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 | CFLAGS= \ | 108 | CFLAGS= \ |
112 | @CFLAGS@ \ | 109 | @CFLAGS@ \ |
113 | -g \ | 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 | @LIBSSL_CFLAGS@ \ | 114 | @LIBSSL_CFLAGS@ \ |
117 | @LDAP_CFLAGS@ \ | 115 | @LDAP_CFLAGS@ \ |
118 | @LIBCURL_CFLAGS@ | 116 | @LIBCURL_CFLAGS@ |
@@ -131,9 +129,8 @@ LIBS= \ | @@ -131,9 +129,8 @@ LIBS= \ | ||
131 | #---[ Debug Rules ]---------------------------------------------------------------------- | 129 | #---[ Debug Rules ]---------------------------------------------------------------------- |
132 | 130 | ||
133 | $(OBJDBG)/%.o: \ | 131 | $(OBJDBG)/%.o: \ |
134 | - %.c \ | ||
135 | - $(DEPENDS) | ||
136 | - | 132 | + %.c |
133 | + | ||
137 | @echo $< ... | 134 | @echo $< ... |
138 | @$(MKDIR) $(dir $@) | 135 | @$(MKDIR) $(dir $@) |
139 | 136 | ||
@@ -158,8 +155,7 @@ $(OBJDBG)/%.o: \ | @@ -158,8 +155,7 @@ $(OBJDBG)/%.o: \ | ||
158 | #---[ Release Rules ]-------------------------------------------------------------------- | 155 | #---[ Release Rules ]-------------------------------------------------------------------- |
159 | 156 | ||
160 | $(OBJRLS)/%.o: \ | 157 | $(OBJRLS)/%.o: \ |
161 | - %.c \ | ||
162 | - $(DEPENDS) | 158 | + %.c |
163 | 159 | ||
164 | @echo $< ... | 160 | @echo $< ... |
165 | @$(MKDIR) $(dir $@) | 161 | @$(MKDIR) $(dir $@) |
@@ -232,7 +228,7 @@ all-windows: \ | @@ -232,7 +228,7 @@ all-windows: \ | ||
232 | 228 | ||
233 | @$(INSTALL_DATA) \ | 229 | @$(INSTALL_DATA) \ |
234 | $(BINRLS)/$(LIBNAME).def \ | 230 | $(BINRLS)/$(LIBNAME).def \ |
235 | - $(BASEDIR)/win | 231 | + $(BUILDDIR)/win |
236 | 232 | ||
237 | all-linux: \ | 233 | all-linux: \ |
238 | $(BINRLS)/$(SONAME) \ | 234 | $(BINRLS)/$(SONAME) \ |
@@ -441,9 +437,9 @@ install-windows-dev: \ | @@ -441,9 +437,9 @@ install-windows-dev: \ | ||
441 | 437 | ||
442 | #---[ Misc Targets ]--------------------------------------------------------------------- | 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 | @$(MKDIR) $(dir $@) | 444 | @$(MKDIR) $(dir $@) |
449 | @$(MKDIR) $(BINDIR) | 445 | @$(MKDIR) $(BINDIR) |
@@ -452,12 +448,12 @@ $(BASEDIR)/.tmp/$(LIBNAME)/fallbacks.c: \ | @@ -452,12 +448,12 @@ $(BASEDIR)/.tmp/$(LIBNAME)/fallbacks.c: \ | ||
452 | 448 | ||
453 | @$(HOST_CC) \ | 449 | @$(HOST_CC) \ |
454 | -g \ | 450 | -g \ |
455 | - -I$(BASEDIR)/src/include \ | 451 | + -Isrc/include \ |
456 | -o $(BINDIR)/mkfb@EXEEXT@ \ | 452 | -o $(BINDIR)/mkfb@EXEEXT@ \ |
457 | - $(wildcard src/mkfb/*.c) | 453 | + $(wildcard $(srcdir)/src/mkfb/*.c) |
458 | 454 | ||
459 | @$(BINDIR)/mkfb@EXEEXT@ \ | 455 | @$(BINDIR)/mkfb@EXEEXT@ \ |
460 | - -c src/core/X3270.xad \ | 456 | + -c $(srcdir)/src/core/X3270.xad \ |
461 | $@ | 457 | $@ |
462 | 458 | ||
463 | locale/$(PACKAGE_NAME).pot: \ | 459 | locale/$(PACKAGE_NAME).pot: \ |
@@ -529,7 +525,7 @@ clean: \ | @@ -529,7 +525,7 @@ clean: \ | ||
529 | cleanDebug \ | 525 | cleanDebug \ |
530 | cleanRelease | 526 | cleanRelease |
531 | 527 | ||
532 | - @rm -fr $(BASEDIR)/.tmp/$(LIBNAME) | 528 | + @rm -fr $(BUILDDIR)/.tmp/$(LIBNAME) |
533 | @rm -fr $(POTDIR)/$(LIBNAME) | 529 | @rm -fr $(POTDIR)/$(LIBNAME) |
534 | @rm -f locale/*.pot | 530 | @rm -f locale/*.pot |
535 | 531 |
autogen.sh
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | +builddir=${PWD} | ||
4 | + | ||
3 | test -n "$srcdir" || srcdir=`dirname "$0"` | 5 | test -n "$srcdir" || srcdir=`dirname "$0"` |
4 | test -n "$srcdir" || srcdir=. | 6 | test -n "$srcdir" || srcdir=. |
5 | 7 | ||
@@ -45,7 +47,9 @@ automake --add-missing 2> /dev/null | true | @@ -45,7 +47,9 @@ automake --add-missing 2> /dev/null | true | ||
45 | 47 | ||
46 | autopoint | 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,7 +676,7 @@ dnl Directory config | ||
676 | dnl --------------------------------------------------------------------------- | 676 | dnl --------------------------------------------------------------------------- |
677 | 677 | ||
678 | AC_ARG_WITH([build-dir], [AS_HELP_STRING([--with-build-dir], [Setup build path])], [ app_cv_buildir="$withval" ],[ app_cv_buildir="$ac_pwd" ]) | 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 | dnl --------------------------------------------------------------------------- | 681 | dnl --------------------------------------------------------------------------- |
682 | dnl Configure which files to generate. | 682 | dnl Configure which files to generate. |