1 /******************************************************************************
2 * Copyright (C) 2008-2011, International Business Machines
3 * Corporation and others. All Rights Reserved.
4 *******************************************************************************
10 #include "unicode/utypes.h"
13 #include "unicode/putil.h"
16 /*** Platform #defines move here ***/
17 #if U_PLATFORM_HAS_WIN32_API
19 #define WINDOWS_WITH_GNUC
21 #define WINDOWS_WITH_MSVC
26 #if !defined(WINDOWS_WITH_MSVC)
27 #define BUILD_DATA_WITHOUT_ASSEMBLY
30 #ifndef U_DISABLE_OBJ_CODE /* testing */
31 #if defined(WINDOWS_WITH_MSVC) || U_PLATFORM_IS_LINUX_BASED
32 #define CAN_WRITE_OBJ_CODE
34 #if U_PLATFORM_HAS_WIN32_API || defined(U_ELF)
35 #define CAN_GENERATE_OBJECTS
39 #if U_PLATFORM == U_PF_CYGWIN || defined(CYGWINMSVC)
44 * When building the data library without assembly,
45 * some platforms use a single c code file for all of
46 * the data to generate the final data library. This can
47 * increase the performance of the pkdata tool.
49 #if U_PLATFORM == U_PF_OS400
50 #define USE_SINGLE_CCODE_FILE
53 /* Need to fix the file seperator character when using MinGW. */
54 #if defined(WINDOWS_WITH_GNUC) || defined(USING_CYGWIN)
55 #define PKGDATA_FILE_SEP_STRING "/"
57 #define PKGDATA_FILE_SEP_STRING U_FILE_SEP_STRING
60 #define LARGE_BUFFER_MAX_SIZE 2048
61 #define SMALL_BUFFER_MAX_SIZE 512
62 #define SMALL_BUFFER_FLAG_NAMES 32
63 #define BUFFER_PADDING_SIZE 20
65 /** End platform defines **/
69 U_INTERNAL
void U_EXPORT2
70 printAssemblyHeadersToStdErr(void);
72 U_INTERNAL UBool U_EXPORT2
73 checkAssemblyHeaderName(const char* optAssembly
);
75 U_INTERNAL
void U_EXPORT2
76 writeCCode(const char *filename
, const char *destdir
, const char *optName
, const char *optFilename
, char *outFilePath
);
78 U_INTERNAL
void U_EXPORT2
79 writeAssemblyCode(const char *filename
, const char *destdir
, const char *optEntryPoint
, const char *optFilename
, char *outFilePath
);
81 U_INTERNAL
void U_EXPORT2
82 writeObjectCode(const char *filename
, const char *destdir
, const char *optEntryPoint
, const char *optMatchArch
, const char *optFilename
, char *outFilePath
);