From 27f75eead2fc981e1daeedc9f8cf52f59e16edb3 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Mon, 10 May 2004 05:39:03 +0000 Subject: [PATCH] Add flat Makefile for MINGW cross-compile to Win32. svn path=/trunk/yasm/; revision=1117 --- Mkfiles/Makefile.mingw | 106 +++++++++++++ Mkfiles/mingw/config.h | 348 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 454 insertions(+) create mode 100644 Mkfiles/Makefile.mingw create mode 100644 Mkfiles/mingw/config.h diff --git a/Mkfiles/Makefile.mingw b/Mkfiles/Makefile.mingw new file mode 100644 index 00000000..e54f24db --- /dev/null +++ b/Mkfiles/Makefile.mingw @@ -0,0 +1,106 @@ +# $IdPath$ +# +# Ultra-flat Makefile for MINGW (cross-compile for Win32). +# Does NOT depend on or use configure. +# +# Works for simple build but *not* for development (no clean, dist, etc). +# Also, WARNING, no header dependencies are included! +# +# How to compile: +# make -fMkfiles/Makefile.mingw + +CFLAGS=-DHAVE_CONFIG_H -DWIN32 -IMkfiles/mingw -O2 -I. -Ifrontends/yasm +CC=i386-mingw32msvc-gcc + +all: yasm.exe + +LIBYASM_OBJS= \ + libyasm/arch.o \ + libyasm/assocdat.o \ + libyasm/bitvect.o \ + libyasm/bytecode.o \ + libyasm/errwarn.o \ + libyasm/expr.o \ + libyasm/file.o \ + libyasm/floatnum.o \ + libyasm/hamt.o \ + libyasm/intnum.o \ + libyasm/linemgr.o \ + libyasm/mergesort.o \ + libyasm/objfmt.o \ + libyasm/section.o \ + libyasm/strcasecmp.o \ + libyasm/strsep.o \ + libyasm/symrec.o \ + libyasm/valparam.o \ + libyasm/xmalloc.o \ + libyasm/xstrdup.o + +MODULES_ARCH_X86_OBJS= \ + modules/arch/x86/x86arch.o \ + modules/arch/x86/x86bc.o \ + modules/arch/x86/x86expr.o \ + x86id.o + +MODULES_ARCH_LC3B_OBJS= \ + modules/arch/lc3b/lc3barch.o \ + modules/arch/lc3b/lc3bbc.o \ + lc3bid.o + +MODULES_ARCH_OBJS= \ + $(MODULES_ARCH_X86_OBJS) \ + $(MODULES_ARCH_LC3B_OBJS) + +MODULES_DBGFMTS_OBJS= \ + modules/dbgfmts/null/null-dbgfmt.o + +MODULES_OBJFMTS_OBJS= \ + modules/objfmts/dbg/dbg-objfmt.o \ + modules/objfmts/bin/bin-objfmt.o \ + modules/objfmts/coff/coff-objfmt.o \ + modules/objfmts/elf/elf.o \ + modules/objfmts/elf/elf-objfmt.o + +MODULES_OPTIMIZERS_OBJS= \ + modules/optimizers/basic/basic-optimizer.o + +MODULES_PARSERS_OBJS= \ + modules/parsers/nasm/nasm-parser.o \ + nasm-bison.o \ + nasm-token.o + +MODULES_PREPROCS_NASM_OBJS= \ + modules/preprocs/nasm/nasm-eval.o \ + modules/preprocs/nasm/nasm-pp.o \ + modules/preprocs/nasm/nasm-preproc.o \ + modules/preprocs/nasm/nasmlib.o \ + nasm-macros.o + +MODULES_PREPROCS_RAW_OBJS = \ + modules/preprocs/raw/raw-preproc.o \ + +MODULES_PREPROCS_OBJS = \ + $(MODULES_PREPROCS_NASM_OBJS) \ + $(MODULES_PREPROCS_RAW_OBJS) + +MODULES_OBJS = \ + $(MODULES_ARCH_OBJS) \ + $(MODULES_DBGFMTS_OBJS) \ + $(MODULES_OBJFMTS_OBJS) \ + $(MODULES_OPTIMIZERS_OBJS) \ + $(MODULES_PARSERS_OBJS) \ + $(MODULES_PREPROCS_OBJS) + +YASM_OBJS= \ + frontends/yasm/yasm.o \ + Mkfiles/vc/yasm-module.o \ + frontends/yasm/yasm-options.o \ + $(LIBYASM_OBJS) \ + $(MODULES_OBJS) + +yasm.exe: $(YASM_OBJS) + $(CC) -o yasm.exe $(YASM_OBJS) + +.c.o: + $(CC) -c $(CFLAGS) -o $@ $< + diff --git a/Mkfiles/mingw/config.h b/Mkfiles/mingw/config.h new file mode 100644 index 00000000..d2188d64 --- /dev/null +++ b/Mkfiles/mingw/config.h @@ -0,0 +1,348 @@ +/* $IdPath$ */ + +/* */ +/* #undef ENABLE_NLS */ + +/* Define if you have the `abort' function. */ +#define HAVE_ABORT 1 + +/* Define if you have and it should be used (not on Ultrix). */ +/* #undef HAVE_ALLOCA_H */ + +/* Define to 1 if you have the `argz_append' function. */ +/* #undef HAVE_ARGZ_APPEND */ + +/* Define to 1 if you have the `argz_create_sep' function. */ +/* #undef HAVE_ARGZ_CREATE_SEP */ + +/* Define if you have the header file. */ +/* #undef HAVE_ARGZ_H */ + +/* Define to 1 if you have the `argz_insert' function. */ +/* #undef HAVE_ARGZ_INSERT */ + +/* Define to 1 if you have the `argz_next' function. */ +/* #undef HAVE_ARGZ_NEXT */ + +/* Define to 1 if you have the `argz_stringify' function. */ +/* #undef HAVE_ARGZ_STRINGIFY */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ASSERT_H */ + +/* Define to 1 if you have the `basename' function. */ +#define HAVE_BASENAME 1 + +/* Define to 1 if you have the `bcopy' function. */ +/* #undef HAVE_BCOPY */ + +/* */ +/* #undef HAVE_CATGETS */ + +/* Define to 1 if you have the `closedir' function. */ +/* #undef HAVE_CLOSEDIR */ + +/* Define to 1 if you have the header file. */ +#define HAVE_CTYPE_H 1 + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +/* #undef HAVE_DCGETTEXT */ + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_DIRENT_H */ + +/* Define if you have the GNU dld library. */ +/* #undef HAVE_DLD */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_DLD_H */ + +/* Define to 1 if you have the `dlerror' function. */ +/* #undef HAVE_DLERROR */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_DLFCN_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_DL_H */ + +/* Define if you don't have `vprintf' but do have `_doprnt'. */ +/* #undef HAVE_DOPRNT */ + +/* Define to 1 if you have the header file. */ +#define HAVE_ERRNO_H 1 + +/* Define to 1 if the system has the type `error_t'. */ +/* #undef HAVE_ERROR_T */ + +/* Define if you have the `fork' function. */ +/* #undef HAVE_FORK */ + +/* */ +/* #undef HAVE_GETTEXT */ + +/* Define if you have the GNU C Library */ +/* #undef HAVE_GNU_C_LIBRARY */ + +/* Define if you have the iconv() function. */ +/* #undef HAVE_ICONV */ + +/* Define to 1 if you have the `index' function. */ +/* #undef HAVE_INDEX */ + +/* Define if you have the header file. */ +/* #undef HAVE_INTTYPES_H */ + +/* */ +/* #undef HAVE_LC_MESSAGES */ + +/* Define if you have the libdl library or equivalent. */ +/* #undef HAVE_LIBDL */ + +/* Define if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if your system has a GNU libc compatible `malloc' function, and + to 0 otherwise. */ +#define HAVE_MALLOC 1 + +/* Define if you have the header file. */ +#define HAVE_MALLOC_H 1 + +/* Define if you have the `memcpy' function. */ +#define HAVE_MEMCPY 1 + +/* Define if you have the `memmove' function. */ +#define HAVE_MEMMOVE 1 + +/* Define if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define if you have the `mergesort function. */ +/* #undef HAVE_MERGESORT */ + +/* Define if you have the `msgctl' function. */ +/* #undef HAVE_MSGCTL */ + +/* Define if you have the `msgget' function. */ +/* #undef HAVE_MSGGET */ + +/* Define if you have the `msgrcv' function. */ +/* #undef HAVE_MSGRCV */ + +/* Define if you have the `msgsnd' function. */ +/* #undef HAVE_MSGSND */ + +/* Define to 1 if you have the header file, and it defines `DIR'. */ +/* #undef HAVE_NDIR_H */ + +/* Define to 1 if you have the `opendir' function. */ +/* #undef HAVE_OPENDIR */ + +/* Define if libtool can extract symbol lists from object files. */ +/* #undef HAVE_PRELOADED_SYMBOLS */ + +/* Define to 1 if you have the `readdir' function. */ +/* #undefine HAVE_READDIR */ + +/* Define to 1 if you have the `rindex' function. */ +/* #undef HAVE_RINDEX */ + +/* Define if you have the shl_load function. */ +/* #undef HAVE_SHL_LOAD */ + +/* Define if you have the `snprintf' function. */ +/* #undef HAVE_SNPRINTF */ + +/* Define if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* */ +#define HAVE_STPCPY 1 + +/* Define if you have the `strcasecmp' function. */ +#define HAVE_STRCASECMP 1 + +/* Define if you have the `strchr' function. */ +#define HAVE_STRCHR 1 + +/* Define to 1 if you have the `strcmp' function. */ +#define HAVE_STRCMP 1 + +/* Define if you have the `strcmpi' function. */ +/* #undef HAVE_STRCMPI */ + +/* Define if you have the `strerror' function. */ +#define HAVE_STRERROR 1 + +/* Define if you have the `stricmp' function. */ +/* #undef HAVE_STRICMP */ + +/* Define if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define if you have the `strncasecmp' function. */ +#define HAVE_STRNCASECMP 1 + +/* Define if you have the `strrchr' function. */ +#define HAVE_STRRCHR 1 + +/* Define if you have the `strsep' function. */ +/* #undef HAVE_STRSEP */ + +/* Define if you have the header file. */ +/* #undef HAVE_SYS_CDEFS_H */ + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_DIR_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_DL_H */ + +/* Define if you have the header file. */ +/* #undef HAVE_SYS_IPC_H */ + +/* Define if you have the header file. */ +/* #undef HAVE_SYS_MSG_H */ + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_NDIR_H */ + +/* Define if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define if you have the header file. */ +/* #undef HAVE_SYS_QUEUE_H */ + +/* Define if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define if you have that is POSIX.1 compatible. */ +#define HAVE_SYS_WAIT_H 1 + +/* Define if you have the `toascii' function. */ +#define HAVE_TOASCII 1 + +/* Define if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define if you have the `vfork' function. */ +/* #undef HAVE_VFORK */ + +/* Define if you have the header file. */ +/* #undef HAVE_VFORK_H */ + +/* Define if you have the vprintf function. */ +#define HAVE_VPRINTF 1 + +/* Define to 1 if you have the `vsnprintf' function. */ +/* #undef HAVE_VSNPRINTF */ + +/* Define if you have the `wait' function. */ +#define HAVE_WAIT 1 + +/* Define if `fork' works. */ +/* #undef HAVE_WORKING_FORK */ + +/* Define if `vfork' works. */ +/* #undef HAVE_WORKING_VFORK */ + +/* Define if the OS needs help to load dependent libraries for dlopen(). */ +#define LTDL_DLOPEN_DEPLIBS 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LTDL_OBJDIR ".libs/" + +/* Define to the name of the environment variable that determines the dynamic + library search path. */ +#define LTDL_SHLIBPATH_VAR "PATH" + +/* Define to the extension used for shared libraries, say, ".so". */ +#define LTDL_SHLIB_EXT ".dll" + +/* Define to the system default library search path. */ +#define LTDL_SYSSEARCHPATH "/lib:/usr/lib" + +/* Define if dlsym() requires a leading underscode in symbol names. */ +/* #undef NEED_USCORE */ + +/* Name of package */ +#define PACKAGE "yasm" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "bug-yasm@tortall.net" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "yasm" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "yasm CVS" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "yasm" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "CVS" + +/* Define if the C compiler supports function prototypes. */ +#define PROTOTYPES 1 + +/* Define if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Combined test for fork/wait/msg* */ +/* #undef USE_FORKWAITMSG */ + +/* Version number of package */ +#define VERSION "CVS" + +/* Define if using the dmalloc debugging malloc package */ +/* #undef WITH_DMALLOC */ + +/* Make sure we see all GNU extensions. */ +/* #undef _GNU_SOURCE */ + +/* Make sure we see all SVID extensions. */ +/* #undef _SVID_SOURCE */ + +/* Define like PROTOTYPES; this can be used by system headers. */ +#define __PROTOTYPES 1 + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define to a type to use for `error_t' if it is not otherwise available. */ +#define error_t int + +/* Define as `__inline' if that's what the C compiler calls it, or to nothing + if it is not supported. */ +/* #undef inline */ + +/* Define to rpl_malloc if the replacement function should be used. */ +/* #undef malloc */ + +/* Define to `int' if doesn't define. */ +/* #undef pid_t */ + +/* Define to `unsigned' if doesn't define. */ +/* #undef size_t */ + +/* Define as `fork' if `vfork' does not work. */ +/* #undef vfork */ -- 2.50.0