Hi I have two simple proposals for C target. 1. On windows you use pragmas to avoid unwanted compiler warnings Similar thing is doable on gcc too.
#pragma GCC diagnostic ignored "-Wunused-variable" Since gcc version 4.6 it is even possible to do this: #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-variable" #pragma GCC diagnostic pop 2. For those who prefer cmake build system over automake tools I attached build script for cmake. I offers same options as automake but is is easier to "nest" libantlr3c library inside some larger project. I was tested on Linux(Ubuntu 32bit/64bit) and also on 64bit Windows. Mingw build was not tested. Ivan
PROJECT(libantlr3c) OPTION(ANTLR3_NODEBUGGER "ANTLR debugger not required" ON) SET (VERSION "3.3") SET (PACKAGE_BUGREPORT "[email protected]") SET (PACKAGE ${CMAKE_PROJECT_NAME}) SET (PACKAGE_VERSION ${VERSION}) SET (PACKAGE_NAME ${CMAKE_PROJECT_NAME}) SET (PACKAGE_TARNAME ${CMAKE_PROJECT_NAME}) SET (PACKAGE_STRING "${CMAKE_PROJECT_NAME} ${VERSION}") CMAKE_MINIMUM_REQUIRED(VERSION 2.6) INCLUDE (CheckIncludeFiles) INCLUDE (CheckFunctionExists) CHECK_INCLUDE_FILES ( "arpa_nameser.h" HAVE_ARPA_NAMESER_H ) CHECK_INCLUDE_FILES ( "ctype.h" HAVE_CTYPE_H ) CHECK_INCLUDE_FILES ( "dlfcn.h" HAVE_DLFCN_H ) CHECK_INCLUDE_FILES ( "inttypes.h" HAVE_INTTYPES_H ) CHECK_INCLUDE_FILES ( "malloc.h" HAVE_MALLOC_H ) CHECK_INCLUDE_FILES ( "sys/malloc.h" HAVE_SYS_MALLOC_H ) CHECK_INCLUDE_FILES ( "memory.h" HAVE_MEMORY_H ) CHECK_INCLUDE_FILES ( "netdb.h" HAVE_NETDB_H ) CHECK_INCLUDE_FILES ( "netinet/in.h" HAVE_NETINET_IN_H ) CHECK_INCLUDE_FILES ( "netinet/tcp.h" HAVE_NETINET_TCP_H ) CHECK_INCLUDE_FILES ( "resolv.h" HAVE_RESOLV_H ) CHECK_INCLUDE_FILES ( "sys/resolv.h" HAVE_RESOLV_H ) CHECK_INCLUDE_FILES ( "socket.h" HAVE_SOCKET_H ) CHECK_INCLUDE_FILES ( "sys/socket.h" HAVE_SYS_SOCKET_H ) CHECK_INCLUDE_FILES ( "stdarg.h" HAVE_STDARG_H ) CHECK_INCLUDE_FILES ( "stdint.h" HAVE_STDINT_H ) CHECK_INCLUDE_FILES ( "stdlib.h" HAVE_STDLIB_H ) CHECK_INCLUDE_FILES ( "string.h" HAVE_STRING_H ) CHECK_INCLUDE_FILES ( "strings.h" HAVE_STRINGS_H ) CHECK_INCLUDE_FILES ( "sys/stat.h" HAVE_SYS_STAT_H ) CHECK_INCLUDE_FILES ( "sys/types.h" HAVE_SYS_TYPES_H ) CHECK_INCLUDE_FILES ( "unistd.h" HAVE_UNISTD_H ) CHECK_FUNCTION_EXISTS ( "accept" HAVE_ACCEPT ) CHECK_FUNCTION_EXISTS ( "memmove" HAVE_MEMMOVE ) CHECK_FUNCTION_EXISTS ( "memset" HAVE_MEMSET ) CHECK_FUNCTION_EXISTS ( "strdup" HAVE_STRDUP ) IF(CMAKE_SIZEOF_VOID_P EQUAL "8") SET(ANTLR3_USE_64BIT 1) ENDIF(CMAKE_SIZEOF_VOID_P EQUAL "8") CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/antlr3config.h.in.cmake ${CMAKE_CURRENT_BINARY_DIR}/antlr3config.h) set(ANTLR3_SRCS src/antlr3baserecognizer.c src/antlr3basetreeadaptor.c src/antlr3basetree.c src/antlr3bitset.c src/antlr3collections.c src/antlr3commontoken.c src/antlr3commontreeadaptor.c src/antlr3commontree.c src/antlr3commontreenodestream.c src/antlr3convertutf.c src/antlr3cyclicdfa.c src/antlr3debughandlers.c src/antlr3encodings.c src/antlr3exception.c src/antlr3filestream.c src/antlr3inputstream.c src/antlr3intstream.c src/antlr3lexer.c src/antlr3parser.c src/antlr3rewritestreams.c src/antlr3string.c src/antlr3tokenstream.c src/antlr3treeparser.c ) set(ANTLR3_HDRS include/antlr3baserecognizer.h include/antlr3basetreeadaptor.h include/antlr3basetree.h include/antlr3bitset.h include/antlr3collections.h include/antlr3commontoken.h include/antlr3commontreeadaptor.h include/antlr3commontree.h include/antlr3commontreenodestream.h include/antlr3convertutf.h include/antlr3cyclicdfa.h include/antlr3debugeventlistener.h include/antlr3defs.h include/antlr3encodings.h include/antlr3errors.h include/antlr3exception.h include/antlr3filestream.h include/antlr3.h include/antlr3input.h include/antlr3interfaces.h include/antlr3intstream.h include/antlr3lexer.h include/antlr3memory.h include/antlr3parser.h include/antlr3parsetree.h include/antlr3recognizersharedstate.h include/antlr3rewritestreams.h include/antlr3string.h include/antlr3tokenstream.h include/antlr3treeparser.h antlr3config.h ) INCLUDE_DIRECTORIES(include ${CMAKE_CURRENT_BINARY_DIR}) ADD_LIBRARY("antlr3c" SHARED ${ANTLR3_SRCS}) IF(MSVC) TARGET_LINK_LIBRARIES("antlr3c" Ws2_32) ENDIF(MSVC)
List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
-- You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en.
