-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Watcom generated multireaded windows projects. Added features to visual Studio project generation. Added masm support and masm64 support
- Loading branch information
1 parent
db3db3b
commit 637c77f
Showing
9 changed files
with
392 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
""" | ||
Data and code to support MASM targets | ||
This module contains data, classes and functions to support | ||
building MASM files | ||
@package makeprojects.masm_support | ||
@var makeprojects.masm_support.MASM_BOOLEANS | ||
Boolean list for MASM, Name, Default, switches | ||
@var makeprojects.masm_support.MASM_STRINGS | ||
Name, default, switch, generates output, quote parameters | ||
""" | ||
|
||
from __future__ import absolute_import, print_function, unicode_literals | ||
|
||
from .validators import lookup_booleans, lookup_strings, lookup_enum_append_keys | ||
|
||
# Enumerations for MASM warning levels | ||
MASM_WARNINGLEVEL = ( | ||
("/W0", 0), ("/W1", 1), ("/W2", 2), ("/W3", 3) | ||
) | ||
|
||
# Not supported with MASM for VC 2003 | ||
# MASM_ERROR_REPORT = ( | ||
# ("/errorReport:prompt", 0), ("/errorReport:queue", 1), | ||
# ("/errorReport:send", 2), ("/errorReport:none", 3) | ||
# ) | ||
|
||
# Names, default, lookup tables for MASM enums | ||
MASM_ENUMS = ( | ||
("WarningLevel", (3, MASM_WARNINGLEVEL)), | ||
# ("ErrorReporting", (0, MASM_ERROR_REPORT)) | ||
) | ||
|
||
# Boolean list for MASM, Name, Default, switches | ||
MASM_BOOLEANS = ( | ||
("NoLogo", (True, "/nologo", True)), | ||
("TinyMemoryModelSupport", (False, "/AT", True)), | ||
("GenerateDebugInformation", (True, "/Zi", True)) | ||
) | ||
|
||
# String entries for MASM, Name, default, switch, generates output, quote | ||
# parameter | ||
MASM_STRINGS = ( | ||
("ObjectFileName", ( | ||
"$(IntDir)%(FileName).obj", "/Fo", True, True)), | ||
) | ||
|
||
|
||
######################################## | ||
|
||
|
||
def make_masm_command(command_dict): | ||
""" | ||
Create MASM command line | ||
Args: | ||
command_dict: Dict with command overrides | ||
Returns: | ||
Command line, Description, Output list | ||
""" | ||
|
||
# Create the initial command line | ||
# /c = Assemble without linking | ||
cmd = ["ml.exe", "/c"] | ||
|
||
# /errorReport:prompt /Ta "$(InputPath)" | ||
lookup_booleans(cmd, MASM_BOOLEANS, command_dict) | ||
lookup_enum_append_keys(cmd, MASM_ENUMS, command_dict) | ||
outputs = lookup_strings(cmd, MASM_STRINGS, command_dict) | ||
cmd.append("/Ta\"%(FullPath)\"") | ||
|
||
description = "Assembling %(FileName)%(Extension)..." | ||
return " ".join(cmd), description, outputs |
Oops, something went wrong.