Mercurial > hg > Members > kono > nitros9-code
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 |
rev | line source |
---|---|
1393 | 1 # The NitrOS-9 Project |
2 # Project-Wide Rules | |
0 | 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 | 11 |
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 | 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 | 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 | 22 |
1865 | 23 CC = c3 |
24 | |
1805 | 25 NITROS9VER = v0$(NOS9VER)0$(NOS9MAJ)0$(NOS9MIN) |
1787 | 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 | 30 ifndef CLOUD9DIR |
31 CLOUD9DIR = $(HOME)/cloud9 | |
32 endif | |
33 | |
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 | 39 # If we're using the OS-9 emulator and the *real* OS-9 assembler, |
40 # uncomment the following two lines. | |
41 #AS = os9 /mnt2/src/ocem/os9/asm | |
42 #ASOUT = o= | |
43 | |
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 | 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 | 50 ifdef PORT |
51 AFLAGS += -a$(PORT)=1 | |
52 endif | |
0 | 53 |
1879 | 54 # RMA/RLINK |
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 | 59 |
0 | 60 # Commands |
1803
6b0d1027e4e0
Removed NITROS9VERSION, NITROS9MAJOR, NITROS9MINOR environment vars from
boisy
parents:
1787
diff
changeset
|
61 MAKDIR = os9 makdir |
224 | 62 RM = rm -f |
0 | 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 | 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 | 69 CPL = $(CP) -l |
331 | 70 TAR = tar |
0 | 71 CHMOD = chmod |
1803
6b0d1027e4e0
Removed NITROS9VERSION, NITROS9MAJOR, NITROS9MINOR environment vars from
boisy
parents:
1787
diff
changeset
|
72 IDENT = os9 ident |
331 | 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 | 87 OS9ATTR_TEXT = $(OS9ATTR) -npe -npw -pr -ne -w -r |
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 | 90 MOUNT = sudo mount |
91 UMOUNT = sudo umount | |
92 LOREMOVE = sudo /sbin/losetup -d | |
93 LOSETUP = sudo /sbin/losetup | |
94 LINK = ln | |
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 | 97 MKDSKINDEX = $(NITROS9DIR)/3rdparty/utils/aaw/mkdskindex |
0 | 98 |
355 | 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 | 101 LEVEL1 = $(NITROS9DIR)/level1 |
102 LEVEL2 = $(NITROS9DIR)/level2 | |
2352 | 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 | 105 CC68L1 = $(LEVEL1)/coco |
106 CC368L2 = $(LEVEL2)/coco3 | |
107 CC363L2 = $(LEVEL2)/coco3_6309 | |
108 CC363L3 = $(LEVEL3)/coco3_6309 | |
355 | 109 |
1865 | 110 # C-Cubed Rules |
111 %.r: %.c | |
112 $(CC) $(CFLAGS) $< -r | |
113 | |
2335 | 114 %.l: %.a |
115 $(ASM) $< -o=$@ | |
1879 | 116 |
1865 | 117 %: %.r |
2325 | 118 $(LINKER) $(LFLAGS) $^ -o=$@ |
1865 | 119 |
120 %.r: %.a | |
1879 | 121 $(ASM) $< -o=$@ |
1865 | 122 |
0 | 123 # File managers |
124 %.mn: %.asm | |
125 $(AS) $(AFLAGS) $< $(ASOUT)$@ | |
126 | |
127 # Device drivers | |
128 %.dr: %.asm | |
129 $(AS) $(AFLAGS) $< $(ASOUT)$@ | |
130 | |
131 # Device descriptors | |
132 %.dd: %.asm | |
133 $(AS) $(AFLAGS) $< $(ASOUT)$@ | |
134 | |
1257 | 135 # Subroutine modules |
136 %.sb: %.asm | |
137 $(AS) $(AFLAGS) $< $(ASOUT)$@ | |
138 | |
0 | 139 # Window device descriptors |
140 %.dw: %.asm | |
141 $(AS) $(AFLAGS) $< $(ASOUT)$@ | |
142 | |
143 # Terminal device descriptors | |
144 %.dt: %.asm | |
145 $(AS) $(AFLAGS) $< $(ASOUT)$@ | |
146 | |
147 # I/O subroutines | |
148 %.io: %.asm | |
149 $(AS) $(AFLAGS) $< $(ASOUT)$@ | |
150 | |
151 # All other modules | |
152 %: %.asm | |
153 $(AS) $(AFLAGS) $< $(ASOUT)$@ | |
154 |