Added CMake build system (to facilitate Win64 builds)
Win32 build and tests work under CMake, however I haven't added install code yet. Win64 build fails due to chkstk.S failing to assemble.
This commit is contained in:
13
libtcc.c
13
libtcc.c
@ -80,12 +80,19 @@ ST_FUNC void asm_global_instr(void)
|
||||
/********************************************************/
|
||||
|
||||
#ifdef _WIN32
|
||||
// GCC appears to use '/' for relative paths and '\\' for absolute paths on Windows
|
||||
static char *normalize_slashes(char *path)
|
||||
{
|
||||
char *p;
|
||||
for (p = path; *p; ++p)
|
||||
if (*p == '\\')
|
||||
*p = '/';
|
||||
if (path[1] == ':') {
|
||||
for (p = path+2; *p; ++p)
|
||||
if (*p == '/')
|
||||
*p = '\\';
|
||||
} else {
|
||||
for (p = path; *p; ++p)
|
||||
if (*p == '\\')
|
||||
*p = '/';
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user