annotate rules.mak @ 2869:cfa6222348f7

makefiles: Separate OS9COPY and CP macros
author Tormod Volden <debian.tormod@gmail.com>
date Sun, 24 Nov 2013 11:18:28 +0100
parents 947ed392ce63
children 28ed72477814
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1393
033aeec93b95 Modified
boisy
parents: 1390
diff changeset
1 # The NitrOS-9 Project
033aeec93b95 Modified
boisy
parents: 1390
diff changeset
2 # Project-Wide Rules
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
3
1754
9092b25eeb4c rules.mak now uses environment variables as an alternative for placement of
boisy
parents: 1729
diff changeset
4 # Environment variables are now used to specify any directories other
9092b25eeb4c rules.mak now uses environment variables as an alternative for placement of
boisy
parents: 1729
diff changeset
5 # than the defaults below:
9092b25eeb4c rules.mak now uses environment variables as an alternative for placement of
boisy
parents: 1729
diff changeset
6 #
9092b25eeb4c rules.mak now uses environment variables as an alternative for placement of
boisy
parents: 1729
diff changeset
7 # NITROS9DIR - base directory of the NitrOS-9 project on your system
9092b25eeb4c rules.mak now uses environment variables as an alternative for placement of
boisy
parents: 1729
diff changeset
8 #
9092b25eeb4c rules.mak now uses environment variables as an alternative for placement of
boisy
parents: 1729
diff changeset
9 # If the defaults below are fine, then there is no need to set any
9092b25eeb4c rules.mak now uses environment variables as an alternative for placement of
boisy
parents: 1729
diff changeset
10 # environment variables.
331
2a7bfa7ce709 Makefile rules updated
boisy
parents: 299
diff changeset
11
2a7bfa7ce709 Makefile rules updated
boisy
parents: 299
diff changeset
12
1803
6b0d1027e4e0 Removed NITROS9VERSION, NITROS9MAJOR, NITROS9MINOR environment vars from
boisy
parents: 1787
diff changeset
13 # NitrOS-9 version, major and minor release numbers are here
6b0d1027e4e0 Removed NITROS9VERSION, NITROS9MAJOR, NITROS9MINOR environment vars from
boisy
parents: 1787
diff changeset
14 NOS9VER = 3
6b0d1027e4e0 Removed NITROS9VERSION, NITROS9MAJOR, NITROS9MINOR environment vars from
boisy
parents: 1787
diff changeset
15 NOS9MAJ = 2
2183
d29be35a48bb makefiles updated, opcode for printing updated
boisy
parents: 2180
diff changeset
16 NOS9MIN = 9
1803
6b0d1027e4e0 Removed NITROS9VERSION, NITROS9MAJOR, NITROS9MINOR environment vars from
boisy
parents: 1787
diff changeset
17
6b0d1027e4e0 Removed NITROS9VERSION, NITROS9MAJOR, NITROS9MINOR environment vars from
boisy
parents: 1787
diff changeset
18 # Set this to 1 to turn on "DEVELOPMENT" message in sysgo
2183
d29be35a48bb makefiles updated, opcode for printing updated
boisy
parents: 2180
diff changeset
19 NOS9DBG = 1
1803
6b0d1027e4e0 Removed NITROS9VERSION, NITROS9MAJOR, NITROS9MINOR environment vars from
boisy
parents: 1787
diff changeset
20
6b0d1027e4e0 Removed NITROS9VERSION, NITROS9MAJOR, NITROS9MINOR environment vars from
boisy
parents: 1787
diff changeset
21 #################### DO NOT CHANGE ANYTHING BELOW THIS LINE ####################
1787
0af3f5f84033 Tons 'o changes
boisy
parents: 1771
diff changeset
22
1865
c6426b9ca0da Added rules for .r generation
boisy
parents: 1853
diff changeset
23 CC = c3
c6426b9ca0da Added rules for .r generation
boisy
parents: 1853
diff changeset
24
1805
beba50d7ac3e Cleaned up environment var references
boisy
parents: 1803
diff changeset
25 NITROS9VER = v0$(NOS9VER)0$(NOS9MAJ)0$(NOS9MIN)
1787
0af3f5f84033 Tons 'o changes
boisy
parents: 1771
diff changeset
26
1754
9092b25eeb4c rules.mak now uses environment variables as an alternative for placement of
boisy
parents: 1729
diff changeset
27 ifndef NITROS9DIR
9092b25eeb4c rules.mak now uses environment variables as an alternative for placement of
boisy
parents: 1729
diff changeset
28 NITROS9DIR = $(HOME)/nitros9
9092b25eeb4c rules.mak now uses environment variables as an alternative for placement of
boisy
parents: 1729
diff changeset
29 endif
1771
7f2e75d5b62d build improvements
boisy
parents: 1760
diff changeset
30 ifndef CLOUD9DIR
7f2e75d5b62d build improvements
boisy
parents: 1760
diff changeset
31 CLOUD9DIR = $(HOME)/cloud9
7f2e75d5b62d build improvements
boisy
parents: 1760
diff changeset
32 endif
7f2e75d5b62d build improvements
boisy
parents: 1760
diff changeset
33
7f2e75d5b62d build improvements
boisy
parents: 1760
diff changeset
34 C9 = $(CLOUD9DIR)
1760
27e85b681dab Fixed DEFS issue in 6809l2 and 6309l2 (thanks Rodney!)
boisy
parents: 1759
diff changeset
35 DEFSDIR = $(NITROS9DIR)/defs
1754
9092b25eeb4c rules.mak now uses environment variables as an alternative for placement of
boisy
parents: 1729
diff changeset
36 DSKDIR = $(NITROS9DIR)/dsks
9092b25eeb4c rules.mak now uses environment variables as an alternative for placement of
boisy
parents: 1729
diff changeset
37
299
ce65a48362d5 Added BASE macro, o2u/d2u now execute relative to hosttools
boisy
parents: 224
diff changeset
38
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
39 # If we're using the OS-9 emulator and the *real* OS-9 assembler,
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
40 # uncomment the following two lines.
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
41 #AS = os9 /mnt2/src/ocem/os9/asm
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
42 #ASOUT = o=
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
43
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
44 # Use the cross assembler
1803
6b0d1027e4e0 Removed NITROS9VERSION, NITROS9MAJOR, NITROS9MINOR environment vars from
boisy
parents: 1787
diff changeset
45 AS = mamou -i=$(DEFSDIR)
6b0d1027e4e0 Removed NITROS9VERSION, NITROS9MAJOR, NITROS9MINOR environment vars from
boisy
parents: 1787
diff changeset
46 #AS = os9asm -i=$(DEFSDIR)
2758
e4a0f58a5f9b Found that people who do not have the envirornment variable NITROS9DIR set before building the project get a error missing file "/rules.mak". Found this is caused do to the fact that the code to set this envirornment variable is in the rules.mak which can't get loaded.
drencor-xeen
parents: 2753
diff changeset
47 #AS = lwasm --6309 --format=os9 --pragma=pcaspcr,nosymbolcase,condundefzero --includedir=. --includedir=$(DEFSDIR)
1528
1c5a50add566 Megaread added
boisy
parents: 1394
diff changeset
48 ASOUT = -o
2731
baa835d68db2 Changed rules.mak to remove "-l" option in the AFLAGS. This was done to supress the display of source to terminal screen while compiling project.
drencor-xeen
parents: 2730
diff changeset
49 AFLAGS = -q -aNOS9VER=$(NOS9VER) -aNOS9MAJ=$(NOS9MAJ) -aNOS9MIN=$(NOS9MIN) -aNOS9DBG=$(NOS9DBG)
2055
e89b629e1f61 Removed makefiles
boisy
parents: 2053
diff changeset
50 ifdef PORT
e89b629e1f61 Removed makefiles
boisy
parents: 2053
diff changeset
51 AFLAGS += -a$(PORT)=1
e89b629e1f61 Removed makefiles
boisy
parents: 2053
diff changeset
52 endif
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
53
1879
72cb2773d5ee rules.mak updated with new rules
boisy
parents: 1865
diff changeset
54 # RMA/RLINK
72cb2773d5ee rules.mak updated with new rules
boisy
parents: 1865
diff changeset
55 ASM = rma
2758
e4a0f58a5f9b Found that people who do not have the envirornment variable NITROS9DIR set before building the project get a error missing file "/rules.mak". Found this is caused do to the fact that the code to set this envirornment variable is in the rules.mak which can't get loaded.
drencor-xeen
parents: 2753
diff changeset
56 #ASM = lwasm --format=obj --pragma=pcaspcr,nosymbolcase,condundefzero --includedir=. --includedir=$(DEFSDIR)
e4a0f58a5f9b Found that people who do not have the envirornment variable NITROS9DIR set before building the project get a error missing file "/rules.mak". Found this is caused do to the fact that the code to set this envirornment variable is in the rules.mak which can't get loaded.
drencor-xeen
parents: 2753
diff changeset
57 LINKER = rlink
e4a0f58a5f9b Found that people who do not have the envirornment variable NITROS9DIR set before building the project get a error missing file "/rules.mak". Found this is caused do to the fact that the code to set this envirornment variable is in the rules.mak which can't get loaded.
drencor-xeen
parents: 2753
diff changeset
58 #LINKER = lwlink
1879
72cb2773d5ee rules.mak updated with new rules
boisy
parents: 1865
diff changeset
59
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
60 # Commands
1803
6b0d1027e4e0 Removed NITROS9VERSION, NITROS9MAJOR, NITROS9MINOR environment vars from
boisy
parents: 1787
diff changeset
61 MAKDIR = os9 makdir
224
d5c4d7584bb6 Added -f to rm
boisy
parents: 108
diff changeset
62 RM = rm -f
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
63 MERGE = cat
1654
f62ca34d4419 Level 2: shellplus stand-alone file is no longer copied to CMDS
boisy
parents: 1593
diff changeset
64 MOVE = mv
1123
358aeaeedea9 changed echo to /bin/echo because of MinGW (Windows) needs it
boisy
parents: 1119
diff changeset
65 ECHO = /bin/echo
331
2a7bfa7ce709 Makefile rules updated
boisy
parents: 299
diff changeset
66 CD = cd
2869
cfa6222348f7 makefiles: Separate OS9COPY and CP macros
Tormod Volden <debian.tormod@gmail.com>
parents: 2766
diff changeset
67 CP = cp
cfa6222348f7 makefiles: Separate OS9COPY and CP macros
Tormod Volden <debian.tormod@gmail.com>
parents: 2766
diff changeset
68 OS9COPY = os9 copy -o=0
1528
1c5a50add566 Megaread added
boisy
parents: 1394
diff changeset
69 CPL = $(CP) -l
331
2a7bfa7ce709 Makefile rules updated
boisy
parents: 299
diff changeset
70 TAR = tar
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
71 CHMOD = chmod
1803
6b0d1027e4e0 Removed NITROS9VERSION, NITROS9MAJOR, NITROS9MINOR environment vars from
boisy
parents: 1787
diff changeset
72 IDENT = os9 ident
331
2a7bfa7ce709 Makefile rules updated
boisy
parents: 299
diff changeset
73 IDENT_SHORT = $(IDENT) -s
1803
6b0d1027e4e0 Removed NITROS9VERSION, NITROS9MAJOR, NITROS9MINOR environment vars from
boisy
parents: 1787
diff changeset
74 #UNIX2OS9 = u2o
6b0d1027e4e0 Removed NITROS9VERSION, NITROS9MAJOR, NITROS9MINOR environment vars from
boisy
parents: 1787
diff changeset
75 #OS92UNIX = o2u
6b0d1027e4e0 Removed NITROS9VERSION, NITROS9MAJOR, NITROS9MINOR environment vars from
boisy
parents: 1787
diff changeset
76 OS9FORMAT = os9 format
2765
0bd16cca86b7 Updated rules.mak for all the os9 format's to format the entire disk. People were having some issues with the disk images not being formatted to their full capacity and preventing some functions from working.
drencor-xeen
parents: 2758
diff changeset
77 OS9FORMAT_SS35 = os9 format -t35 -ss -dd -e
0bd16cca86b7 Updated rules.mak for all the os9 format's to format the entire disk. People were having some issues with the disk images not being formatted to their full capacity and preventing some functions from working.
drencor-xeen
parents: 2758
diff changeset
78 OS9FORMAT_SS40 = os9 format -t40 -ss -dd -e
0bd16cca86b7 Updated rules.mak for all the os9 format's to format the entire disk. People were having some issues with the disk images not being formatted to their full capacity and preventing some functions from working.
drencor-xeen
parents: 2758
diff changeset
79 OS9FORMAT_SS80 = os9 format -t80 -ss -dd -e
0bd16cca86b7 Updated rules.mak for all the os9 format's to format the entire disk. People were having some issues with the disk images not being formatted to their full capacity and preventing some functions from working.
drencor-xeen
parents: 2758
diff changeset
80 OS9FORMAT_DS40 = os9 format -t40 -ds -dd -e
0bd16cca86b7 Updated rules.mak for all the os9 format's to format the entire disk. People were having some issues with the disk images not being formatted to their full capacity and preventing some functions from working.
drencor-xeen
parents: 2758
diff changeset
81 OS9FORMAT_DS80 = os9 format -t80 -ds -dd -e
2766
947ed392ce63 Removed the "-e" from the DW3 format option as Aaron Wolfe says the server dynamically extends the disk image if needed.
drencor-xeen
parents: 2765
diff changeset
82 OS9FORMAT_DW3 = os9 format -t1024 -ss -dd
2765
0bd16cca86b7 Updated rules.mak for all the os9 format's to format the entire disk. People were having some issues with the disk images not being formatted to their full capacity and preventing some functions from working.
drencor-xeen
parents: 2758
diff changeset
83 #OS9FORMAT_DW3 = os9 format -t80 -ds -dd -e
1803
6b0d1027e4e0 Removed NITROS9VERSION, NITROS9MAJOR, NITROS9MINOR environment vars from
boisy
parents: 1787
diff changeset
84 OS9GEN = os9 gen
6b0d1027e4e0 Removed NITROS9VERSION, NITROS9MAJOR, NITROS9MINOR environment vars from
boisy
parents: 1787
diff changeset
85 OS9RENAME = os9 rename
6b0d1027e4e0 Removed NITROS9VERSION, NITROS9MAJOR, NITROS9MINOR environment vars from
boisy
parents: 1787
diff changeset
86 OS9ATTR = os9 attr -q
1126
85eed1cde1b7 attr used throughout the makefiles now
boisy
parents: 1123
diff changeset
87 OS9ATTR_TEXT = $(OS9ATTR) -npe -npw -pr -ne -w -r
85eed1cde1b7 attr used throughout the makefiles now
boisy
parents: 1123
diff changeset
88 OS9ATTR_EXEC = $(OS9ATTR) -pe -npw -pr -e -w -r
1803
6b0d1027e4e0 Removed NITROS9VERSION, NITROS9MAJOR, NITROS9MINOR environment vars from
boisy
parents: 1787
diff changeset
89 PADROM = os9 padrom
331
2a7bfa7ce709 Makefile rules updated
boisy
parents: 299
diff changeset
90 MOUNT = sudo mount
2a7bfa7ce709 Makefile rules updated
boisy
parents: 299
diff changeset
91 UMOUNT = sudo umount
2a7bfa7ce709 Makefile rules updated
boisy
parents: 299
diff changeset
92 LOREMOVE = sudo /sbin/losetup -d
2a7bfa7ce709 Makefile rules updated
boisy
parents: 299
diff changeset
93 LOSETUP = sudo /sbin/losetup
2a7bfa7ce709 Makefile rules updated
boisy
parents: 299
diff changeset
94 LINK = ln
2a7bfa7ce709 Makefile rules updated
boisy
parents: 299
diff changeset
95 SOFTLINK = $(LINK) -s
2753
0199552cc6e7 Updated rules.mak so that "zip" will use the best file compression.
drencor-xeen
parents: 2743
diff changeset
96 ARCHIVE = zip -D -9 -j
2512
3dcda506604b added pretty indexer to dskcopy process
aaronwolfe
parents: 2377
diff changeset
97 MKDSKINDEX = $(NITROS9DIR)/3rdparty/utils/aaw/mkdskindex
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
98
355
71b60814fb01 Makefiles modified for uniformity
boisy
parents: 331
diff changeset
99 # Directories
1754
9092b25eeb4c rules.mak now uses environment variables as an alternative for placement of
boisy
parents: 1729
diff changeset
100 3RDPARTY = $(NITROS9DIR)/3rdparty
2052
abea68d64225 Fixed some issues
boisy
parents: 2047
diff changeset
101 LEVEL1 = $(NITROS9DIR)/level1
abea68d64225 Fixed some issues
boisy
parents: 2047
diff changeset
102 LEVEL2 = $(NITROS9DIR)/level2
2352
fdff845a078e Added LEVEL3
boisy
parents: 2335
diff changeset
103 LEVEL3 = $(NITROS9DIR)/level3
2743
b44abaa5da88 Found that the lib folder was not being processed. Corrected issue.
drencor-xeen
parents: 2738
diff changeset
104 NOSLIB = $(NITROS9DIR)/lib
2377
daebc84c2a6e Added new conevience macros
boisy
parents: 2352
diff changeset
105 CC68L1 = $(LEVEL1)/coco
daebc84c2a6e Added new conevience macros
boisy
parents: 2352
diff changeset
106 CC368L2 = $(LEVEL2)/coco3
daebc84c2a6e Added new conevience macros
boisy
parents: 2352
diff changeset
107 CC363L2 = $(LEVEL2)/coco3_6309
daebc84c2a6e Added new conevience macros
boisy
parents: 2352
diff changeset
108 CC363L3 = $(LEVEL3)/coco3_6309
355
71b60814fb01 Makefiles modified for uniformity
boisy
parents: 331
diff changeset
109
1865
c6426b9ca0da Added rules for .r generation
boisy
parents: 1853
diff changeset
110 # C-Cubed Rules
c6426b9ca0da Added rules for .r generation
boisy
parents: 1853
diff changeset
111 %.r: %.c
c6426b9ca0da Added rules for .r generation
boisy
parents: 1853
diff changeset
112 $(CC) $(CFLAGS) $< -r
c6426b9ca0da Added rules for .r generation
boisy
parents: 1853
diff changeset
113
2335
e9acf0137c44 Updated rules.mak
boisy
parents: 2325
diff changeset
114 %.l: %.a
e9acf0137c44 Updated rules.mak
boisy
parents: 2325
diff changeset
115 $(ASM) $< -o=$@
1879
72cb2773d5ee rules.mak updated with new rules
boisy
parents: 1865
diff changeset
116
1865
c6426b9ca0da Added rules for .r generation
boisy
parents: 1853
diff changeset
117 %: %.r
2325
c8aeac0c5fd1 Set linker
boisy
parents: 2193
diff changeset
118 $(LINKER) $(LFLAGS) $^ -o=$@
1865
c6426b9ca0da Added rules for .r generation
boisy
parents: 1853
diff changeset
119
c6426b9ca0da Added rules for .r generation
boisy
parents: 1853
diff changeset
120 %.r: %.a
1879
72cb2773d5ee rules.mak updated with new rules
boisy
parents: 1865
diff changeset
121 $(ASM) $< -o=$@
1865
c6426b9ca0da Added rules for .r generation
boisy
parents: 1853
diff changeset
122
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
123 # File managers
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
124 %.mn: %.asm
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
125 $(AS) $(AFLAGS) $< $(ASOUT)$@
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
126
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
127 # Device drivers
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
128 %.dr: %.asm
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
129 $(AS) $(AFLAGS) $< $(ASOUT)$@
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
130
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
131 # Device descriptors
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
132 %.dd: %.asm
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
133 $(AS) $(AFLAGS) $< $(ASOUT)$@
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
134
1257
b6969b0ae23d Added .sb for subroutine
boisy
parents: 1217
diff changeset
135 # Subroutine modules
b6969b0ae23d Added .sb for subroutine
boisy
parents: 1217
diff changeset
136 %.sb: %.asm
b6969b0ae23d Added .sb for subroutine
boisy
parents: 1217
diff changeset
137 $(AS) $(AFLAGS) $< $(ASOUT)$@
b6969b0ae23d Added .sb for subroutine
boisy
parents: 1217
diff changeset
138
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
139 # Window device descriptors
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
140 %.dw: %.asm
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
141 $(AS) $(AFLAGS) $< $(ASOUT)$@
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
142
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
143 # Terminal device descriptors
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
144 %.dt: %.asm
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
145 $(AS) $(AFLAGS) $< $(ASOUT)$@
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
146
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
147 # I/O subroutines
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
148 %.io: %.asm
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
149 $(AS) $(AFLAGS) $< $(ASOUT)$@
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
150
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
151 # All other modules
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
152 %: %.asm
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
153 $(AS) $(AFLAGS) $< $(ASOUT)$@
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
154