source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS_Configurator_v2/makefile @ 59

Last change on this file since 59 was 59, checked in by aitotat, 13 years ago

Changes to Configuration Program v2:

  • Menu structure should now be complete.
File size: 4.2 KB
Line 
1###############################################################################
2# Generic makefile for building binary files.                                 #
3# v. 1.1.0 (28.7.2007 ... 5.10.2010)                                          #
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 = xtidecfg
25EXTENSION = com
26
27
28#######################################
29# Destination and include directories #
30#######################################
31
32# Directory where binary file will be compiled to
33BUILD_DIR = Build
34
35# Subdirectories where included files are:
36HEADERS = Inc/
37HEADERS += Src/
38HEADERS += Src/Menupages/
39
40# Subdirectories where library files are:
41LIBS = ../Assembly_Library/Inc/
42LIBS += ../Assembly_Library/Src/
43LIBS += ../Assembly_Library/Src/Display/
44LIBS += ../Assembly_Library/Src/File/
45LIBS += ../Assembly_Library/Src/Keyboard/
46LIBS += ../Assembly_Library/Src/Menu/
47LIBS += ../Assembly_Library/Src/Menu/Dialog/
48LIBS += ../Assembly_Library/Src/String/
49LIBS += ../Assembly_Library/Src/Time/
50LIBS += ../Assembly_Library/Src/Util/
51LIBS += ../XTIDE_Universal_BIOS/Inc/
52HEADERS += $(LIBS)
53
54
55
56#################################################################
57# Assembler preprocessor defines.                               #
58#################################################################
59DEFINES = 
60DEFINES_XT = ELIMINATE_CGA_SNOW
61DEFINES_XTPLUS = USE_186 ELIMINATE_CGA_SNOW
62DEFINES_AT = USE_186 USE_286 USE_AT
63
64
65###################
66# Other variables #
67###################
68
69# Add -D in front of every preprocessor define declaration
70DEFS = $(DEFINES:%=-D%)
71DEFS_XT = $(DEFINES_XT:%=-D%)
72DEFS_XTPLUS = $(DEFINES_XTPLUS:%=-D%)
73DEFS_AT = $(DEFINES_AT:%=-D%)
74
75# Add -I in front of all header directories
76IHEADERS = $(HEADERS:%=-I%)
77
78# Path + target file to be build
79TARGET = $(BUILD_DIR)/$(PROG)
80
81
82#########################
83# Compilers and linkers #
84#########################
85
86# Make
87MAKE = mingw32-make.exe
88
89# Assembler
90AS = yasm.exe
91#AS = nasm.exe
92
93# use this command to erase files.
94RM = -del /Q
95
96
97#############################
98# Compiler and linker flags #
99#############################
100
101# Assembly compiler flags
102ASFLAGS = -f bin                # Produce binary object files
103ASFLAGS += $(DEFS)              # Preprocessor defines
104ASFLAGS += $(IHEADERS)          # Set header file directory paths
105ASFLAGS += -Worphan-labels      # Warn about labels without colon
106ASFLAGS += -O9                  # Optimize operands to their shortest forms
107
108
109############################################
110# Build process. Actual work is done here. #
111############################################
112
113.PHONY: all at xtplus xt clean
114
115# Make clean debug and release versions
116all: clean xt
117    @echo All build!
118
119at:
120    @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_AT) -o"$(TARGET)_at.$(EXTENSION)"
121    @echo AT version "$(TARGET)_at.$(EXTENSION)" build.
122
123xtplus:
124    @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XTPLUS) -o"$(TARGET)_xtp.$(EXTENSION)"
125    @echo XT plus version "$(TARGET)_xtp.$(EXTENSION)" build.
126
127xt:
128    @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XT) -o"$(TARGET).$(EXTENSION)"
129    @echo XT version "$(TARGET).$(EXTENSION)" build.
130
131clean:
132    @$(RM) $(BUILD_DIR)\*.*
133    @echo Deleted "(*.*)" from "$(BUILD_DIR)/"
Note: See TracBrowser for help on using the repository browser.