source: xtideuniversalbios/trunk/BIOS_Drive_Information_Tool/makefile@ 592

Last change on this file since 592 was 592, checked in by Krister Nordvall, 6 years ago

Changes:

  • The problem with NASM in the previous revision (r591) has been fixed.
  • The colors used by the boot menu and hotkey bar can now be customized by selecting one of a number of pre-defined color themes. Suggestions for additional themes are more than welcome!
  • Large builds are now 10 KB. Small builds are still 8 KB with the exception of the Tiny build which is now 4 KB. In other words, builds are now as small as possible to make it easier to combine them with other BIOSes.
  • Added code to the library to improve drive error handling. XTIDECFG can now handle "Drive Not Ready" errors.
  • Fixed a couple of potential bugs in AtaID.asm (AtaID_GetMaxPioModeToAXandMinCycleTimeToCX); 1) ATA1.bPioMode was treated as a WORD variable. 2) ATA2.bPIOSupp was assumed to be non-zero which would result in PIO mode 3 being returned if the assumption was wrong.
  • Made the same changes in the equivalent function used by BIOSDRVS (DisplayPioModeInformationUsingAtaInfoFromDSBX in AtaInfo.asm).
  • Fixed a bug from r587 in PDC20x30.asm in PDC20x30_GetMaxPioModeToALandMinPioCycleTimeToBX.
  • Fixed a bug from r523 in XTIDECFG where Auto Configure would only set the IRQ on one IDE interface on AT-builds.
  • XTIDECFG will now restore the default settings for the "Serial port virtual device" when reselecting it in the list of device types. This makes it behave consistently for all device types.
  • The eAAM macro is now used regardless if USE_UNDOC_INTEL is defined or not because it is apparently supported on all processors including the NEC V20/V30 CPUs.
  • Renamed the EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS define to EXCLUDE_FROM_XUB.
  • Added a define to exclude unused library code from BIOSDRVS (EXCLUDE_FROM_BIOSDRVS). This makes it a lot smaller than in previous revisions.
  • All unnecessary CLD-instructions are now under a new define 'CLD_NEEDED' which is only enabled for the BIOS. It is disabled for XTIDECFG and BIOSDRVS but can be enabled if needed by adding this define to the respective makefile. This change was made because these unnecessary instructions are wasteful and should never be needed. In fact, they only serve to hide bugs (in other peoples code) which I strongly believe should be avoided. I recommend people making their own BIOSes from source to not use this define as it's extremely unlikely to be needed.
  • Updated the copyright info in SerDrive and changed an URL to point to the new site.
  • Updated the copyright info and version number in BIOSDRVS.
  • Updated the copyright info in XTIDECFG.
  • Optimizations in general.
File size: 4.3 KB
Line 
1###############################################################################
2# Makefile to build BIOS Drive Information Tool. #
3# #
4# Valid makefile targets are: #
5# all Removes existing files and builds binary file in \Build #
6# clean Removes all files from \Build #
7# #
8# Build directory must be created manually if it does not exist. #
9# #
10###############################################################################
11
12###########################################
13# Source files and destination executable #
14###########################################
15
16# Assembly source code file (*.asm):
17SRC_ASM = Src/Main.asm
18
19# Program executable file name without extension:
20PROG = biosdrvs
21EXTENSION = com
22
23
24#######################################
25# Destination and include directories #
26#######################################
27
28# Directory where binary file will be compiled to
29BUILD_DIR = Build
30
31# Subdirectories where included files are:
32HEADERS = Inc/
33HEADERS += Src/
34
35# Subdirectories where library files are:
36LIBS = ../Assembly_Library/Inc/
37LIBS += ../Assembly_Library/Src/
38LIBS += ../Assembly_Library/Src/Display/
39LIBS += ../Assembly_Library/Src/File/
40LIBS += ../Assembly_Library/Src/Keyboard/
41LIBS += ../Assembly_Library/Src/Menu/
42LIBS += ../Assembly_Library/Src/Menu/Dialog/
43LIBS += ../Assembly_Library/Src/String/
44LIBS += ../Assembly_Library/Src/Time/
45LIBS += ../Assembly_Library/Src/Util/
46LIBS += ../XTIDE_Universal_BIOS/Inc/
47LIBS += ../XTIDE_Universal_BIOS/Src/VariablesAndDPTs/
48HEADERS += $(LIBS)
49
50
51#################################################################
52# Assembler preprocessor defines. #
53#################################################################
54DEFINES = EXCLUDE_FROM_BIOSDRVS
55DEFINES_XT = ELIMINATE_CGA_SNOW
56DEFINES_XTPLUS = USE_186 ELIMINATE_CGA_SNOW
57DEFINES_AT = USE_286 USE_AT
58
59
60###################
61# Other variables #
62###################
63
64# Add -D in front of every preprocessor define declaration
65DEFS = $(DEFINES:%=-D%)
66DEFS_XT = $(DEFINES_XT:%=-D%)
67DEFS_XTPLUS = $(DEFINES_XTPLUS:%=-D%)
68DEFS_AT = $(DEFINES_AT:%=-D%)
69
70# Add -I in front of all header directories
71IHEADERS = $(HEADERS:%=-I%)
72
73# Path + target file to be built
74TARGET = $(BUILD_DIR)/$(PROG)
75
76
77#########################
78# Compilers and linkers #
79#########################
80
81# Make
82MAKE = mingw32-make.exe
83
84# Assembler
85AS = nasm.exe
86
87# use this command to erase files.
88RM = -del /Q
89
90
91#############################
92# Compiler and linker flags #
93#############################
94
95# Assembly compiler flags
96ASFLAGS = -f bin # Produce binary object files
97ASFLAGS += $(DEFS) # Preprocessor defines
98ASFLAGS += $(IHEADERS) # Set header file directory paths
99ASFLAGS += -Worphan-labels # Warn about labels without colon
100ASFLAGS += -Ox # Optimize operands to their shortest forms
101
102
103############################################
104# Build process. Actual work is done here. #
105############################################
106
107.PHONY: all at xtplus xt clean release
108
109all: clean xt
110 @echo All done!
111
112at:
113 @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_AT) -l"$(TARGET)_at.lst" -o"$(TARGET)_at.$(EXTENSION)"
114 @echo AT version "$(TARGET)_at.$(EXTENSION)" built.
115
116xtplus:
117 @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XTPLUS) -l"$(TARGET)_xtp.lst" -o"$(TARGET)_xtp.$(EXTENSION)"
118 @echo XT Plus version "$(TARGET)_xtp.$(EXTENSION)" built.
119
120xt:
121 @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XT) -l"$(TARGET)_xt.lst" -o"$(TARGET).$(EXTENSION)"
122 @echo XT version "$(TARGET).$(EXTENSION)" built.
123
124clean:
125 @$(RM) $(BUILD_DIR)\*.*
126 @echo Deleted "(*.*)" from "$(BUILD_DIR)/"
127
128release: xt
129 @echo Compressing with UPX...
130 @upx -qq --8086 --ultra-brute $(TARGET).$(EXTENSION)
131 @echo Done! XT version is ready for release.
132
133xt_unused: xt
134 @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XT) -o"$(TARGET)_xt_unused.asm" -E -DCHECK_FOR_UNUSED_ENTRYPOINTS
135 @perl ..\Tools\unused.pl $(TARGET)_xt.lst $(TARGET)_xt_unused.asm
136
Note: See TracBrowser for help on using the repository browser.