summaryrefslogtreecommitdiff
path: root/Mkfiles
Commit message (Collapse)AuthorAgeFilesLines
...
* Rename directiv.c to directbl.c to free up the name directiv.cH. Peter Anvin2017-03-074-13/+13
| | | | | | | | We want to move the directive handling to a separate file, so change the filename of the directive table handler to something a bit more specific. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* make clean: clean up more things that ought to beH. Peter Anvin2017-03-014-0/+13
| | | | | | | | Cleaning up hasn't really kept up to date with source code changes. Try make it better for now; this also ought to make it easier to do the corresponding cleaning in the *.mak files. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* openwcom.mak: further fixes to build with OpenWatcom WMAKEsezeroz2017-02-281-6/+17
| | | | | | Further fixes for OpenWatcom/WMAKE (BR 3392383). Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Run make alldepsH. Peter Anvin2017-02-284-4/+20
|
* Makefile: move all non-main objects into libnasm.aH. Peter Anvin2017-02-284-80/+88
| | | | | | | | | | | | There is no fundamental reason for all objects that don't contain a main() function to not be part of libnasm.a; this allows the linker to do its job optimally, especially in the presence of debugging code which may not be needed under normal conditions. If we do end up with function name conflicts the library might have to be split, but it would be better to simply avoid that case. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* openwcom.mak: BR 3392381: update to work for the current mastersezeroz2017-02-281-50/+51
| | | | | | | | | Update openwcom.mak to work on the current master branch, per BR 3992381. https://bugzilla.nasm.us/show_bug.cgi?id=3392381 Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* nasmlib/file: move memory-mapping functions out of file.cH. Peter Anvin2017-02-234-8/+21
| | | | | | | | Move memory-mapping functions from file.c into a separate mmap.c. This will be cleaner especially once (if) we end up doing a Windows implementation, which is likely to look entirely different. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Move canned OpenWatcom config to config/watcom.h.H. Peter Anvin2016-10-194-517/+529
| | | | | | | Move the canned OpenWatcom configuration file to config/watcom.h. Also exclude config/config.h from being a dependency for MSVC. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Run make alldepsH. Peter Anvin2016-10-144-5/+5
| | | | Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* alldeps: handle uses of full pathnames, e.g. "config/config.h"H. Peter Anvin2016-10-064-700/+844
| | | | | | | | | | | | | | Sometimes we really want to use an extended pathname for an include file, for documentation purposes; e.g. "config/config.h". This makes alldeps handle that case correctly (and also adds the config/ directory to directories scanned by alldeps). It is unclear if this will work correctly if there are include files with the same name in different directories, but we currently do not have any case like that. Reported-by: anonymous coward <nasm64developer@users.sf.net> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Move config.h to a subdirectory, add MSVC-specific config fileH. Peter Anvin2016-10-041-2/+6
| | | | | | | | | Instead of trying to do hacks in the Makefiles, define header files for specific compilers if they can't use autoconf. Currently defined for Microsoft Visual Studio, based on MSDN documentation. It is currently untested. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Factor out common string list handling codeH. Peter Anvin2016-10-044-283/+322
| | | | | | | Simplify the preprocessor code by factoring out the common string list handling code. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* backend: move wrapper for legacy output functions to a library routineH. Peter Anvin2016-09-244-12/+26
| | | | | | | Move the wrapper for legacy output into a library routine so the backends can be ported one at a time. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Run make alldepsH. Peter Anvin2016-08-164-446/+816
| | | | Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Reorganize the source code into subdirectoriesH. Peter Anvin2016-05-254-658/+562
| | | | | | | Make the source code easier to understand and keep track of by organizing it into subdirectories depending on the function. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* nasmlib: break up nasmlib.c into logical componentsH. Peter Anvin2016-05-254-51/+129
| | | | | | | | nasmlib.c had basically turned into a garbage bin of various functions with very little in common. Break it up into logical components for isolation and manageability. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Merge remote-tracking branch 'origin/nasm-2.12.xx'H. Peter Anvin2016-05-164-16/+26
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolved Conflicts: .gitignore Makefile.in Mkfiles/msvc.mak Mkfiles/netware.mak Mkfiles/openwcom.mak Mkfiles/owlinux.mak preproc-nop.c preproc.c version Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * Unbreak building in a separate object directoryH. Peter Anvin2016-05-163-3/+3
| | | | | | | | | | | | Fix bitrot in building in a separate object directory. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
| * Use a hash to keep exactly one copy of each filename aroundH. Peter Anvin2016-05-104-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old code for keeping track of source file name and line was confused as hell about ownership of the strings, and it is pretty clear we leaked that information all over the place. Instead, use a hash table to keep a copy of each string as necessary, and simply make references to a string pool that we keep until the end of the assembly session. This pool probably should be unified with the list of dependency files, and so on, but that is for the development branch. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | out: Elf -- Merge Elf32, Elfx32 and Elf64 into single fileCyrill Gorcunov2016-04-244-59/+8
| | | | | | | | | | | | | | There is a bunch of common code here so merge them all into one file. Unmergable parts are wrapped with is_elf() helpers. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | msvc.mak: change $(L) to $(A)H. Peter Anvin2016-04-211-8/+8
| | | | | | | | | | | | Change $(L) to $(A) for consistency with Makefile.in. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | msvc.mak: Build fixes, updates and improvements.Knut St. Osmundsen2016-04-211-7/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added missing rules for creating a library out of LIBOBJ and using it when linking. * Updated the clean rule and PRELREQ list. * Always build with debug info as it ends up in external PDB files anyway and doesn't really impact binary size. * Added /RELEASE to the LDFLAGS so the linker checksums the headers and the binary can be signed. Signed-off-by: Knut St. Osmundsen<bird-nasm@anduin.net> Reviewed-by: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | lib: split library into stdlib and nasmlib; header handling fixesH. Peter Anvin2016-03-084-378/+410
| | | | | | | | | | | | | | | | | | | | | | | | | | Split lib/ into nasmlib/ (for nasm-specific functions) and stdlib/ (for replacements for C library functions which may be missing.) Rename the ersatz inttypes.h to nasmint.h so we can use a simple test in compiler.h instead of dealing with include path magic. Remove tests in configure.in for ancient missing functions (which will break the build anyway.) Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | Move version strings to a separate headerH. Peter Anvin2016-03-084-36/+34
| | | | | | | | | | | | | | Move version strings to a separate header, instead of needing to include nasm.h in places where it probably really doesn't belong. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | Makefiles: use actual archive managersH. Peter Anvin2016-03-084-56/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no reason to not use an archive manager to build our executables. If there really are systems which don't have any kind of archive manager, we can simply link all the objects. This also drops any use of configure to detect library objects. Instead just use HAVE_* and let the archive manager delete them. A lot of additional functions could be declared library functions and reorganized. ***FIX*** Mkfiles/*.mak have not yet been updated. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | Move file I/O related functions out of nasmlib.cH. Peter Anvin2016-03-084-4/+8
| | | | | | | | | | | | | | | | | | | | nasmlib.[ch] desperately need to be broken up into smaller chunks. Break file I/O related functions out into file.c, so at least we can avoid the problem with P_WAIT being defined in <io.h> on Windows but is also used as a prefix constant in "nasm.h". Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | Merge remote-tracking branch 'origin/nasm-2.12.xx'H. Peter Anvin2016-03-084-5/+8
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | Resolved Conflicts: output/codeview.c output/outelf32.c output/outelf64.c output/outelfx32.c output/outform.c output/outform.h output/outieee.c output/outobj.c Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * msvc.mak: /Ox and /Oy are redundant with /O2H. Peter Anvin2016-03-081-1/+4
| | | | | | | | | | | | | | Per the MSVC++ docs, /Ox and /Oy are redundant with /O2, and the docs recommend that they do not be used together. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * Makefiles: run "make alldeps"H. Peter Anvin2016-03-074-9/+9
| | | | | | | | | | | | Automatic update of dependencies. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * Change nasmlist/ListGen to lfmt/struct lfmtH. Peter Anvin2016-03-074-23/+23
| | | | | | | | | | | | | | | | | | For consistency with ofmt/dfmt, change the listing structure to "struct lfmt" and "lfmt" and move it to listing.h. From master branch commit 8ac25aa02000889df94c3ea96bdda6375ddfa661 Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | Change nasmlist/ListGen to lfmt/struct lfmtH. Peter Anvin2016-02-184-23/+23
| | | | | | | | | | | | | | For consistency with ofmt/dfmt, change the listing structure to "struct lfmt" and "lfmt" and move it to listing.h. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | Makefile: remove explicit mention of lib/strlcpy.cH. Peter Anvin2016-02-184-9/+5
|/ | | | | | | Don't inclure lib/strlcpy.c unconditionally, that is what LIBOBJS is for. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* outmacho: rename outmac.c to outmacho.cH. Peter Anvin2016-02-124-15/+16
| | | | | | We already have outmacho.mac, so name this file outmacho.c. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Merge the macho32 and macho64 (outmac32/64) backendsH. Peter Anvin2016-02-124-32/+15
| | | | | | | | Merge the two Mach-O backends for cleanliness and maintainability. This should also make the recent fixes to MachO-64 available in MachO-32. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* make alldeps to remove unnecessary dependencies for realpath.cH. Peter Anvin2016-01-264-12/+4
| | | | | | | The previous commit contained unnecessary dependencies for realpath.c so run make alldeps to remove those. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Portability improvements to nasm_realpath()H. Peter Anvin2016-01-264-7/+47
| | | | | | | | Try harder to nasm_realpath() to be as portable as possible. Move it to a separate file since it has gotten complex enough that it is cleaner that way. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* coff: Add support for the Codeview 8 debug formatJim Kukunas2016-01-241-1/+1
| | | | | | | | | | | Codeview is a debug format for win32/win64 PE/COFF files. It adds two sections, .debug$S (symbols) and .debug$T (types), to the generated object file. These sections are then used by the linker to generate a PDB file which can be used by various debuggers (WinDbg, Visual Studio, etc). Signed-off-by: Jim Kukunas <james.t.kukunas@linux.intel.com> Acked-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* Add a MD5 implementationJim Kukunas2016-01-241-1/+2
| | | | | | | | | | | | This implementation was written by Colin Plumb and is in the public domain. I've updated it to use stdint.h and the standard C types rather than sys/types.h for portability. Signed-off-by: Jim Kukunas <james.t.kukunas@linux.intel.com> Acked-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* Run "make alldeps" to add missing header file dependenciesH. Peter Anvin2014-11-254-24/+25
| | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* msvc.mak: Add support for generating PDBs for debuggingJim Kukunas2014-11-251-4/+12
| | | | | | | Adds a new Makefile variable DEBUG that controls whether a symbol file (.PDB) is created for the executables, e. g., nmake -f Mkfiles\msvc.mak DEBUG=1 Signed-off-by: Jim Kukunas <james.t.kukunas@linux.intel.com>
* msvc.mak: Update insns.pl argumentsJim Kukunas2014-08-071-7/+11
| | | | | | | | 45a22d9a6147c320b6754679de54a8290de3c5e3 changes the arguments of insns.pl and adds a new autogenerated header iflaggen.h. Update the nmake Makefile accordingly. Signed-off-by: Jim Kukunas <james.t.kukunas@linux.intel.com>
* "make alldeps"H. Peter Anvin2013-11-244-105/+117
| | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* "make alldeps"H. Peter Anvin2013-11-244-24/+40
| | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* make: Update depsCyrill Gorcunov2013-11-244-100/+115
| | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* iflag: Start using new instruction flags engineCyrill Gorcunov2013-11-244-11/+28
| | | | | | Here we start using instruction flags generator. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* Run "make alldeps" to update dependenciesH. Peter Anvin2013-10-244-156/+170
|
* make: Fix nasm build with MSVCMarat Dukhan2013-06-301-2/+14
| | | | | | | http://bugzilla.nasm.us/show_bug.cgi?id=3392258 Signed-off-by: Marat Dukhan <maratek@gmail.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* preproc: Move NOP preprocessor into separate fileCyrill Gorcunov2012-05-074-4/+16
| | | | | | No need to carry it in nasm.c, let it be more modular. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* backend: add support for x32 ELFH.J. Lu2012-02-034-0/+19
| | | | Add an x32 ELF (32-bit code with the CPU in 64-bit mode) backend.
* BR3411280: Fix incorrect compiler option for OS/2 target in Open Watcom makefileJiri Malak2011-09-201-1/+1
| | | | | | | For OS2 target the -bt option should be set accordingly. Signed-off-by: Jiri Malak <malak.jiri@gmail.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>