Mercurial > hg > Members > kono > nitros9-code
annotate rules.mak @ 2841:d540a92243e7 lwtools-port
Fix os9l2bbs makefile for make dskcopy
Also add an empty dskcopy target to lib/
author | Tormod Volden <debian.tormod@gmail.com> |
---|---|
date | Wed, 10 Jul 2013 22:11:36 +0200 |
parents | c3ebfd514c0b |
children | f2e92661b4c6 |
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 = os9asm -i=$(DEFSDIR) |
2787
28b6ec8a14d5
Added 'extern' pragam, fixed up rules.mak, changed 'section text' to 'section code' in sources
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2783
diff
changeset
|
46 AS = lwasm --6309 --format=os9 --pragma=pcaspcr,nosymbolcase,condundefzero,undefextern,dollarnotlocal --includedir=. --includedir=$(DEFSDIR) |
2819
c3ebfd514c0b
Fixed an issue where Z* descriptors weren't being made correctly for level 2.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2811
diff
changeset
|
47 ASROM = lwasm --6309 --format=raw --pragma=pcaspcr,nosymbolcase,condundefzero,undefextern,dollarnotlocal --includedir=. --includedir=$(DEFSDIR) |
c3ebfd514c0b
Fixed an issue where Z* descriptors weren't being made correctly for level 2.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2811
diff
changeset
|
48 ASBIN = lwasm --6309 --format=decb --pragma=pcaspcr,nosymbolcase,condundefzero,undefextern,dollarnotlocal --includedir=. --includedir=$(DEFSDIR) |
1528 | 49 ASOUT = -o |
2664
09feb97c181f
Initial changes to use lwasm instead of mamou
William Astle <lost@l-w.ca>
parents:
2512
diff
changeset
|
50 AFLAGS = -DNOS9VER=$(NOS9VER) -DNOS9MAJ=$(NOS9MAJ) -DNOS9MIN=$(NOS9MIN) -DNOS9DBG=$(NOS9DBG) |
2055 | 51 ifdef PORT |
2664
09feb97c181f
Initial changes to use lwasm instead of mamou
William Astle <lost@l-w.ca>
parents:
2512
diff
changeset
|
52 AFLAGS += -D$(PORT)=1 |
2055 | 53 endif |
0 | 54 |
1879 | 55 # RMA/RLINK |
2810
7dbdaa3a7d6c
Removed case related pragma so that inetd assembles correctly
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2799
diff
changeset
|
56 ASM = lwasm --6309 --format=obj --pragma=pcaspcr,condundefzero,undefextern,dollarnotlocal,export --includedir=. |
2789
3012d4990f57
Added --format=os9 to lwlink rule
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2787
diff
changeset
|
57 LINKER = lwlink --format=os9 |
1879 | 58 |
0 | 59 # Commands |
1803
6b0d1027e4e0
Removed NITROS9VERSION, NITROS9MAJOR, NITROS9MINOR environment vars from
boisy
parents:
1787
diff
changeset
|
60 MAKDIR = os9 makdir |
224 | 61 RM = rm -f |
0 | 62 MERGE = cat |
1654
f62ca34d4419
Level 2: shellplus stand-alone file is no longer copied to CMDS
boisy
parents:
1593
diff
changeset
|
63 MOVE = mv |
1123
358aeaeedea9
changed echo to /bin/echo because of MinGW (Windows) needs it
boisy
parents:
1119
diff
changeset
|
64 ECHO = /bin/echo |
331 | 65 CD = cd |
1803
6b0d1027e4e0
Removed NITROS9VERSION, NITROS9MAJOR, NITROS9MINOR environment vars from
boisy
parents:
1787
diff
changeset
|
66 CP = os9 copy -o=0 |
1528 | 67 CPL = $(CP) -l |
331 | 68 TAR = tar |
0 | 69 CHMOD = chmod |
1803
6b0d1027e4e0
Removed NITROS9VERSION, NITROS9MAJOR, NITROS9MINOR environment vars from
boisy
parents:
1787
diff
changeset
|
70 IDENT = os9 ident |
331 | 71 IDENT_SHORT = $(IDENT) -s |
1803
6b0d1027e4e0
Removed NITROS9VERSION, NITROS9MAJOR, NITROS9MINOR environment vars from
boisy
parents:
1787
diff
changeset
|
72 #UNIX2OS9 = u2o |
6b0d1027e4e0
Removed NITROS9VERSION, NITROS9MAJOR, NITROS9MINOR environment vars from
boisy
parents:
1787
diff
changeset
|
73 #OS92UNIX = o2u |
2770
bfe3de781ddf
Added Arduino dwread/dwwrite changes
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2724
diff
changeset
|
74 OS9FORMAT = os9 format -e |
bfe3de781ddf
Added Arduino dwread/dwwrite changes
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2724
diff
changeset
|
75 OS9FORMAT_SS35 = os9 format -e -t35 -ss -dd |
bfe3de781ddf
Added Arduino dwread/dwwrite changes
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2724
diff
changeset
|
76 OS9FORMAT_SS40 = os9 format -e -t40 -ss -dd |
bfe3de781ddf
Added Arduino dwread/dwwrite changes
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2724
diff
changeset
|
77 OS9FORMAT_SS80 = os9 format -e -t80 -ss -dd |
bfe3de781ddf
Added Arduino dwread/dwwrite changes
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2724
diff
changeset
|
78 OS9FORMAT_DS40 = os9 format -e -t40 -ds -dd |
bfe3de781ddf
Added Arduino dwread/dwwrite changes
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2724
diff
changeset
|
79 OS9FORMAT_DS80 = os9 format -e -t80 -ds -dd |
2811
611715587834
Updated rules.mak and level1/coco1/bootfiles/makefile
David Ladd <drencor-xeen@users.sf.net>
parents:
2810
diff
changeset
|
80 OS9FORMAT_DW = os9 format -t1024 -ss -dd |
1803
6b0d1027e4e0
Removed NITROS9VERSION, NITROS9MAJOR, NITROS9MINOR environment vars from
boisy
parents:
1787
diff
changeset
|
81 OS9GEN = os9 gen |
6b0d1027e4e0
Removed NITROS9VERSION, NITROS9MAJOR, NITROS9MINOR environment vars from
boisy
parents:
1787
diff
changeset
|
82 OS9RENAME = os9 rename |
6b0d1027e4e0
Removed NITROS9VERSION, NITROS9MAJOR, NITROS9MINOR environment vars from
boisy
parents:
1787
diff
changeset
|
83 OS9ATTR = os9 attr -q |
1126 | 84 OS9ATTR_TEXT = $(OS9ATTR) -npe -npw -pr -ne -w -r |
85 OS9ATTR_EXEC = $(OS9ATTR) -pe -npw -pr -e -w -r | |
1803
6b0d1027e4e0
Removed NITROS9VERSION, NITROS9MAJOR, NITROS9MINOR environment vars from
boisy
parents:
1787
diff
changeset
|
86 PADROM = os9 padrom |
331 | 87 MOUNT = sudo mount |
88 UMOUNT = sudo umount | |
89 LOREMOVE = sudo /sbin/losetup -d | |
90 LOSETUP = sudo /sbin/losetup | |
91 LINK = ln | |
92 SOFTLINK = $(LINK) -s | |
2774
1868fbf470e7
Merged lwtools-port (2773:ce3dba57003b) and mainline (2772:0a3f4d8ea6d5)
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2770
diff
changeset
|
93 ARCHIVE = zip -D -9 -j |
2512 | 94 MKDSKINDEX = $(NITROS9DIR)/3rdparty/utils/aaw/mkdskindex |
0 | 95 |
355 | 96 # Directories |
1754
9092b25eeb4c
rules.mak now uses environment variables as an alternative for placement of
boisy
parents:
1729
diff
changeset
|
97 3RDPARTY = $(NITROS9DIR)/3rdparty |
2052 | 98 LEVEL1 = $(NITROS9DIR)/level1 |
99 LEVEL2 = $(NITROS9DIR)/level2 | |
2352 | 100 LEVEL3 = $(NITROS9DIR)/level3 |
2774
1868fbf470e7
Merged lwtools-port (2773:ce3dba57003b) and mainline (2772:0a3f4d8ea6d5)
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2770
diff
changeset
|
101 NOSLIB = $(NITROS9DIR)/lib |
2799
5a3acdd1c7d6
Updated level1/coco1/modules/makefile , level2/coco3/modules/makefile , & rules.mak for missing values for drive descriptors.
drencor-xeen
parents:
2789
diff
changeset
|
102 CC68L1 = $(LEVEL1)/coco1 |
2377 | 103 CC368L2 = $(LEVEL2)/coco3 |
104 CC363L2 = $(LEVEL2)/coco3_6309 | |
105 CC363L3 = $(LEVEL3)/coco3_6309 | |
355 | 106 |
2799
5a3acdd1c7d6
Updated level1/coco1/modules/makefile , level2/coco3/modules/makefile , & rules.mak for missing values for drive descriptors.
drencor-xeen
parents:
2789
diff
changeset
|
107 # HDD Drive ID's |
5a3acdd1c7d6
Updated level1/coco1/modules/makefile , level2/coco3/modules/makefile , & rules.mak for missing values for drive descriptors.
drencor-xeen
parents:
2789
diff
changeset
|
108 ID0 = -DITDRV=0 |
5a3acdd1c7d6
Updated level1/coco1/modules/makefile , level2/coco3/modules/makefile , & rules.mak for missing values for drive descriptors.
drencor-xeen
parents:
2789
diff
changeset
|
109 ID1 = -DITDRV=1 |
5a3acdd1c7d6
Updated level1/coco1/modules/makefile , level2/coco3/modules/makefile , & rules.mak for missing values for drive descriptors.
drencor-xeen
parents:
2789
diff
changeset
|
110 ID2 = -DITDRV=2 |
5a3acdd1c7d6
Updated level1/coco1/modules/makefile , level2/coco3/modules/makefile , & rules.mak for missing values for drive descriptors.
drencor-xeen
parents:
2789
diff
changeset
|
111 ID3 = -DITDRV=3 |
5a3acdd1c7d6
Updated level1/coco1/modules/makefile , level2/coco3/modules/makefile , & rules.mak for missing values for drive descriptors.
drencor-xeen
parents:
2789
diff
changeset
|
112 ID4 = -DITDRV=4 |
5a3acdd1c7d6
Updated level1/coco1/modules/makefile , level2/coco3/modules/makefile , & rules.mak for missing values for drive descriptors.
drencor-xeen
parents:
2789
diff
changeset
|
113 ID5 = -DITDRV=5 |
5a3acdd1c7d6
Updated level1/coco1/modules/makefile , level2/coco3/modules/makefile , & rules.mak for missing values for drive descriptors.
drencor-xeen
parents:
2789
diff
changeset
|
114 ID6 = -DITDRV=6 |
5a3acdd1c7d6
Updated level1/coco1/modules/makefile , level2/coco3/modules/makefile , & rules.mak for missing values for drive descriptors.
drencor-xeen
parents:
2789
diff
changeset
|
115 ID7 = -DITDRV=7 |
5a3acdd1c7d6
Updated level1/coco1/modules/makefile , level2/coco3/modules/makefile , & rules.mak for missing values for drive descriptors.
drencor-xeen
parents:
2789
diff
changeset
|
116 SLAVE = -DITDNS=1 |
5a3acdd1c7d6
Updated level1/coco1/modules/makefile , level2/coco3/modules/makefile , & rules.mak for missing values for drive descriptors.
drencor-xeen
parents:
2789
diff
changeset
|
117 MASTER = -DITDNS=0 |
5a3acdd1c7d6
Updated level1/coco1/modules/makefile , level2/coco3/modules/makefile , & rules.mak for missing values for drive descriptors.
drencor-xeen
parents:
2789
diff
changeset
|
118 |
5a3acdd1c7d6
Updated level1/coco1/modules/makefile , level2/coco3/modules/makefile , & rules.mak for missing values for drive descriptors.
drencor-xeen
parents:
2789
diff
changeset
|
119 |
1865 | 120 # C-Cubed Rules |
2783
03f26e88b809
Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2782
diff
changeset
|
121 %.o: %.c |
1865 | 122 $(CC) $(CFLAGS) $< -r |
123 | |
2783
03f26e88b809
Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2782
diff
changeset
|
124 %.a: %.o |
2782
aaba193af04f
Updated code to use lwasm/lwlink
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2774
diff
changeset
|
125 lwar -c $@ $? |
1879 | 126 |
2787
28b6ec8a14d5
Added 'extern' pragam, fixed up rules.mak, changed 'section text' to 'section code' in sources
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2783
diff
changeset
|
127 %: %.o |
28b6ec8a14d5
Added 'extern' pragam, fixed up rules.mak, changed 'section text' to 'section code' in sources
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2783
diff
changeset
|
128 $(LINKER) $(LFLAGS) $^ -o$@ |
28b6ec8a14d5
Added 'extern' pragam, fixed up rules.mak, changed 'section text' to 'section code' in sources
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2783
diff
changeset
|
129 |
2783
03f26e88b809
Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2782
diff
changeset
|
130 %: %.a |
2782
aaba193af04f
Updated code to use lwasm/lwlink
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2774
diff
changeset
|
131 $(LINKER) $(LFLAGS) $^ -o$@ |
1865 | 132 |
2783
03f26e88b809
Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2782
diff
changeset
|
133 %.o: %.as |
2782
aaba193af04f
Updated code to use lwasm/lwlink
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2774
diff
changeset
|
134 $(ASM) $< -o$@ |
1865 | 135 |
0 | 136 # File managers |
137 %.mn: %.asm | |
138 $(AS) $(AFLAGS) $< $(ASOUT)$@ | |
139 | |
140 # Device drivers | |
141 %.dr: %.asm | |
142 $(AS) $(AFLAGS) $< $(ASOUT)$@ | |
143 | |
144 # Device descriptors | |
145 %.dd: %.asm | |
146 $(AS) $(AFLAGS) $< $(ASOUT)$@ | |
147 | |
1257 | 148 # Subroutine modules |
149 %.sb: %.asm | |
150 $(AS) $(AFLAGS) $< $(ASOUT)$@ | |
151 | |
0 | 152 # Window device descriptors |
153 %.dw: %.asm | |
154 $(AS) $(AFLAGS) $< $(ASOUT)$@ | |
155 | |
156 # Terminal device descriptors | |
157 %.dt: %.asm | |
158 $(AS) $(AFLAGS) $< $(ASOUT)$@ | |
159 | |
160 # I/O subroutines | |
161 %.io: %.asm | |
162 $(AS) $(AFLAGS) $< $(ASOUT)$@ | |
163 | |
164 # All other modules | |
165 %: %.asm | |
166 $(AS) $(AFLAGS) $< $(ASOUT)$@ | |
167 |