2008-11-24 20:04:52 +00:00
|
|
|
/******************************************************************************
|
2011-09-21 20:00:24 +00:00
|
|
|
* Copyright (C) 2008-2011, International Business Machines
|
2008-11-24 20:04:52 +00:00
|
|
|
* Corporation and others. All Rights Reserved.
|
|
|
|
*******************************************************************************
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __PKG_GENC_H__
|
|
|
|
#define __PKG_GENC_H__
|
|
|
|
|
|
|
|
#include "unicode/utypes.h"
|
2011-09-21 20:00:24 +00:00
|
|
|
#include "toolutil.h"
|
2008-11-24 20:04:52 +00:00
|
|
|
|
2011-10-12 20:08:09 +00:00
|
|
|
#include "unicode/putil.h"
|
|
|
|
#include "putilimp.h"
|
|
|
|
|
|
|
|
/*** Platform #defines move here ***/
|
|
|
|
#if U_PLATFORM_HAS_WIN32_API
|
|
|
|
#ifdef __GNUC__
|
|
|
|
#define WINDOWS_WITH_GNUC
|
|
|
|
#else
|
|
|
|
#define WINDOWS_WITH_MSVC
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2011-11-03 23:55:49 +00:00
|
|
|
#if !defined(WINDOWS_WITH_MSVC)
|
2011-10-12 20:08:09 +00:00
|
|
|
#define BUILD_DATA_WITHOUT_ASSEMBLY
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef U_DISABLE_OBJ_CODE /* testing */
|
|
|
|
#if defined(WINDOWS_WITH_MSVC) || U_PLATFORM_IS_LINUX_BASED
|
|
|
|
#define CAN_WRITE_OBJ_CODE
|
|
|
|
#endif
|
|
|
|
#if U_PLATFORM_HAS_WIN32_API || defined(U_ELF)
|
|
|
|
#define CAN_GENERATE_OBJECTS
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if U_PLATFORM == U_PF_CYGWIN || defined(CYGWINMSVC)
|
|
|
|
#define USING_CYGWIN
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
* When building the data library without assembly,
|
|
|
|
* some platforms use a single c code file for all of
|
|
|
|
* the data to generate the final data library. This can
|
|
|
|
* increase the performance of the pkdata tool.
|
|
|
|
*/
|
|
|
|
#if U_PLATFORM == U_PF_OS400
|
|
|
|
#define USE_SINGLE_CCODE_FILE
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Need to fix the file seperator character when using MinGW. */
|
|
|
|
#if defined(WINDOWS_WITH_GNUC) || defined(USING_CYGWIN)
|
|
|
|
#define PKGDATA_FILE_SEP_STRING "/"
|
|
|
|
#else
|
|
|
|
#define PKGDATA_FILE_SEP_STRING U_FILE_SEP_STRING
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define LARGE_BUFFER_MAX_SIZE 2048
|
|
|
|
#define SMALL_BUFFER_MAX_SIZE 512
|
|
|
|
#define SMALL_BUFFER_FLAG_NAMES 32
|
|
|
|
#define BUFFER_PADDING_SIZE 20
|
|
|
|
|
|
|
|
/** End platform defines **/
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-04-15 01:57:02 +00:00
|
|
|
U_INTERNAL void U_EXPORT2
|
2009-07-10 18:58:35 +00:00
|
|
|
printAssemblyHeadersToStdErr(void);
|
2008-11-24 20:04:52 +00:00
|
|
|
|
2009-04-15 01:57:02 +00:00
|
|
|
U_INTERNAL UBool U_EXPORT2
|
2008-11-24 20:04:52 +00:00
|
|
|
checkAssemblyHeaderName(const char* optAssembly);
|
|
|
|
|
2009-04-15 01:57:02 +00:00
|
|
|
U_INTERNAL void U_EXPORT2
|
2008-11-24 20:04:52 +00:00
|
|
|
writeCCode(const char *filename, const char *destdir, const char *optName, const char *optFilename, char *outFilePath);
|
|
|
|
|
2009-04-15 01:57:02 +00:00
|
|
|
U_INTERNAL void U_EXPORT2
|
2008-11-24 20:04:52 +00:00
|
|
|
writeAssemblyCode(const char *filename, const char *destdir, const char *optEntryPoint, const char *optFilename, char *outFilePath);
|
|
|
|
|
2009-04-15 01:57:02 +00:00
|
|
|
U_INTERNAL void U_EXPORT2
|
2008-11-24 20:04:52 +00:00
|
|
|
writeObjectCode(const char *filename, const char *destdir, const char *optEntryPoint, const char *optMatchArch, const char *optFilename, char *outFilePath);
|
|
|
|
|
|
|
|
#endif
|