forked from enlightenment/efl
* fix compilation on Windows when using amalgamation
* put alloca declaration at the beginning SVN revision: 42517
This commit is contained in:
parent
12788aff0b
commit
e2b34b41ee
|
@ -75,21 +75,41 @@ $(builddir)/ eina_amalgamation.c: $(sources_used) Makefile
|
|||
|
||||
@echo "#ifndef _WIN32" >> $(builddir)/eina_amalgamation.c
|
||||
@echo "#define _GNU_SOURCE" >> $(builddir)/eina_amalgamation.c
|
||||
@echo "#endif" >> $(builddir)/eina_amalgamation.c
|
||||
|
||||
@echo "#ifdef HAVE_ALLOCA_H" >> $(builddir)/eina_amalgamation.c
|
||||
@echo "# include <alloca.h>" >> $(builddir)/eina_amalgamation.c
|
||||
@echo "#elif defined __GNUC__" >> $(builddir)/eina_amalgamation.c
|
||||
@echo "# define alloca __builtin_alloca" >> $(builddir)/eina_amalgamation.c
|
||||
@echo "#elif defined _AIX" >> $(builddir)/eina_amalgamation.c
|
||||
@echo "# define alloca __alloca" >> $(builddir)/eina_amalgamation.c
|
||||
@echo "#elif defined _MSC_VER" >> $(builddir)/eina_amalgamation.c
|
||||
@echo "# include <malloc.h>" >> $(builddir)/eina_amalgamation.c
|
||||
@echo "# define alloca _alloca" >> $(builddir)/eina_amalgamation.c
|
||||
@echo "#else" >> $(builddir)/eina_amalgamation.c
|
||||
@echo "# include <stddef.h>" >> $(builddir)/eina_amalgamation.c
|
||||
@echo "# ifdef __cplusplus" >> $(builddir)/eina_amalgamation.c
|
||||
@echo "#extern \"C\"" >> $(builddir)/eina_amalgamation.c
|
||||
@echo "# endif" >> $(builddir)/eina_amalgamation.c
|
||||
@echo "#void *alloca (size_t);" >> $(builddir)/eina_amalgamation.c
|
||||
@echo "#endif" >> $(builddir)/eina_amalgamation.c
|
||||
|
||||
@echo "#include <stdio.h>" >> $(builddir)/eina_amalgamation.c
|
||||
@echo "#include <stdlib.h>" >> $(builddir)/eina_amalgamation.c
|
||||
@echo "#include <string.h>" >> $(builddir)/eina_amalgamation.c
|
||||
@echo "#include <dlfcn.h>" >> $(builddir)/eina_amalgamation.c
|
||||
@echo "#include <sys/types.h>" >> $(builddir)/eina_amalgamation.c
|
||||
@echo "#include <dirent.h>" >> $(builddir)/eina_amalgamation.c
|
||||
|
||||
@echo "#ifdef HAVE_EVIL" >> $(builddir)/eina_amalgamation.c
|
||||
@echo "# include <Evil.h>" >> $(builddir)/eina_amalgamation.c
|
||||
@echo "#endif" >> $(builddir)/eina_amalgamation.c
|
||||
@echo "#endif" >> $(builddir)/eina_amalgamation.c
|
||||
|
||||
@echo "#include \"eina_config.h\"" >> $(builddir)/eina_amalgamation.c
|
||||
@echo "#include \"eina_private.h\"" >> $(builddir)/eina_amalgamation.c
|
||||
@echo "#include \"eina_safety_checks.h\"" >> $(builddir)/eina_amalgamation.c
|
||||
@echo "#include \"Eina.h\"" >> $(builddir)/eina_amalgamation.c
|
||||
|
||||
@echo "#include <stdio.h>" >> $(builddir)/eina_amalgamation.c
|
||||
@echo "#include <stdlib.h>" >> $(builddir)/eina_amalgamation.c
|
||||
@echo "#include <string.h>" >> $(builddir)/eina_amalgamation.c
|
||||
|
||||
@for f in $(sources_used); do \
|
||||
if [ `expr substr $$f 1 1` != '/' ]; then \
|
||||
file="$(srcdir)/$$f" ; \
|
||||
|
@ -97,7 +117,7 @@ $(builddir)/ eina_amalgamation.c: $(sources_used) Makefile
|
|||
file="$$f" ; \
|
||||
fi ; \
|
||||
echo "/* file: $$file */" >> $(builddir)/eina_amalgamation.c; \
|
||||
grep -v -e '^# *include \+.\(config\|eina_[a-z_]\+\|Evil\|stdio\|stdlib\|string\)[.]h.*' $$file >> $(builddir)/eina_amalgamation.c; \
|
||||
grep -v -e '^# *include \+.\(config\|eina_[a-z_]\+\|Evil\|stdio\|stdlib\|string\|dlfcn\)[.]h.*' $$file >> $(builddir)/eina_amalgamation.c; \
|
||||
done
|
||||
@echo "eina_amalgamation.c generated"
|
||||
|
||||
|
|
Loading…
Reference in New Issue