source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS/makefile@ 156

Last change on this file since 156 was 155, checked in by Tomi Tilli, 14 years ago

Changes to XTIDE Universal BIOS:

  • AH=4h again uses VERIFY command (copy-pasting had changed it to WRITE).
  • Timeout should now work on all overflow situations.
  • Cleaned code a bit.
File size: 4.5 KB
Line 
1###############################################################################
2# Generic makefile for building BIOS binary file. #
3# v. 1.0.0 (28.7.2007 ... 28.7.2007) #
4# (C) Tomi Tilli #
5# aitotat@gmail.com #
6# #
7# Valid makefile targets are: #
8# all Removes existing files and builds binary file in \Build #
9# build Builds binary file in \Build #
10# clean Removes all files from \Build #
11# #
12# Build directory must be created manually if it does not exist. #
13# #
14###############################################################################
15
16###########################################
17# Source files and destination executable #
18###########################################
19
20# Assembly source code file (*.asm):
21SRC_ASM = Src/Main.asm
22
23# Program executable file name without extension:
24PROG = ide
25
26
27#######################################
28# Destination and include directories #
29#######################################
30
31# Directory where binary file will be compiled to
32BUILD_DIR = Build
33
34# Subdirectories where included files are:
35HEADERS = Inc/
36HEADERS += Src/
37HEADERS += Src/Boot/
38HEADERS += Src/Handlers/
39HEADERS += Src/Handlers/Int13h/
40HEADERS += Src/Device/
41HEADERS += Src/Device/IDE/
42HEADERS += Src/Device/Serial/
43HEADERS += Src/Initialization/
44HEADERS += Src/Libraries/
45HEADERS += Src/VariablesAndDPTs/
46
47# Subdirectories where library files are:
48LIBS = ../Assembly_Library/Inc/
49LIBS += ../Assembly_Library/Src/
50LIBS += ../Assembly_Library/Src/Display/
51LIBS += ../Assembly_Library/Src/File/
52LIBS += ../Assembly_Library/Src/Keyboard/
53LIBS += ../Assembly_Library/Src/Menu/
54LIBS += ../Assembly_Library/Src/Menu/Dialog/
55LIBS += ../Assembly_Library/Src/String/
56LIBS += ../Assembly_Library/Src/Time/
57LIBS += ../Assembly_Library/Src/Util/
58LIBS += ../XTIDE_Universal_BIOS/Inc/
59HEADERS += $(LIBS)
60
61
62#################################################################
63# Assembler preprocessor defines. #
64#################################################################
65DEFINES = INCLUDE_MENU_LIBRARY EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
66DEFINES_XT = ELIMINATE_CGA_SNOW
67DEFINES_XTPLUS = ELIMINATE_CGA_SNOW USE_186
68DEFINES_AT = USE_186 USE_286 USE_AT
69
70
71###################
72# Other variables #
73###################
74
75# Add -D in front of every preprocessor define declaration
76DEFS = $(DEFINES:%=-D%)
77DEFS_XT = $(DEFINES_XT:%=-D%)
78DEFS_XTPLUS = $(DEFINES_XTPLUS:%=-D%)
79DEFS_AT = $(DEFINES_AT:%=-D%)
80
81# Add -I in front of all header directories
82IHEADERS = $(HEADERS:%=-I%)
83
84# Path + target file to be built
85TARGET = $(BUILD_DIR)/$(PROG)
86
87
88#########################
89# Compilers and linkers #
90#########################
91
92# Make
93MAKE = mingw32-make.exe
94
95# Assembler
96AS = nasm.exe
97
98# use this command to erase files.
99RM = -del /Q
100
101
102#############################
103# Compiler and linker flags #
104#############################
105
106# Assembly compiler flags
107ASFLAGS = -f bin # Produce binary object files
108ASFLAGS += $(DEFS) # Preprocessor defines
109ASFLAGS += $(IHEADERS) # Set header file directory paths
110ASFLAGS += -Worphan-labels # Warn about labels without colon
111ASFLAGS += -O9 # Optimize operands to their shortest forms
112
113
114############################################
115# Build process. Actual work is done here. #
116############################################
117
118.PHONY: all at xtplus xt clean
119
120# Make clean debug and release versions
121all: clean at xtplus xt
122 @echo All done!
123
124at:
125 @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_AT) -l"$(TARGET)_at.lst" -o"$(TARGET)_at.bin"
126 @echo AT version "$(TARGET)_at.bin" built.
127
128xtplus:
129 @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XTPLUS) -l"$(TARGET)_xtp.lst" -o"$(TARGET)_xtp.bin"
130 @echo XT plus version "$(TARGET)_xtp.bin" built.
131
132xt:
133 @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XT) -l"$(TARGET)_xt.lst" -o"$(TARGET)_xt.bin"
134 @echo XT version "$(TARGET)_xt.bin" built.
135
136clean:
137 @$(RM) $(BUILD_DIR)\*.*
138 @echo Deleted "(*.*)" from "$(BUILD_DIR)/"
Note: See TracBrowser for help on using the repository browser.