source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS_Configurator_v2/makefile@ 404

Last change on this file since 404 was 370, checked in by krille_n_@…, 13 years ago

Changes:

  • Added some missing PIO mode timings to ATA_ID.inc (based on info from http://www.singlix.net/specs/cfspc4_0.pdf)
  • Updated Configuration_FullMode.txt but it may need additional changes as the Tandy info doesn't match the wiki.
  • Optimizations.
  • Excluded some unused code from XTIDECFG.
File size: 4.3 KB
RevLine 
[57]1###############################################################################
[293]2# Makefile to build XTIDE Universal BIOS Configurator v2. #
[57]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 = xtidecfg
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/
[68]33HEADERS += Inc/Help/
[57]34HEADERS += Src/
35HEADERS += Src/Menupages/
36
37# Subdirectories where library files are:
[59]38LIBS = ../Assembly_Library/Inc/
39LIBS += ../Assembly_Library/Src/
40LIBS += ../Assembly_Library/Src/Display/
41LIBS += ../Assembly_Library/Src/File/
42LIBS += ../Assembly_Library/Src/Keyboard/
43LIBS += ../Assembly_Library/Src/Menu/
44LIBS += ../Assembly_Library/Src/Menu/Dialog/
45LIBS += ../Assembly_Library/Src/String/
46LIBS += ../Assembly_Library/Src/Time/
47LIBS += ../Assembly_Library/Src/Util/
[57]48LIBS += ../XTIDE_Universal_BIOS/Inc/
49HEADERS += $(LIBS)
50
51
52#################################################################
53# Assembler preprocessor defines. #
54#################################################################
[181]55DEFINES = EXCLUDE_FROM_XTIDECFG
[57]56DEFINES_XT = ELIMINATE_CGA_SNOW
57DEFINES_XTPLUS = USE_186 ELIMINATE_CGA_SNOW
[293]58DEFINES_AT = USE_286 USE_AT
[57]59
60
61###################
62# Other variables #
63###################
64
65# Add -D in front of every preprocessor define declaration
66DEFS = $(DEFINES:%=-D%)
67DEFS_XT = $(DEFINES_XT:%=-D%)
68DEFS_XTPLUS = $(DEFINES_XTPLUS:%=-D%)
69DEFS_AT = $(DEFINES_AT:%=-D%)
70
71# Add -I in front of all header directories
72IHEADERS = $(HEADERS:%=-I%)
73
[145]74# Path + target file to be built
[57]75TARGET = $(BUILD_DIR)/$(PROG)
76
77
78#########################
79# Compilers and linkers #
80#########################
81
82# Make
83MAKE = mingw32-make.exe
84
85# Assembler
[187]86AS = nasm.exe
[57]87
88# use this command to erase files.
89RM = -del /Q
90
91
92#############################
93# Compiler and linker flags #
94#############################
95
96# Assembly compiler flags
97ASFLAGS = -f bin # Produce binary object files
98ASFLAGS += $(DEFS) # Preprocessor defines
99ASFLAGS += $(IHEADERS) # Set header file directory paths
100ASFLAGS += -Worphan-labels # Warn about labels without colon
101ASFLAGS += -O9 # Optimize operands to their shortest forms
102
103
104############################################
105# Build process. Actual work is done here. #
106############################################
107
[145]108.PHONY: all at xtplus xt clean release
[57]109
110all: clean xt
[145]111 @echo All done!
[57]112
113at:
[82]114 @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_AT) -l"$(TARGET)_at.lst" -o"$(TARGET)_at.$(EXTENSION)"
[145]115 @echo AT version "$(TARGET)_at.$(EXTENSION)" built.
[57]116
117xtplus:
[82]118 @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XTPLUS) -l"$(TARGET)_xtp.lst" -o"$(TARGET)_xtp.$(EXTENSION)"
[293]119 @echo XT Plus version "$(TARGET)_xtp.$(EXTENSION)" built.
[57]120
121xt:
[82]122 @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XT) -l"$(TARGET)_xt.lst" -o"$(TARGET).$(EXTENSION)"
[145]123 @echo XT version "$(TARGET).$(EXTENSION)" built.
[57]124
125clean:
126 @$(RM) $(BUILD_DIR)\*.*
127 @echo Deleted "(*.*)" from "$(BUILD_DIR)/"
[145]128
129release: xt
130 @echo Compressing with UPX...
131 @upx -qq --8086 --ultra-brute $(TARGET).$(EXTENSION)
132 @echo Done! XT version is ready for release.
[370]133
134xt_unused: xt
135 @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XT) -o"$(TARGET)_xt_unused.asm" -E -DCHECK_FOR_UNUSED_ENTRYPOINTS
136 @perl ..\tools\unused.pl $(TARGET)_xt.lst $(TARGET)_xt_unused.asm
137
Note: See TracBrowser for help on using the repository browser.