source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS/makefile@ 88

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

Changes to XTIDE Universal BIOS:

  • Now uses new libraries (untested)
  • Non-working since code size is too large
File size: 4.4 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/Handlers/Int13h/Common/
41HEADERS += Src/Initialization/
42HEADERS += Src/Libraries/
43HEADERS += Src/VariablesAndDPTs/
44
45# Subdirectories where library files are:
46LIBS = ../Assembly_Library/Inc/
47LIBS += ../Assembly_Library/Src/
48LIBS += ../Assembly_Library/Src/Display/
49LIBS += ../Assembly_Library/Src/File/
50LIBS += ../Assembly_Library/Src/Keyboard/
51LIBS += ../Assembly_Library/Src/Menu/
52LIBS += ../Assembly_Library/Src/Menu/Dialog/
53LIBS += ../Assembly_Library/Src/String/
54LIBS += ../Assembly_Library/Src/Time/
55LIBS += ../Assembly_Library/Src/Util/
56LIBS += ../XTIDE_Universal_BIOS/Inc/
57HEADERS += $(LIBS)
58
59
60#################################################################
61# Assembler preprocessor defines. #
62#################################################################
63DEFINES = INCLUDE_MENU_LIBRARY EXCLUDE_BIT_UTILS EXCLUDE_SORT_UTILS
64DEFINES_XT = ELIMINATE_CGA_SNOW
65DEFINES_XTPLUS = ELIMINATE_CGA_SNOW USE_186
66DEFINES_AT = USE_186 USE_286 USE_AT
67
68
69###################
70# Other variables #
71###################
72
73# Add -D in front of every preprocessor define declaration
74DEFS = $(DEFINES:%=-D%)
75DEFS_XT = $(DEFINES_XT:%=-D%)
76DEFS_XTPLUS = $(DEFINES_XTPLUS:%=-D%)
77DEFS_AT = $(DEFINES_AT:%=-D%)
78
79# Add -I in front of all header directories
80IHEADERS = $(HEADERS:%=-I%)
81
82# Path + target file to be build
83TARGET = $(BUILD_DIR)/$(PROG)
84
85
86#########################
87# Compilers and linkers #
88#########################
89
90# Make
91MAKE = mingw32-make.exe
92
93# Assembler
94AS = nasm.exe
95
96# use this command to erase files.
97RM = -del /Q
98
99
100#############################
101# Compiler and linker flags #
102#############################
103
104# Assembly compiler flags
105ASFLAGS = -f bin # Produce binary object files
106ASFLAGS += $(DEFS) # Preprocessor defines
107ASFLAGS += $(IHEADERS) # Set header file directory paths
108ASFLAGS += -Worphan-labels # Warn about labels without colon
109ASFLAGS += -O9 # Optimize operands to their shortest forms
110
111
112############################################
113# Build process. Actual work is done here. #
114############################################
115
116.PHONY: all at xtplus xt clean
117
118# Make clean debug and release versions
119all: clean at xtplus xt
120 @echo All build!
121
122at:
123 @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_AT) -l"$(TARGET)_at.lst" -o"$(TARGET)_at.bin"
124 @echo AT version "$(TARGET)_at.bin" build.
125
126xtplus:
127 @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XTPLUS) -l"$(TARGET)_xtp.lst" -o"$(TARGET)_xtp.bin"
128 @echo XT plus version "$(TARGET)_xtp.bin" build.
129
130xt:
131 @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XT) -l"$(TARGET)_xt.lst" -o"$(TARGET)_xt.bin"
132 @echo XT version "$(TARGET)_xt.bin" build.
133
134clean:
135 @$(RM) $(BUILD_DIR)\*.*
136 @echo Deleted "(*.*)" from "$(BUILD_DIR)/"
Note: See TracBrowser for help on using the repository browser.