Compare commits
609 Commits
R3.13.0-be
...
R3.13.0-be
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
115f2b8a1e | ||
|
|
fefb8454c7 | ||
|
|
e4cf1df857 | ||
|
|
f3bd38caca | ||
|
|
c104460654 | ||
|
|
fc3db2c3bf | ||
|
|
41e02220d1 | ||
|
|
8f5061b28e | ||
|
|
5898d94c4c | ||
|
|
b2ced4889b | ||
|
|
a65e5f1f73 | ||
|
|
839b8bdb5f | ||
|
|
421d98a936 | ||
|
|
95b6d4a998 | ||
|
|
cc2ea961d7 | ||
|
|
3a0de109a3 | ||
|
|
41aad467a6 | ||
|
|
ebf6c4932a | ||
|
|
b587d3639f | ||
|
|
7408f7f29f | ||
|
|
e2baae4281 | ||
|
|
b61b816c49 | ||
|
|
5257374a73 | ||
|
|
f732ff2505 | ||
|
|
8e2e15194a | ||
|
|
4a3993c4e5 | ||
|
|
f11dadd032 | ||
|
|
881cbd60e3 | ||
|
|
598e87d598 | ||
|
|
6e8fc4f9c1 | ||
|
|
1be3c39e50 | ||
|
|
fc48d2dd1d | ||
|
|
11084a5dfc | ||
|
|
7946e9b921 | ||
|
|
2a1f06cd2a | ||
|
|
ccf3271fe1 | ||
|
|
c99ee0317c | ||
|
|
5bf13da02c | ||
|
|
cbd5d9a36e | ||
|
|
bb8e8f46cb | ||
|
|
6b6e5e7515 | ||
|
|
0b0b23c6d6 | ||
|
|
1ed2559cc3 | ||
|
|
9a068b824d | ||
|
|
32a847087d | ||
|
|
67fbf5b746 | ||
|
|
a0e8290c50 | ||
|
|
7cde4f8f2b | ||
|
|
437142b5bb | ||
|
|
42adbd20c8 | ||
|
|
85a2ef6e4d | ||
|
|
62ce79e147 | ||
|
|
3a840f6e2f | ||
|
|
69c62573b0 | ||
|
|
e1e8a34b2f | ||
|
|
13c9ae5fe3 | ||
|
|
6912ff4929 | ||
|
|
0e387c8936 | ||
|
|
e8e3b5226e | ||
|
|
b87f049c2d | ||
|
|
0d7698e0d4 | ||
|
|
ebbaee5ed2 | ||
|
|
bff266bef3 | ||
|
|
1d6f9f80f6 | ||
|
|
8a298ab07c | ||
|
|
7f317f4d55 | ||
|
|
50b19bc74f | ||
|
|
9f35f8043e | ||
|
|
19091f245b | ||
|
|
0bc395108d | ||
|
|
2b6367e1d4 | ||
|
|
6fb8477b3a | ||
|
|
39c22d2ee0 | ||
|
|
721840498c | ||
|
|
56e35d8305 | ||
|
|
a42a244aed | ||
|
|
b8dba0a4ad | ||
|
|
fe9f9b91fb | ||
|
|
206a04e15f | ||
|
|
db11fd957d | ||
|
|
2517d52437 | ||
|
|
f85aba61ed | ||
|
|
147403b0e5 | ||
|
|
afa84f396b | ||
|
|
9888b965d8 | ||
|
|
c3e2f58d96 | ||
|
|
697200e942 | ||
|
|
33b940562e | ||
|
|
08f2298215 | ||
|
|
8c992ed466 | ||
|
|
c442950e5f | ||
|
|
0a5dffc069 | ||
|
|
744a0de15d | ||
|
|
7c42f005db | ||
|
|
652cb0d66c | ||
|
|
9f77fbccd1 | ||
|
|
de2864a5a5 | ||
|
|
2caf1628ca | ||
|
|
f1865a507c | ||
|
|
8013fecb61 | ||
|
|
8d6deea83d | ||
|
|
da3eed2a6f | ||
|
|
5de817b531 | ||
|
|
a173792b1f | ||
|
|
6af690f524 | ||
|
|
1891940018 | ||
|
|
6adb68d7d6 | ||
|
|
c1225d880e | ||
|
|
017686e0f6 | ||
|
|
f61f401683 | ||
|
|
3a5e5fc5d7 | ||
|
|
8d0712bea4 | ||
|
|
0804f7fb08 | ||
|
|
7a8878dec6 | ||
|
|
92ae7b14c4 | ||
|
|
eda3aae608 | ||
|
|
8e363122b3 | ||
|
|
ff378e17c9 | ||
|
|
5e1157d363 | ||
|
|
d3c6310bb1 | ||
|
|
5c4d82cacc | ||
|
|
414c8ed603 | ||
|
|
603c598e14 | ||
|
|
a3cad9563f | ||
|
|
cb95ba41ac | ||
|
|
8e000eb634 | ||
|
|
b00f152456 | ||
|
|
566d70bf9c | ||
|
|
bc6bf59bda | ||
|
|
6fcbfa15b3 | ||
|
|
121a2dc9ae | ||
|
|
35f9a872f7 | ||
|
|
0efb9a0c8c | ||
|
|
63da245439 | ||
|
|
8b83afc1bb | ||
|
|
54e6f9aed1 | ||
|
|
4c99a53852 | ||
|
|
b95f7afd3c | ||
|
|
a2db2d88ca | ||
|
|
cbe00bb737 | ||
|
|
7efb007b53 | ||
|
|
4e7917d9fe | ||
|
|
ee8fad1e7a | ||
|
|
0fa8b1e62d | ||
|
|
117f75eac4 | ||
|
|
85432e6307 | ||
|
|
cdbbf69a1e | ||
|
|
fb8e026551 | ||
|
|
5f1b0c19a8 | ||
|
|
bbef91c39e | ||
|
|
f0120adba4 | ||
|
|
457d64640e | ||
|
|
eae68a0872 | ||
|
|
48bbe65f60 | ||
|
|
6e04d47209 | ||
|
|
02dc1c300c | ||
|
|
2d1c1d3e09 | ||
|
|
5e9ebd8b9b | ||
|
|
c5bc89f11b | ||
|
|
bd2407153c | ||
|
|
2b42b3eab0 | ||
|
|
77146706a6 | ||
|
|
b6d0f183de | ||
|
|
4f649964de | ||
|
|
f565901231 | ||
|
|
9821aaa612 | ||
|
|
a364fbe125 | ||
|
|
0500ccb4da | ||
|
|
3db726ddac | ||
|
|
edff0569b6 | ||
|
|
cbbeb7ea25 | ||
|
|
ccb055cf78 | ||
|
|
4ddd63d141 | ||
|
|
fdd89be534 | ||
|
|
ed77e687a3 | ||
|
|
f5e2c72b18 | ||
|
|
1e4e78d6bc | ||
|
|
3ede2a2512 | ||
|
|
1995c735a1 | ||
|
|
79a2ef7ad1 | ||
|
|
11b9be6dfd | ||
|
|
d21c4ba0ab | ||
|
|
a23b0be5a5 | ||
|
|
199fdff643 | ||
|
|
d762ed7af6 | ||
|
|
85e3a6e0a1 | ||
|
|
74f253820a | ||
|
|
3c73143f3a | ||
|
|
18cafc2d06 | ||
|
|
6f6e34dced | ||
|
|
a16f99b8d0 | ||
|
|
46a180f755 | ||
|
|
cebd5f3cf8 | ||
|
|
2ced0242bd | ||
|
|
7edc0cd149 | ||
|
|
417411ab62 | ||
|
|
ea589a75a9 | ||
|
|
d00b72f3e8 | ||
|
|
56cf313613 | ||
|
|
98498419c0 | ||
|
|
653d8f1dae | ||
|
|
8405cf7323 | ||
|
|
80a8d9c37f | ||
|
|
ce87cee840 | ||
|
|
0ca6bf3ecc | ||
|
|
8e0a2c9e0f | ||
|
|
fad67f380d | ||
|
|
4dc12e992d | ||
|
|
bf6f69065c | ||
|
|
be09fad901 | ||
|
|
0b07bf8094 | ||
|
|
d2c38b8db5 | ||
|
|
7f1249ae45 | ||
|
|
617b4dd26f | ||
|
|
ef7b658bc0 | ||
|
|
ef6adf90fc | ||
|
|
ca2a66514f | ||
|
|
ce3095d1fc | ||
|
|
2869b388dd | ||
|
|
dc03deead7 | ||
|
|
99a0613092 | ||
|
|
38044917f4 | ||
|
|
2092f9faee | ||
|
|
f0ea531cc4 | ||
|
|
54de9067ee | ||
|
|
dcbf2a6331 | ||
|
|
63d0339d05 | ||
|
|
8d88cf2277 | ||
|
|
450f76d205 | ||
|
|
890de43c91 | ||
|
|
a8879d0f41 | ||
|
|
cdab5000bc | ||
|
|
fd0daa0b92 | ||
|
|
86219510c6 | ||
|
|
471a5a71e6 | ||
|
|
ae1b395a87 | ||
|
|
fecf4de0d1 | ||
|
|
378cc22c07 | ||
|
|
6f3b75b485 | ||
|
|
2b1aab904e | ||
|
|
8afabaf4e1 | ||
|
|
ff02a0fe6e | ||
|
|
8b9b9c0bf6 | ||
|
|
b134b99686 | ||
|
|
61f0440de5 | ||
|
|
c68ace1542 | ||
|
|
2207e20627 | ||
|
|
0a4d1f26d1 | ||
|
|
1114813608 | ||
|
|
0b09d90b12 | ||
|
|
219324f304 | ||
|
|
f0e00aacc8 | ||
|
|
02e5131522 | ||
|
|
194784d781 | ||
|
|
a0a5198a2f | ||
|
|
e41619eea3 | ||
|
|
93deef330a | ||
|
|
5507e033d8 | ||
|
|
d0c26b575e | ||
|
|
66c844cebf | ||
|
|
fc449a487e | ||
|
|
4be53cd0fa | ||
|
|
2adb49b93e | ||
|
|
d7bb945cc0 | ||
|
|
752fbcc6dc | ||
|
|
d1e1a5f249 | ||
|
|
a13d49cf81 | ||
|
|
2fc75ca08e | ||
|
|
7f3c5e6cbb | ||
|
|
355fe461e7 | ||
|
|
b87c59eab2 | ||
|
|
e2edfb470f | ||
|
|
8f642dfe1e | ||
|
|
ad533e7c35 | ||
|
|
5937eb099e | ||
|
|
9ca456bfb3 | ||
|
|
52854cd1ed | ||
|
|
7a92120974 | ||
|
|
9b1cf4a467 | ||
|
|
62ae22ef7a | ||
|
|
9e7f4020c2 | ||
|
|
17aa8609b0 | ||
|
|
4b83df7f01 | ||
|
|
a1acb62b58 | ||
|
|
71144f3c20 | ||
|
|
7c89b7850f | ||
|
|
cdb42f3c11 | ||
|
|
22cf3b4935 | ||
|
|
d584853a94 | ||
|
|
94ce85b538 | ||
|
|
1427caaee9 | ||
|
|
3846165645 | ||
|
|
fdddf61b06 | ||
|
|
07e07db9c7 | ||
|
|
1c091779a8 | ||
|
|
88140f9116 | ||
|
|
e9b078491b | ||
|
|
218ae4569a | ||
|
|
03188d0eec | ||
|
|
88c99148b2 | ||
|
|
261067b0f5 | ||
|
|
89b90296ec | ||
|
|
dff79f6bea | ||
|
|
fa64c5bdd2 | ||
|
|
a9acb01482 | ||
|
|
de4c463956 | ||
|
|
07857588f0 | ||
|
|
f9346a7eca | ||
|
|
e332794a4a | ||
|
|
ab4c4baa52 | ||
|
|
b372a53bbb | ||
|
|
e031341af1 | ||
|
|
ce5adaa037 | ||
|
|
b578f783e2 | ||
|
|
2c0a4561bd | ||
|
|
f14ac97ee2 | ||
|
|
8431539f23 | ||
|
|
7f8be4b3a1 | ||
|
|
59304ffd99 | ||
|
|
7c124f6e93 | ||
|
|
7543005120 | ||
|
|
f4784cafb5 | ||
|
|
c80e584dfa | ||
|
|
4820f93b6a | ||
|
|
eff915d837 | ||
|
|
a7e61ddeb8 | ||
|
|
fb624a76d2 | ||
|
|
33d5b78b5b | ||
|
|
e6a68089c6 | ||
|
|
4d1875e738 | ||
|
|
737f4b83e6 | ||
|
|
a4362b3b3f | ||
|
|
96f6b17458 | ||
|
|
e5df8aef5b | ||
|
|
f8f7240e12 | ||
|
|
7bab56dcb7 | ||
|
|
37c4bead67 | ||
|
|
3b934ac775 | ||
|
|
d34ad2d0ff | ||
|
|
ff0e52d4b4 | ||
|
|
4961e0c799 | ||
|
|
c41ea11302 | ||
|
|
8215339e79 | ||
|
|
49d0571e4a | ||
|
|
a93baf6214 | ||
|
|
8dcf6e1a5f | ||
|
|
687770d207 | ||
|
|
a897ba6ac9 | ||
|
|
87efbf9a7c | ||
|
|
7aa17be09c | ||
|
|
292bbca26b | ||
|
|
ede722c5da | ||
|
|
6844074eac | ||
|
|
26385135f4 | ||
|
|
079e377937 | ||
|
|
369841f425 | ||
|
|
3f7bfda8d8 | ||
|
|
cfc470d480 | ||
|
|
ff7a84bbb1 | ||
|
|
485817d819 | ||
|
|
bf4738a2b3 | ||
|
|
4449495196 | ||
|
|
d89ceac446 | ||
|
|
a9a77b8a9c | ||
|
|
d8fdf046d1 | ||
|
|
5f2999d9c4 | ||
|
|
0a943103f2 | ||
|
|
8e34d8cc43 | ||
|
|
e05ed3ebae | ||
|
|
da7f5837ec | ||
|
|
d8fc7ff7bd | ||
|
|
66d2971efb | ||
|
|
16e9a2dbc0 | ||
|
|
77cf658c05 | ||
|
|
a1e16b72b7 | ||
|
|
f48578f681 | ||
|
|
cbc3f74479 | ||
|
|
569d7e7879 | ||
|
|
2d6ac57834 | ||
|
|
44aae92786 | ||
|
|
9976984eb8 | ||
|
|
452d3d68ca | ||
|
|
a609cfaa02 | ||
|
|
c12f73e2b3 | ||
|
|
fd72915fae | ||
|
|
8d5cfe739f | ||
|
|
d40253a1b5 | ||
|
|
55589cb65a | ||
|
|
14127052f1 | ||
|
|
5201df3dbc | ||
|
|
3263a885a3 | ||
|
|
4dbb3d18de | ||
|
|
31b046e108 | ||
|
|
c25f195f08 | ||
|
|
f8910ba651 | ||
|
|
9b05ce2169 | ||
|
|
6bbc5576f9 | ||
|
|
52b5b08b62 | ||
|
|
c83ef56154 | ||
|
|
77c34614a2 | ||
|
|
0f925b7264 | ||
|
|
17ff2420b4 | ||
|
|
1f722b453d | ||
|
|
5bcd8e3fe7 | ||
|
|
cacdbe8a7e | ||
|
|
8397c013f0 | ||
|
|
40f6521d20 | ||
|
|
183386fc02 | ||
|
|
ee83524e6b | ||
|
|
58b02d04cb | ||
|
|
68006545e1 | ||
|
|
9a0e885a2e | ||
|
|
4013ea544b | ||
|
|
9258159419 | ||
|
|
ecc19506ef | ||
|
|
6373069d52 | ||
|
|
2a8ec06437 | ||
|
|
603519ae1c | ||
|
|
f7433d8e93 | ||
|
|
5ca50b7ce7 | ||
|
|
7287113d58 | ||
|
|
179c9f6df0 | ||
|
|
a160ebf5ba | ||
|
|
b52605705b | ||
|
|
3ef7c191db | ||
|
|
73dc2a91e4 | ||
|
|
ad76c5efab | ||
|
|
5981891ee0 | ||
|
|
884737e82e | ||
|
|
e301e1b359 | ||
|
|
a3b1033015 | ||
|
|
ac5e26f132 | ||
|
|
19cc8098dc | ||
|
|
49da47700d | ||
|
|
3d22feedd8 | ||
|
|
bab66fe7cc | ||
|
|
4de3accb61 | ||
|
|
ba2b082abd | ||
|
|
086f5999aa | ||
|
|
96f51f2b99 | ||
|
|
a93773ae77 | ||
|
|
d997adeb16 | ||
|
|
299c22ff0f | ||
|
|
71e83671aa | ||
|
|
1b66a4c204 | ||
|
|
0c8f41a6a0 | ||
|
|
5268e13e74 | ||
|
|
a0d4d84622 | ||
|
|
9427acb0a1 | ||
|
|
41d5c292f9 | ||
|
|
f2ceaba174 | ||
|
|
0faa5d56cc | ||
|
|
072c850568 | ||
|
|
0f4b4deb80 | ||
|
|
e22ae5f857 | ||
|
|
926298ac6d | ||
|
|
e135b2a4c0 | ||
|
|
69a07d8807 | ||
|
|
5c341931d0 | ||
|
|
f78d291850 | ||
|
|
89e5f59610 | ||
|
|
09ce70661a | ||
|
|
22b550ed35 | ||
|
|
a17b659a86 | ||
|
|
b5e120d082 | ||
|
|
b8d6a8216e | ||
|
|
5587867f6f | ||
|
|
be33ae291e | ||
|
|
932a4b0d5c | ||
|
|
7452aea2bc | ||
|
|
178e034e75 | ||
|
|
cbb5a6acde | ||
|
|
08a8e874eb | ||
|
|
29f381b8f4 | ||
|
|
5d123c6a4d | ||
|
|
2d999ed858 | ||
|
|
956fba853e | ||
|
|
97b96da957 | ||
|
|
63a377ce99 | ||
|
|
84df076e38 | ||
|
|
582d4b64cd | ||
|
|
ebebde9539 | ||
|
|
8771c33c46 | ||
|
|
3eae90a803 | ||
|
|
693de689e9 | ||
|
|
a30a0fcbaa | ||
|
|
0283890686 | ||
|
|
c1d0a4ad5a | ||
|
|
b2fcff709b | ||
|
|
aed16987e2 | ||
|
|
b6a5423a1f | ||
|
|
9610b9a07d | ||
|
|
98df963844 | ||
|
|
19f9d0c14d | ||
|
|
a5e1223b0c | ||
|
|
0db9c03505 | ||
|
|
a3ce428cdd | ||
|
|
057e1723cb | ||
|
|
0f156d5219 | ||
|
|
1d39b11b7f | ||
|
|
9e12de8e4f | ||
|
|
4aa19f07d7 | ||
|
|
142b7515e3 | ||
|
|
8feefadabf | ||
|
|
6a9030e5e6 | ||
|
|
bece5d0b9a | ||
|
|
24e0989142 | ||
|
|
815668143f | ||
|
|
737278aa41 | ||
|
|
c14d23494c | ||
|
|
d611fa2d75 | ||
|
|
1aa384308d | ||
|
|
2e80e8c2ee | ||
|
|
0830382ec7 | ||
|
|
c253066bc7 | ||
|
|
6fca0cd260 | ||
|
|
470152454b | ||
|
|
4a8507cb0d | ||
|
|
6917b31975 | ||
|
|
0cf19108db | ||
|
|
01b3617614 | ||
|
|
27567a54ed | ||
|
|
c04f34be42 | ||
|
|
0d2b196be2 | ||
|
|
7c23cf9c8c | ||
|
|
2d0dd7828f | ||
|
|
6fbc050c96 | ||
|
|
5856008613 | ||
|
|
f3003d9052 | ||
|
|
340ffec332 | ||
|
|
91c6f156ff | ||
|
|
2008c19e7d | ||
|
|
4dcb0e3ae6 | ||
|
|
74bc7758b5 | ||
|
|
17143d0e12 | ||
|
|
40be4d1cd5 | ||
|
|
d1ba9be665 | ||
|
|
7f6bd17474 | ||
|
|
6a534ca2b5 | ||
|
|
26ec4dd5c8 | ||
|
|
a0db9a2eb2 | ||
|
|
b5a102ef79 | ||
|
|
ed1491bb7b | ||
|
|
7fabc325bb | ||
|
|
5b546d2467 | ||
|
|
6440239832 | ||
|
|
cb6c444a19 | ||
|
|
c251b05020 | ||
|
|
1f7cc343c5 | ||
|
|
d67eb28145 | ||
|
|
3001f7e82f | ||
|
|
3982ea7d17 | ||
|
|
3fe00ec2a9 | ||
|
|
11fa08c1e0 | ||
|
|
b8d2273683 | ||
|
|
77fc9734b1 | ||
|
|
289302f603 | ||
|
|
a01241aa19 | ||
|
|
525842b076 | ||
|
|
03a4c8ad01 | ||
|
|
8a7158b3c6 | ||
|
|
08c57574d5 | ||
|
|
a6c40247f1 | ||
|
|
86969d7b3a | ||
|
|
a3c13f6da6 | ||
|
|
0d0566253e | ||
|
|
15fda603a5 | ||
|
|
7c0895bd82 | ||
|
|
5311ba4c15 | ||
|
|
27b0c05bcf | ||
|
|
435208afa8 | ||
|
|
0f1f7fc30c | ||
|
|
471acea0fc | ||
|
|
e122d8f4a6 | ||
|
|
53bde9e545 | ||
|
|
2ccaa6dcb6 | ||
|
|
8c8b971221 | ||
|
|
dd43f91278 | ||
|
|
6b3a62de9f | ||
|
|
4bd45337bf | ||
|
|
9351447cf2 | ||
|
|
b9cdf72ee1 | ||
|
|
81000e9391 | ||
|
|
19b81912fb | ||
|
|
b7df13b4fe | ||
|
|
2f3befc845 | ||
|
|
826b68b652 | ||
|
|
aece23e6ee | ||
|
|
3a9ddfbdbb | ||
|
|
11bdb5f6d4 | ||
|
|
741450ce9e | ||
|
|
868e6c417d | ||
|
|
0c19e23835 | ||
|
|
342ffb5d83 | ||
|
|
afa44fae79 | ||
|
|
333b379287 | ||
|
|
36f74c934e | ||
|
|
8f41686a98 | ||
|
|
75feb3a5d4 | ||
|
|
50ace741fe | ||
|
|
036cd8dd26 | ||
|
|
9758aa4a45 | ||
|
|
cf1cb554f6 | ||
|
|
ee68f746c6 | ||
|
|
85f2cf5833 | ||
|
|
5819ac0c48 | ||
|
|
3e26a12948 | ||
|
|
279385ecb9 | ||
|
|
75c91c8035 |
36
MakeRelease
36
MakeRelease
@@ -10,6 +10,12 @@
|
||||
# [-b] - For fully built release
|
||||
#
|
||||
# $Log$
|
||||
# Revision 1.9 1996/09/04 21:41:36 jba
|
||||
# Top level dir no longer passed to MakeRelease
|
||||
#
|
||||
# Revision 1.8 1996/07/02 13:45:09 jba
|
||||
# Added dbd and base/config dirs. Removed epics/config and base/rec.
|
||||
#
|
||||
# Revision 1.7 1996/06/25 21:54:42 jba
|
||||
# Command line parm now base dir
|
||||
#
|
||||
@@ -75,40 +81,32 @@ fi
|
||||
|
||||
|
||||
FULLY_BUILT=NO
|
||||
if [ "${2}" = "-b" ]; then
|
||||
if [ "${1}" = "-b" ]; then
|
||||
FULLY_BUILT=YES
|
||||
shift
|
||||
if [ "${1}" != "." ]; then
|
||||
echo "TOP: Cannot create a fully built release.";
|
||||
exit 1;
|
||||
fi
|
||||
fi
|
||||
|
||||
# Retrieve EPICS release string from src/include/epicsVersion.h
|
||||
grep EPICS_VERSION_STRING src/include/epicsVersion.h > /dev/null 2>&1 || ERR=1;
|
||||
# Retrieve EPICS release string from config/CONFIG_BASE_VERSION
|
||||
. config/CONFIG_BASE_VERSION
|
||||
|
||||
if [ "$ERR" = "1" ];
|
||||
if [ -z "${EPICS_VERSION}" ];
|
||||
then
|
||||
echo "TOP: Cannot retrieve release number from include/epicsVersion.h";
|
||||
echo "TOP: Cannot retrieve release number from config/CONFIG_BASE_VERSION";
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
RELS=`grep "EPICS_VERSION_STRING" src/include/epicsVersion.h \
|
||||
| sed -e 's-.*Version--' \
|
||||
-e 's-[ ][ ]*--g' \
|
||||
-e 's-".*--' \
|
||||
-e 's-\.0$--'`;
|
||||
|
||||
if [ -z "${RELS}" ];
|
||||
then
|
||||
echo "TOP: Cannot retrieve release number from src/include/epicsVersion.h";
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
RELS="R${RELS}";
|
||||
RELS="R${EPICS_VERSION}.${EPICS_REVISION}.${EPICS_MODIFICATION}.${EPICS_UPDATE_NAME}${EPICS_UPDATE_LEVEL}";
|
||||
|
||||
echo TOP: Creating ../${RELS}.Tar;
|
||||
|
||||
if [ -f ${RELS}.Tar* ];
|
||||
then
|
||||
echo "TOP: This release has already been created.";
|
||||
echo "TOP: Remove Tar file or edit src/include/epicsVersion.h.";
|
||||
echo "TOP: Remove Tar file or edit config/CONFIG_BASE_VERSION.";
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
|
||||
8
Makefile
8
Makefile
@@ -22,13 +22,13 @@ include $(TOP)/config/RULES_TOP
|
||||
|
||||
release:
|
||||
@echo TOP: Creating Release...
|
||||
@./MakeRelease ${TOP}
|
||||
@./MakeRelease
|
||||
|
||||
built_release: install
|
||||
built_release:
|
||||
@echo TOP: Creating Fully Built Release...
|
||||
@./MakeRelease ${TOP} -b
|
||||
@./MakeRelease -b $(INSTALL_LOCATION)
|
||||
|
||||
uninstall::
|
||||
@DIR1=`pwd`;cd $(INSTALL_LOCATION);DIR2=`pwd`;cd $$DIR1;\
|
||||
if [ "$$DIR1" != "$$DIR2" ]; then rm -fr $(INSTALL_LOCATION)/config; fi
|
||||
if [ "$$DIR1" != "$$DIR2" ]; then $(RMDIR) $(INSTALL_LOCATION)/config; fi
|
||||
|
||||
|
||||
36
README
36
README
@@ -1,7 +1,7 @@
|
||||
$Id$
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
3.12 EPICS BASE Notes and Build Instructions.
|
||||
3.13 EPICS BASE Notes and Build Instructions.
|
||||
- By Matthew Needes
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
@@ -41,19 +41,43 @@ Notes:
|
||||
1.3 To build EPICS:
|
||||
|
||||
cd epics/base
|
||||
gnumake - To build and install EPICS.
|
||||
gnumake - To install include files, build and install EPICS.
|
||||
(Same as "gnumake inc install")
|
||||
gnumake all - Same as "gnumake"
|
||||
gnumake clean - To clean temporary object files. Top level
|
||||
clean will remove all the O.ARCH dirs, not
|
||||
only those specified in BUILD_ARCHS.
|
||||
gnumake uninstall - Only available at the top level directory.
|
||||
Cleans directories created by the install.
|
||||
gnumake rebuild - Same as "gnumake clean uninstall all"
|
||||
|
||||
1.4 "Partial" build commands:
|
||||
|
||||
gnumake clean.sun4 - Cleans sun4 binaries in O.sun4 dirs only.
|
||||
gnumake install.sun4 - Builds sun4 only.
|
||||
gnumake install.mv167 - Builds mv167 only (a HOST_ARCH build must
|
||||
be complete before this can be issued).
|
||||
The complete set of targets now supported are:
|
||||
|
||||
action
|
||||
arch
|
||||
action.arch
|
||||
dir
|
||||
dir.action
|
||||
dir.arch
|
||||
dir.action.arch
|
||||
|
||||
where:
|
||||
action can be clean, inc, install, depends, or build
|
||||
action can also be uninstall or rebuild at top level only
|
||||
dir is the name of a subdirectory.
|
||||
arch can be host, cross, sun4, solaris, mv167, ...
|
||||
|
||||
Examples are:
|
||||
|
||||
gnumake inc - To install include files
|
||||
gnumake install.host - To build and install EPICS for host arch.
|
||||
gnumake install.cross - To build and install EPICS for Vx archs.
|
||||
gnumake clean.sun4 - Cleans sun4 binaries in O.sun4 dirs only.
|
||||
gnumake install.sun4 - Builds sun4 only.
|
||||
gnumake install.mv167 - Builds mv167 only (a HOST_ARCH build must
|
||||
be complete before this can be issued).
|
||||
|
||||
NOTES:
|
||||
|
||||
|
||||
14
README.Linux
14
README.Linux
@@ -1,16 +1,10 @@
|
||||
Special Notes on Linux
|
||||
1) The epics makefiles use GNU make which is the make that comes
|
||||
with Linux. You need to make a link from make to gnumake and
|
||||
have it in your path. After you have defined the EPICS environement
|
||||
variable, you can use:
|
||||
|
||||
ln -s /usr/bin/make $EPICS/base/tools/gnumake
|
||||
At this point, support for Linux only involves channel access
|
||||
clients. Since Vxworks is not available for Linux, you must
|
||||
use other platforms for developing server side code.
|
||||
|
||||
2) At this point, support for Linux only involves channel access
|
||||
clients. Since Vxworks is not available for Linux, you must
|
||||
use other platforms for developing server side code.
|
||||
|
||||
3) You MUST start caRepeater by hand before running a client.
|
||||
You MUST start caRepeater by hand before running a client.
|
||||
Prior to running a client, you must run:
|
||||
|
||||
caRepeater &
|
||||
|
||||
44
README.Perl
Normal file
44
README.Perl
Normal file
@@ -0,0 +1,44 @@
|
||||
Perl
|
||||
====
|
||||
|
||||
A number of shell scripts are now Perl scripts,
|
||||
most important:
|
||||
|
||||
tools/installEpics.pl
|
||||
include/makeEpicsVersion.pl
|
||||
libCom/bldEnvData.pl
|
||||
libCom/makeStatSymTbl.pl
|
||||
sequencer/makeVersion.pl
|
||||
|
||||
WIN32 also uses
|
||||
tools/cp.pl, mv.pl, rm.pl, mkdir.pl
|
||||
which should behave like the UNIX cp, mv, rm, rmdir.
|
||||
All systems could use the Perl versions but that seems
|
||||
to be overkill for UNIX.
|
||||
|
||||
Advantages:
|
||||
* no need for ls, date, basename, grep, awk, sed, ...,
|
||||
which made the make UNIX-specific.
|
||||
* Perl is currently available for Unix, OS/2, WIN32, VMS
|
||||
and the scripts should work on all those systems
|
||||
|
||||
Disadvantage:
|
||||
* You have to get Perl, look e.g. at http://www.perl.com
|
||||
* Perl version 5.003_02 works, we don't know about earlier versions.
|
||||
|
||||
|
||||
Compile Perl:
|
||||
No big deal,
|
||||
* on UNIX say 'configure' and 'gnumake',
|
||||
* on Windows use MX Visual C++,
|
||||
use File/Open Workspace to open the Makefile {PERL}/perl5i.mak,
|
||||
use Build/Batch build to select eiher the Release or Debug targets.
|
||||
|
||||
You can do the same with the Makefile {Perl}/Ext/WIN32/win32.mak
|
||||
- nice tools but not necessary for EPICS.
|
||||
|
||||
Then call {PERL}/bin/perlw32-install.bat
|
||||
|
||||
In any case, read the texts that come with perl!
|
||||
|
||||
|
||||
161
README.WIN32
Normal file
161
README.WIN32
Normal file
@@ -0,0 +1,161 @@
|
||||
Compiling EPICS on WIN32 (Windows95/NT)
|
||||
---------------------------------------
|
||||
|
||||
-kuk- 11/18/96 questions & comments please
|
||||
mailto:kasemir@atdiv.lanl.gov
|
||||
|
||||
0) what you will get
|
||||
--------------------
|
||||
|
||||
Right now this port of EPICS to WIN32 should allow you to
|
||||
|
||||
* compile almost all EPICS base using Tornado, MS Visual C
|
||||
and some additional tools: gnumake, a UNIX-like shell, awk, sed, ...
|
||||
(See below where to get these.)
|
||||
* load EPICS on a PC IOC (486, pentium),
|
||||
load simple databases
|
||||
(no drivers/devices for real I/O available, yet.
|
||||
Some Greenspring IP support [Relay, Dig, ADC, DAC] is in progress)
|
||||
* build and use ca.dll on NT or Win95 to access all IOCs,
|
||||
as well as the Com-library as a DLL.
|
||||
The remaining libraries are statically linked and
|
||||
therefore only accessible from programming languages like C,
|
||||
not general WIN32 apps.
|
||||
* build gdd, cas and a demo of the new portable CA server on WIN32.
|
||||
* missing: the sequencer, makeExampleApp etc. and long term tests
|
||||
|
||||
1) see what you have
|
||||
--------------------
|
||||
|
||||
To compiler EPICS on WIN32, we need
|
||||
|
||||
WindRiver Systems Tornado (used: 1.0)
|
||||
Microsoft Visual C (used: 4.0)
|
||||
|
||||
and some tools:
|
||||
|
||||
a Unix-like shell
|
||||
gnumake
|
||||
basename
|
||||
date
|
||||
mv
|
||||
touch
|
||||
sort
|
||||
|
||||
All the above except. the shell are available 'on the net'
|
||||
as sources which compile with MS Visual C++.
|
||||
If you cannot/don't want to find them, contact me, please!
|
||||
|
||||
I could not find a shell that's fully operational.
|
||||
The best one seems to be the Cygnus bash for WIN32, though it
|
||||
still has errors and doesn't come with sources that compile
|
||||
under MS VC++.
|
||||
I use a small self-written shell called knts,
|
||||
again: Contact me if you need it.
|
||||
|
||||
* The final solution to make the shell, basename, date, ...
|
||||
* obsolete:
|
||||
* Use
|
||||
* 1) no shell scripts
|
||||
* 2) Perl which is available for Unix and WIN32
|
||||
|
||||
In addition we need some binaries that I have no sources
|
||||
for, yet, but that come with Tornado if and only if you
|
||||
INSTALL THE FULL PACKAGE (!)
|
||||
Including the 'WTX Test Suite i386/i486'
|
||||
(under "Select Sub-components" when installing Tornado)
|
||||
|
||||
You should find in your <Tornado>/host/x86-win32/bin dir:
|
||||
|
||||
awk, cat, cp, rm, mkdir
|
||||
|
||||
(There is also a bash and a GNU-make which are really poor,
|
||||
and WindRiver told me that they do not consider to support
|
||||
those in the future, so I no longer use them.)
|
||||
|
||||
2) set environment variables
|
||||
----------------------------
|
||||
|
||||
Your path should include:
|
||||
- The EPICS-binaries that we are about to build in base/bin/WIN32
|
||||
- The NTtools that you've built in step 1
|
||||
- The System (for me it's in NT40...)
|
||||
- The MS Visual C compiler binaries
|
||||
- The Tornado binaries
|
||||
|
||||
Check with e.g.:
|
||||
|
||||
/users/kay/Src/epics/nttools >echo $Path
|
||||
c:\users\kay\src\epics\base\bin\WIN32;c:\users\kay\src\epics\NTtools\bin;C:\NT40
|
||||
\system32;C:\NT40;c:\msdev\bin;C:\users\Tornado\host\x86-win32\bin
|
||||
|
||||
On NT, $Path is defined by the operatin system, on Win95, it's $PATH instead.
|
||||
knts tries to use PATH and falls back on Path,
|
||||
what should wok on both systems.
|
||||
|
||||
MS Visual C and Tornado should be installed properly with
|
||||
these env. variables set:
|
||||
|
||||
WIND_BASE=c:\usersTornado
|
||||
WIND_HOST_TYPE=x86-win32
|
||||
|
||||
This way the EPICS makesystem can locate Tornado
|
||||
without any changes to the files in base/config.
|
||||
So for pc486 the settings in CONFIG_SITE where
|
||||
you specify the location of VxWorks are ignored,
|
||||
this information is taken from WIND_BASE and _HOST_TYPE!!
|
||||
|
||||
MSDevDir=C:\MSDEV
|
||||
include=c:\msdev\include;c:\msdev\mfc\include
|
||||
lib=c:\msdev\lib;c:\msdev\mfc\lib
|
||||
|
||||
(Setting env. vars. is different: for NT, use Settings/System,
|
||||
for Win95 use autoexec.bat)
|
||||
|
||||
For EPICS, set:
|
||||
|
||||
# select host arch to build:
|
||||
HOST_ARCH=WIN32
|
||||
|
||||
EPICS_CA_ADDR_LIST 128.165.32.255 (addr of WIN32 host)
|
||||
EPICS_CA_AUTO_CA_ADDR_LIST NO
|
||||
EPICS_CA_CONN_TMO 30.0
|
||||
EPICS_CA_BEACON_PERIOD 15.0
|
||||
EPICS_CA_REPEATER_PORT 5065
|
||||
EPICS_CA_SERVER_PORT 5064
|
||||
EPICS_TS_MIN_WEST 420 (Germany: -120)
|
||||
|
||||
|
||||
To debug knts, set KNTS to 5:
|
||||
KNTS=5
|
||||
export KNTS
|
||||
|
||||
You should do this, however, only if you really want the debugging info.
|
||||
|
||||
|
||||
3) building EPICS
|
||||
-----------------
|
||||
|
||||
Prepare apx. 2 ltr. Tee and type:
|
||||
|
||||
cd <epics>/base
|
||||
gnumake
|
||||
|
||||
Watch for errors and send them to me.
|
||||
|
||||
There might be loads of compiler warnings.
|
||||
Known errors:
|
||||
* gnumake seems to be faster than WIN32 sometimes
|
||||
which results in warnings/errors like
|
||||
"file has modification date in the future"
|
||||
for newly vreated things.
|
||||
Very seldom this is fatal, so you have to
|
||||
stop gnumake and restart it.
|
||||
* This is strange because Windows95/NT don't care
|
||||
about upper/lower case:
|
||||
WIN32 is WIN32, not win32. Gnumake fails
|
||||
if e.g. base/src/include/os/WIN32 is ...win32.
|
||||
|
||||
Good luck !
|
||||
|
||||
-Kay
|
||||
43
README.cxxTemplates
Normal file
43
README.cxxTemplates
Normal file
@@ -0,0 +1,43 @@
|
||||
|
||||
The templates supplied with EPICS base are in $(EPICS)/base/src/cxxTemplates
|
||||
|
||||
In Stroustrups's "The C++ Programming Language" Appendix A: r.14.9
|
||||
(ANSI/ISO resolutions) a mechanism is described for the explicit
|
||||
instantiation of template member functions (that are not inline).
|
||||
At this time some compilers do not support this mechanism (and use
|
||||
a template database or smart linker instead). Other compilers
|
||||
(such as g++) provide only limited support for other forms of
|
||||
instantiation.
|
||||
|
||||
Since there is no defacto standard mechanism for instatiating
|
||||
templates at this time we are defining the preprocessor flag
|
||||
EXPL_TEMPL in the build system when the compiler supports
|
||||
explicit instantiation.
|
||||
|
||||
EPICS codes that use templates may need to include a code block
|
||||
as follow that instantiates the template only once into each
|
||||
program.
|
||||
|
||||
#include <classXYZ.h>
|
||||
#include <templXXX.h>
|
||||
#include <templXXX.cc>
|
||||
|
||||
//
|
||||
// if the compiler supports explicit instantiation of
|
||||
// template member functions
|
||||
//
|
||||
#if defined(EXPL_TEMPL)
|
||||
//
|
||||
// From Stroustrups's "The C++ Programming Language"
|
||||
// Appendix A: r.14.9
|
||||
//
|
||||
// This explicitly instantiates the template class's member
|
||||
// functions into "templInst.o"
|
||||
//
|
||||
template class templXXX <classXYZ>;
|
||||
#endif
|
||||
|
||||
Jeff Hill 3-6-97
|
||||
johill@lanl.gov
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
----------------------------------------------------------------------------
|
||||
EPICS R3.12.2 Notes for Solaris
|
||||
EPICS Notes for Solaris
|
||||
- By Andrew Johnson
|
||||
|
||||
updated 12-16-96 by Jeff Hill
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Notes:
|
||||
@@ -8,8 +11,10 @@ Notes:
|
||||
1. In order to build EPICS under Solaris 2, you must ensure that the
|
||||
solaris directory /usr/ccs/bin is in your search path.
|
||||
|
||||
2. It is not possible to compile EPICS under Solaris 2 using only the
|
||||
GNU gcc compiler -- you must have the Sun SPARCworks ANSI C compiler.
|
||||
2. It is now possible to compile EPICS under Solaris 2 using either the
|
||||
GNU gcc compiler or the Sun SPARCworks ANSI C compiler. The g++/
|
||||
Sun SPARCworks ANSI C compiler combination has compiled and linked
|
||||
without errors but has not been extensively tested.
|
||||
|
||||
3. EPICS under Solaris 2 no longer uses the UCB compatability libraries.
|
||||
In order to ensure that the /usr/ucblib files are not inherited, you
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
#
|
||||
# The developer may edit this file.
|
||||
|
||||
# Site-specific build options
|
||||
#
|
||||
include $(EPICS_BASE)/config/CONFIG_SITE
|
||||
|
||||
# EPICS base definitions
|
||||
#
|
||||
include $(EPICS_BASE)/config/CONFIG_COMMON
|
||||
|
||||
# Site-specific build options
|
||||
#
|
||||
include $(EPICS_BASE)/config/CONFIG_SITE
|
||||
|
||||
# assume T_A is the host arch if not specified
|
||||
ifndef T_A
|
||||
T_A = $(HOST_ARCH)
|
||||
@@ -24,7 +24,8 @@ include $(EPICS_BASE)/config/CONFIG.$(T_A)
|
||||
|
||||
# User specific definitions
|
||||
#
|
||||
-include $(HOME)/.EPICS_CONFIG
|
||||
-include $(HOME)/EPICS_CONFIG
|
||||
-include $(HOME)/EPICS_CONFIG.$(HOST_ARCH)
|
||||
|
||||
# All EPICS options other than BUILD_TYPE
|
||||
# may be overridden here.
|
||||
|
||||
@@ -14,16 +14,20 @@ BUILD_TYPE = Unix
|
||||
GCC = gcc
|
||||
ACC = acc
|
||||
SUNCC = cc
|
||||
AR = ar
|
||||
AR = ar
|
||||
ARFLAGS = r
|
||||
ARCMD = $(AR) $(ARFLAGS)
|
||||
RANLIB = ranlib
|
||||
RANLIBFLAGS = -t
|
||||
YACC = $(EYACC)
|
||||
LEX = $(ELEX)
|
||||
G++ = g++
|
||||
CCC = CC
|
||||
MV = mv
|
||||
RMDIR = rm -rf
|
||||
MKDIR = mkdir
|
||||
CHMOD = "/bin/chmod"
|
||||
WHAT = what
|
||||
|
||||
ACC_ANSI_INVOKE_W_NO = $(ACC) -Xa -w
|
||||
ACC_ANSI_INVOKE_W_YES = $(ACC) -Xa
|
||||
@@ -50,15 +54,18 @@ CCC_NORMAL_INVOKE_W_YES = $(CCC) +p +w
|
||||
CCC_STRICT_INVOKE_W_YES = $(CCC) +p +w
|
||||
CCC_LD_FLAGS =
|
||||
CCC_LD_LIBS =
|
||||
CCC_TEMPL_INST_FLAG =
|
||||
G++_NORMAL_INVOKE_W_NO = $(G++) -ansi -pedantic -w
|
||||
G++_NORMAL_INVOKE_W_YES = $(G++) -ansi -pedantic -Wall
|
||||
G++_STRICT_INVOKE_W_YES = $(G++) -ansi -pedantic -Wtraditional -Wall \
|
||||
-Wmissing-prototypes -Woverloaded-virtual \
|
||||
-Wwrite-strings -Wconversion -Wstrict-prototypes\
|
||||
-Wpointer-arith -Winline
|
||||
G++_TEMPL_INST_FLAG = -DEXPL_TEMPL
|
||||
|
||||
CXX_NORMAL = $($(CPLUSPLUS)_NORMAL_INVOKE_W_$(UNIX_WARN))
|
||||
CXX_STRICT = $($(CPLUSPLUS)_STRICT_INVOKE_W_YES)
|
||||
TEMPL_INST_CXXFLAG = $($(CPLUSPLUS)_TEMPL_INST_FLAG)
|
||||
|
||||
# GNU make likes CXX instead of CCC
|
||||
CXX = $(CXX_$(CXXCMPLR))
|
||||
@@ -82,7 +89,8 @@ OPTIM_NO =
|
||||
UNIX_OPT_FLAGS = $(OPTIM_$(UNIX_OPT))
|
||||
|
||||
# Include files
|
||||
UNIX_INCLUDES = -I. -I.. -I$(EPICS_BASE_INCLUDE)
|
||||
UNIX_INCLUDES = -I. -I.. $(USR_INCLUDES) -I$(INSTALL_INCLUDE) -I$(EPICS_BASE_INCLUDE) \
|
||||
-I$(EPICS_BASE_INCLUDE)/os/$(T_A)
|
||||
|
||||
# Operating system flags
|
||||
OP_SYS_FLAGS = -DUNIX
|
||||
@@ -91,27 +99,25 @@ UNIX_LDFLAGS = -L$(EPICS_BASE_LIB)
|
||||
UNIX_LDLIBS = -lm
|
||||
|
||||
ARCH_DEP_CFLAGS = -D_X86_ -Dlinux
|
||||
ARCH_DEP_CCFLAGS = $(ARCH_DEP_CFLAGS)
|
||||
ARCH_DEP_CXXFLAGS = $(ARCH_DEP_CFLAGS)
|
||||
|
||||
UNIX_CFLAGS = $(UNIX_SFLAGS) $(USR_INCLUDES) $(UNIX_INCLUDES) $(OP_SYS_FLAGS)
|
||||
UNIX_CFLAGS = $(UNIX_SFLAGS) $(UNIX_INCLUDES) $(OP_SYS_FLAGS)
|
||||
|
||||
UNIX_CCFLAGS = $(UNIX_CFLAGS)
|
||||
UNIX_CXXFLAGS = $(UNIX_CFLAGS)
|
||||
|
||||
# Target specific flags
|
||||
TARGET_CFLAGS = $($(basename $@)_CFLAGS)
|
||||
TARGET_CCFLAGS = $($(basename $@)_CCFLAGS)
|
||||
TARGET_CXXFLAGS = $($(basename $@)_CXXFLAGS)
|
||||
TARGET_CPPFLAGS = $($(basename $@)_CPPFLAGS)
|
||||
TARGET_LDFLAGS = $($(basename $@)_LDFLAGS)
|
||||
TARGET_LDLIBS = $($(basename $@)_LDLIBS)
|
||||
TARGET_SNCFLAGS = $($(basename $@)_SNCFLAGS)
|
||||
|
||||
CFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CFLAGS) $(USR_CFLAGS) $(ARCH_DEP_CFLAGS) $(UNIX_CFLAGS)
|
||||
CCFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CCFLAGS) $(USR_CCFLAGS) $(ARCH_DEP_CCFLAGS) $(UNIX_CCFLAGS)
|
||||
CXXFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CXXFLAGS) $(USR_CXXFLAGS) \
|
||||
$(ARCH_DEP_CXXFLAGS) $(UNIX_CXXFLAGS) $(TEMPL_INST_CXXFLAG)
|
||||
CPPFLAGS += $(TARGET_CPPFLAGS) $(USR_CPPFLAGS)
|
||||
|
||||
# GNU make likes CXX instead of CCC
|
||||
CXXFLAGS = $(CCFLAGS)
|
||||
|
||||
LDFLAGS = $(SPECIAL_LDFLAGS) $(TARGET_LDFLAGS) $(USR_LDFLAGS) $(ARCH_DEP_LDFLAGS) $(UNIX_LDFLAGS)
|
||||
LDLIBS = $(TARGET_LDLIBS) $(USR_LDLIBS) $(ARCH_DEP_LDLIBS) $(UNIX_LDLIBS)
|
||||
|
||||
@@ -119,7 +125,7 @@ LDLIBS = $(TARGET_LDLIBS) $(USR_LDLIBS) $(ARCH_DEP_LDLIBS) $(UNIX_LDLIBS)
|
||||
COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c
|
||||
COMPILE.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c
|
||||
LINK.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
LINK.cc = $(CXX) $(CCFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
LINK.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
|
||||
DEPENDS_RULE.c = -$(COMPILE.c) -M $(SRCS.c) > .DEPENDS
|
||||
DEPENDS_RULE.cc = @echo no DEPENDS_RULE.cc defined in CONFIG.Unix.Linux
|
||||
DEPENDS_RULE.cc = @echo no DEPENDS_RULE.cc defined in CONFIG.Linux
|
||||
|
||||
@@ -8,7 +8,6 @@ RANLIB = $(VX_GNU_BIN)/ranlib68k
|
||||
YACC = $(EYACC)
|
||||
LEX = $(ELEX)
|
||||
CC = $(VX_GNU_BIN)/cc68k -B$(VX_GNU_LIB)/gcc-lib/ -nostdinc
|
||||
CXX = $(VX_GNU_BIN)/cc68k -B$(VX_GNU_LIB)/gcc-lib/ -nostdinc
|
||||
CPP = $(VX_GNU_BIN)/cpp68k -nostdinc
|
||||
#CPP = $(CC) -E
|
||||
GCC = $(CC)
|
||||
@@ -16,8 +15,55 @@ LD = $(VX_GNU_BIN)/ld68k -r
|
||||
EPICS_LDLIBS =
|
||||
MV=mv
|
||||
RM=rm -f
|
||||
MKDIR=mkdir
|
||||
MKDIR = mkdir
|
||||
RMDIR=rm -rf
|
||||
WHAT = what
|
||||
|
||||
#----------------------------
|
||||
# Only G++ currently supported
|
||||
CPLUSPLUS = G++
|
||||
CXXCMPLR = NORMAL
|
||||
VX_OPT = YES
|
||||
BOARD = $(subst mv,MV,$(T_A))
|
||||
CPU = 68000
|
||||
OS = VXWORKS
|
||||
#----------------------------
|
||||
|
||||
CCC = $(VX_GNU_BIN)/cc68k -B$(VX_GNU_LIB)/gcc-lib/ -nostdinc
|
||||
AR_CCC = $(VX_GNU_BIN)/ar68k
|
||||
CPP_CCC = $(VX_GNU_BIN)/cpp68k -nostdinc
|
||||
RANLIB_CCC = $(VX_GNU_BIN)/ranlib68k
|
||||
LD_CCC = $(VX_GNU_BIN)/ld68k
|
||||
CCC_CCFLAGS =
|
||||
CCC_ARCH_DEP_CCFLAGS =
|
||||
CCC_ARCH_DEP_LDFLAGS =
|
||||
|
||||
G++ = $(GNU_BIN)/sun3-g++ -B$(GNU_LIB)/gcc-lib/ -nostdinc -DEXPL_TEMPL
|
||||
AR_G++ = $(GNU_BIN)/sun3-ar
|
||||
CPP_G++ = $(GNU_BIN)/sun3-cpp
|
||||
RANLIB_G++ = $(GNU_BIN)/sun3-ranlib
|
||||
LD_G++ = $(GNU_BIN)/sun3-ld
|
||||
G++_ARCH_DEP_CCFLAGS = --no-builtin -Wa,"-m68040" -DOS_EQ_$(OS) \
|
||||
-DBOARD_EQ_$(BOARD) -DCPU_EQ_$(CPU) -DBOARD=$(BOARD)
|
||||
G++_ARCH_DEP_LDFLAGS = -Ur -N -T$(EPICS_BASE_BIN)/vxldscript.MRI
|
||||
|
||||
CCC_NORMAL = $(CCC)
|
||||
CCC_STRICT = $(CCC) -ansi -pedantic -Wtraditional \
|
||||
-Wmissing-prototypes -Woverloaded-virtual \
|
||||
-Wwrite-strings -Wconversion -Wstrict-prototypes\
|
||||
-Wpointer-arith -Winline
|
||||
G++_NORMAL = $(G++)
|
||||
G++_STRICT = $(G++) -ansi -pedantic -Wtraditional
|
||||
|
||||
CXX = $($(CPLUSPLUS)_$(CXXCMPLR))
|
||||
AR_CXX = $(AR_$(CPLUSPLUS))
|
||||
CPP_CXX = $(CPP_$(CPLUSPLUS))
|
||||
RANLIB_CXX = $(RANLIB_$(CPLUSPLUS))
|
||||
LD_CXX = $(LD_$(CPLUSPLUS))
|
||||
|
||||
ARCH_DEP_CXXFLAGS += $($(CPLUSPLUS)_ARCH_DEP_CCFLAGS) $(ARCH_DEP_CFLAGS)
|
||||
ARCH_DEP_CXXLDFLAGS = $($(CPLUSPLUS)_ARCH_DEP_LDFLAGS) $(ARCH_DEP_LDFLAGS)
|
||||
|
||||
|
||||
# special c library requirements
|
||||
SPECIAL_LANG =
|
||||
@@ -29,12 +75,13 @@ VX_OPT_NO =
|
||||
VX_OPT_FLAGS = $(VX_OPT_$(VX_OPT))
|
||||
|
||||
# Include files
|
||||
VX_INCLUDES = -I. -I.. -I$(EPICS_BASE_INCLUDE) -I$(VX_INCLUDE)
|
||||
VX_INCLUDES = -I. -I.. $(USR_INCLUDES) -I$(INSTALL_INCLUDE) -I$(EPICS_BASE_INCLUDE) \
|
||||
-I$(EPICS_BASE_INCLUDE)/os/vxWorks -I$(VX_INCLUDE)
|
||||
|
||||
# Warnings
|
||||
#At some time we should turn on pedantic
|
||||
#VX_WARN_YES = -Wall -pedantic
|
||||
VX_WARN_YES = -W
|
||||
VX_WARN_YES = -Wall -pedantic -ansi
|
||||
#VX_WARN_YES = -Wall
|
||||
VX_WARN_NO =
|
||||
VX_WARN_FLAGS = $(VX_WARN_$(VX_WARN))
|
||||
|
||||
@@ -42,29 +89,33 @@ VX_WARN_FLAGS = $(VX_WARN_$(VX_WARN))
|
||||
VX_OP_SYS_FLAGS = -DvxWorks -DV5_vxWorks
|
||||
|
||||
# Arch dependent flags are set in CONFIG_ARCH.*
|
||||
VX_CFLAGS = $(VX_OPT_FLAGS) $(VX_WARN_FLAGS) $(USR_INCLUDES) \
|
||||
VX_CFLAGS = $(VX_OPT_FLAGS) $(VX_WARN_FLAGS) \
|
||||
$(VX_INCLUDES) $(VX_OP_SYS_FLAGS)
|
||||
|
||||
VX_LDFLAGS = -o
|
||||
VX_CXXFLAGS += $(VX_CFLAGS)
|
||||
|
||||
TARGET_CFLAGS = $($(basename $@)_CFLAGS)
|
||||
TARGET_CXXFLAGS = $($(basename $@)_CXXFLAGS)
|
||||
TARGET_LDFLAGS = $($(basename $@)_LDFLAGS)
|
||||
TARGET_CPPFLAGS = $($(basename $@)_CPPFLAGS)
|
||||
TARGET_SNCFLAGS = $($(basename $@)_SNCFLAGS)
|
||||
|
||||
CFLAGS = $(TARGET_CFLAGS) $(USR_CFLAGS) $(ARCH_DEP_CFLAGS) $(VX_CFLAGS)
|
||||
CXXFLAGS = $(TARGET_CFLAGS) $(USR_CFLAGS) $(ARCH_DEP_CFLAGS) $(VX_CFLAGS)
|
||||
LDFLAGS = $(TARGET_LDFLAGS) $(USR_LDFLAGS) $(ARCH_DEP_LDFLAGS) $(VX_LDFLAGS)
|
||||
CXXFLAGS = $(TARGET_CXXFLAGS) $(USR_CXXFLAGS) $(ARCH_DEP_CXXFLAGS) $(VX_CXXFLAGS)
|
||||
LDFLAGS = $(TARGET_LDFLAGS) $(USR_LDFLAGS) $(ARCH_DEP_LDFLAGS) $(VX_LDFLAGS)
|
||||
LDLIBS = $(TARGET_LDLIBS) $(USR_LDLIBS) $(ARCH_DEP_LDLIBS) $(VX_LDLIBS)
|
||||
CXXLDLIBS = $(TARGET_LDLIBS) $(USR_CXXLDLIBS) $(ARCH_DEP_LDLIBS) $(VX_LDLIBS)
|
||||
CXXLDFLAGS = $(TARGET_LDFLAGS) $(USR_CXXLDFLAGS) $(ARCH_DEP_CXXLDFLAGS) $(VX_LDFLAGS)
|
||||
CPPFLAGS += $(TARGET_CPPFLAGS) $(USR_CPPFLAGS)
|
||||
|
||||
# Build compile line here
|
||||
COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c
|
||||
LINK.c = $(LD) $(LDFLAGS)
|
||||
LINK.c = $(LD) $(LDFLAGS) -o
|
||||
COMPILE.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c
|
||||
LINK.cc = $(LD) $(LDFLAGS)
|
||||
LINK.cc = $(LD_CXX) $(CXXLDFLAGS) -o
|
||||
|
||||
CPPSNCFLAGS = $(USR_INCLUDES) $(VX_INCLUDES)
|
||||
CPPSNCFLAGS = $(VX_INCLUDES)
|
||||
|
||||
DEPENDS_RULE.c = -$(COMPILE.c) -M $(SRCS.c) > .DEPENDS
|
||||
DEPENDS_RULE.cc = -$(COMPILE.cc) -M $(SRCS.cc) > .DEPENDS
|
||||
DEPENDS_RULE.c = -$(COMPILE.c) -M $(SRCS.c) >> .DEPENDS
|
||||
DEPENDS_RULE.cc = -$(COMPILE.cc) -M $(SRCS.cc) >> .DEPENDS
|
||||
|
||||
# Allow site host architecture specific overrides
|
||||
-include $(EPICS_BASE)/config/CONFIG_SITE.$(BUILD_TYPE).$(ARCH_CLASS).$(HOST_ARCH)
|
||||
|
||||
92
config/CONFIG.Vx.pc486
Normal file
92
config/CONFIG.Vx.pc486
Normal file
@@ -0,0 +1,92 @@
|
||||
# $Id$
|
||||
#
|
||||
# This file is maintained by the EPICS community.
|
||||
|
||||
# OLDINSTALL def used only for releases prior to R3.12.2.2
|
||||
# Unix Compiler and other Utilities
|
||||
OLDINSTALL = echo CONFIG.Vx.486 OLDINSTALL
|
||||
|
||||
CP =$(PERL) $(EPICS_BASE)/src/tools/cp.pl
|
||||
MV =$(PERL) $(EPICS_BASE)/src/tools/mv.pl
|
||||
RM =$(PERL) $(EPICS_BASE)/src/tools/rm.pl -f
|
||||
MKDIR=$(PERL) $(EPICS_BASE)/src/tools/mkdir.pl
|
||||
RMDIR=$(PERL) $(EPICS_BASE)/src/tools/rm.pl -rf
|
||||
CHMOD=echo
|
||||
|
||||
# overrides defines in CONFIG_SITE that don't fit Tornado
|
||||
#
|
||||
# We are lucky because
|
||||
# this should not really be site specific
|
||||
#
|
||||
# (if Tornado is installed correctly
|
||||
# -> WIND_BASE, WIND_HOST_TYPE set )
|
||||
#
|
||||
# At first we hack a little bit on WIND_BASE
|
||||
# to convert the DOS style into a Unix style path:
|
||||
#
|
||||
# If C: was in WIND_BASE, it's converted into c: (lowercase),
|
||||
# then c: is removed and all '\' are converted into '/'.
|
||||
SANE_WIND_BASE := $(subst \,/,$(subst c:,,$(subst C:,c:,$(WIND_BASE))))
|
||||
VX_DIR := $(SANE_WIND_BASE)/target
|
||||
VX_GNU := $(SANE_WIND_BASE)/host/$(WIND_HOST_TYPE)
|
||||
VX_GNU_BIN := $(VX_GNU)/bin
|
||||
VX_GNU_LIB := $(VX_GNU)/lib
|
||||
VX_IMAGE = $(VX_CONFIG_DIR)/$(T_A)/vxWorks
|
||||
VX_IMAGE_SYM = $(VX_CONFIG_DIR)/$(T_A)/vxWorks.sym
|
||||
|
||||
|
||||
AR = $(VX_GNU_BIN)/ar386
|
||||
RANLIB = $(VX_GNU_BIN)/ranlib386
|
||||
YACC = $(EYACC)
|
||||
LEX = $(ELEX)
|
||||
CC = $(VX_GNU_BIN)/cc386 -B$(VX_GNU_LIB)/gcc-lib/ -nostdinc -fno-builtin -fno-defer-pop
|
||||
CPP = $(VX_GNU_BIN)/cpp386 -nostdinc
|
||||
#CPP = $(CC) -E
|
||||
GCC = $(CC)
|
||||
LD = $(VX_GNU_BIN)/ld386 -r
|
||||
EPICS_LDLIBS =
|
||||
|
||||
# special c library requirements
|
||||
SPECIAL_LANG =
|
||||
|
||||
# Compiler flags, don't mess with this
|
||||
# Optimization flags
|
||||
VX_OPT_YES = -O
|
||||
VX_OPT_NO = -O0
|
||||
VX_OPT_FLAGS = $(VX_OPT_$(VX_OPT))
|
||||
|
||||
# Include files
|
||||
VX_INCLUDES = -I. -I.. $(USR_INCLUDES) -I$(INSTALL_INCLUDE) -I$(EPICS_BASE_INCLUDE) \
|
||||
-I$(EPICS_BASE_INCLUDE)/os/vxWorks -I$(VX_INCLUDE)
|
||||
|
||||
# Warnings
|
||||
#At some time we should turn on pedantic
|
||||
#VX_WARN_YES = -Wall -pedantic
|
||||
VX_WARN_YES = -W
|
||||
VX_WARN_NO =
|
||||
VX_WARN_FLAGS = $(VX_WARN_$(VX_WARN))
|
||||
|
||||
# Operating system flags
|
||||
VX_OP_SYS_FLAGS = -DvxWorks -DV5_vxWorks
|
||||
|
||||
# Arch dependent flags are set in CONFIG_ARCH.*
|
||||
VX_CFLAGS = $(VX_OPT_FLAGS) $(VX_WARN_FLAGS) \
|
||||
$(VX_INCLUDES) $(VX_OP_SYS_FLAGS)
|
||||
|
||||
VX_LDFLAGS = -o
|
||||
|
||||
TARGET_CFLAGS = $($(basename $@)_CFLAGS)
|
||||
TARGET_LDFLAGS = $($(basename $@)_LDFLAGS)
|
||||
|
||||
CFLAGS = $(TARGET_CFLAGS) $(USR_CFLAGS) $(ARCH_DEP_CFLAGS) $(VX_CFLAGS)
|
||||
LDFLAGS = $(TARGET_LDFLAGS) $(USR_LDFLAGS) $(ARCH_DEP_LDFLAGS) $(VX_LDFLAGS)
|
||||
|
||||
# Build compile line here
|
||||
COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c
|
||||
COMPILE.cc = $(CC) -x 'c++' -DEXPL_TEMPL $(CFLAGS) $(CPPFLAGS) -c
|
||||
LINK.c = $(LD) $(LDFLAGS)
|
||||
|
||||
CPPSNCFLAGS = $(USR_INCLUDES) $(VX_INCLUDES)
|
||||
|
||||
DEPENDS_RULE.c = -$(COMPILE.c) -M $(SRCS.c) >> .DEPENDS
|
||||
DEPENDS_RULE.cc = @echo no DEPENDS_RULE.cc defined in CONFIG.68k
|
||||
131
config/CONFIG.WIN32
Normal file
131
config/CONFIG.WIN32
Normal file
@@ -0,0 +1,131 @@
|
||||
# CONFIG.WIN32 -kuk-
|
||||
#
|
||||
# The current make-system for WIN32
|
||||
# needs
|
||||
# * gnumake (OK, sources for WIN32 are available)
|
||||
# * Perl (e.g. from www.perl.com )
|
||||
# * a UNIX-like shell (ouch!)
|
||||
#
|
||||
# I found no fully operational shell and no sources for WIN32 so far,
|
||||
# Cygnus' bash e.g. cannot handle this:
|
||||
# (echo a>a; echo b>>a)
|
||||
# Right now I use the knts that I wrote and simplified scripts.
|
||||
# Jeff eliminated many shell-lines in Makefile.*.
|
||||
#
|
||||
|
||||
|
||||
# Use std path variables from ms
|
||||
HOME = $(HOMEDRIVE)$(HOMEPATH)
|
||||
|
||||
# BUILD_TYPE
|
||||
# Currently either Vx or Host (latter used to be Unix
|
||||
BUILD_TYPE=Host
|
||||
|
||||
#
|
||||
# optimize/debug flags
|
||||
#
|
||||
HOST_OPT = YES
|
||||
CXX_OPT_FLAGS_YES = -Ox
|
||||
# -Zi : included debugging info
|
||||
CXX_OPT_FLAGS_NO = -Zi
|
||||
CXX_OPT_FLAGS = $(CXX_OPT_FLAGS_$(HOST_OPT))
|
||||
LINK_OPT_FLAGS_YES =
|
||||
LINK_OPT_FLAGS_NO = -debug
|
||||
LINK_OPT_FLAGS = $(LINK_OPT_FLAGS_$(HOST_OPT))
|
||||
|
||||
# to identify the general architecture class:
|
||||
# should be BSD, SYSV, WIN32, ...
|
||||
# is: WIN32, sun4, hpux, linux, ...
|
||||
#
|
||||
ARCH_CLASS=WIN32
|
||||
|
||||
# ifdef WIN32 looks better that ifeq ($(ARCH_CLASS),WIN32) ??
|
||||
WIN32=1
|
||||
|
||||
# Compiler and utility invocation (supply path to compiler here)
|
||||
# (with warning flags built in)
|
||||
# Paths to compilers
|
||||
YACC = $(EYACC)
|
||||
LEX = $(ELEX)
|
||||
CC = cl -nologo
|
||||
CP = $(PERL) $(EPICS_BASE)/src/tools/cp.pl
|
||||
MV = $(PERL) $(EPICS_BASE)/src/tools/mv.pl
|
||||
RM = $(PERL) $(EPICS_BASE)/src/tools/rm.pl -f
|
||||
MKDIR = $(PERL) $(EPICS_BASE)/src/tools/mkdir.pl
|
||||
RMDIR = $(PERL) $(EPICS_BASE)/src/tools/rm.pl -rf
|
||||
EXE=.exe
|
||||
OBJ=.obj
|
||||
|
||||
# Include files
|
||||
HOST_INCLUDES = -I. -I.. $(USR_INCLUDES) -I$(INSTALL_INCLUDE) \
|
||||
-I$(EPICS_BASE_INCLUDE) -I$(EPICS_BASE_INCLUDE)/os/$(ARCH_CLASS)
|
||||
|
||||
# Operating system flags (from win32.mak)
|
||||
#
|
||||
# __STDC__=0 is a real great idea of Jeff that gives us both:
|
||||
# 1) define STDC for EPICS code (pretend ANSI conformance)
|
||||
# 2) set it to 0 to use MS C "extensions" (open for _open etc.)
|
||||
# because MS uses: if __STDC__ ... disable many nice things
|
||||
#
|
||||
# -MDd : use MSVCRTD (run-time as DLL, multi-thread support)
|
||||
# this also calls for _DLL
|
||||
#
|
||||
OP_SYS_FLAGS:=-MDd $(CXX_OPT_FLAGS) -VMG -VMV -DWIN32 -D_WIN32 -D_DEBUG -D_WINDOWS \
|
||||
-D_X86_ -D_NTSDK -D_DLL -D__STDC__=0
|
||||
|
||||
|
||||
HOST_LDLIBS:=user32.lib kernel32.lib wsock32.lib advapi32.lib winmm.lib
|
||||
HOST_LDFLAGS:=-nologo -libpath:$(EPICS_BASE_LIB)
|
||||
|
||||
# Files and flags needed to link DLLs (used in RULES.Host)
|
||||
#
|
||||
# Strange but seems to work without: WIN32_DLLFLAGS should contain
|
||||
# an entry point:
|
||||
# '-entry:_DllMainCRTStartup$(DLLENTRY)'
|
||||
DLLENTRY:=@12
|
||||
|
||||
# yes, for MS it's I386 for 386, 486, Pentium!
|
||||
# don't mix this with VxWorks which has different BSPs for [34]86 !
|
||||
WIN32_DLLFLAGS:=$(HOST_LDFLAGS) $(HOST_LDLIBS)\
|
||||
-subsystem:windows -dll -incremental:no $(LINK_OPT_FLAGS) -machine:I386
|
||||
|
||||
|
||||
ARCH_DEP_CFLAGS =
|
||||
ARCH_DEP_CXXFLAGS = $(ARCH_DEP_CFLAGS)
|
||||
HOST_CFLAGS = $(HOST_SFLAGS) $(HOST_INCLUDES) $(OP_SYS_FLAGS)
|
||||
|
||||
HOST_CXXFLAGS = $(HOST_CFLAGS)
|
||||
|
||||
# Target specific flags
|
||||
TARGET_CFLAGS = $($(basename $@)_CFLAGS)
|
||||
TARGET_CXXFLAGS = $($(basename $@)_CXXFLAGS)
|
||||
TARGET_CPPFLAGS = $($(basename $@)_CPPFLAGS)
|
||||
TARGET_LDFLAGS = $($(basename $@)_LDFLAGS)
|
||||
TARGET_LDLIBS = $($(basename $@)_LDLIBS)
|
||||
TARGET_SNCFLAGS = $($(basename $@)_SNCFLAGS)
|
||||
|
||||
CFLAGS = $(HOST_OPT_FLAGS) $(TARGET_CFLAGS) $(USR_CFLAGS) $(ARCH_DEP_CFLAGS) $(HOST_CFLAGS)
|
||||
CXXFLAGS = $(HOST_OPT_FLAGS) $(TARGET_CXXFLAGS) $(USR_CXXFLAGS) $(ARCH_DEP_CXXFLAGS) $(HOST_CXXFLAGS)
|
||||
CPPFLAGS += $(TARGET_CPPFLAGS) $(USR_CPPFLAGS)
|
||||
|
||||
CXX=cl -nologo
|
||||
|
||||
LDFLAGS=$(SPECIAL_LDFLAGS) $(TARGET_LDFLAGS) $(USR_LDFLAGS) $(ARCH_DEP_LDFLAGS) $(HOST_LDFLAGS)
|
||||
LDLIBS=$(TARGET_LDLIBS) $(USR_LDLIBS) $(ARCH_DEP_LDLIBS) $(HOST_LDLIBS)
|
||||
|
||||
# Override SUN defaults
|
||||
COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c
|
||||
|
||||
# Problem: MS Visual C++ does not recognize *.cc as C++ source,
|
||||
# we have to compile xx.cc using the flag -Tp xx.cc,
|
||||
# i.e. -Tp has to be immediately before the source file name
|
||||
COMPILE.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -DEXPL_TEMPL -c -Tp
|
||||
|
||||
LINK.c=link $(LINK_OPT_FLAGS) $(LDFLAGS) -out:$@
|
||||
LINK.cc=$(LINK.c)
|
||||
|
||||
# The DEPENDS_RULE may be a script on other systems,
|
||||
# if you need different rules for .c and .cc,
|
||||
# that script has to figure out what to call.
|
||||
#
|
||||
DEPENDS_RULE = @echo no DEPENDS_RULE defined in CONFIG.WIN32
|
||||
@@ -3,30 +3,47 @@
|
||||
# This file is maintained by the EPICS community.
|
||||
|
||||
# BUILD_TYPE
|
||||
# Currently either Vx or Unix
|
||||
BUILD_TYPE = Unix
|
||||
# Currently either Vx or Host
|
||||
BUILD_TYPE = Host
|
||||
|
||||
ARCH_CLASS = alpha
|
||||
|
||||
# Compiler and utility invocation (supply path to compiler here)
|
||||
# (with warning flags built in)
|
||||
# Paths to compilers
|
||||
GCC = gcc
|
||||
ACC = cc -std
|
||||
TRADCC = cc -traditional
|
||||
AR = ar
|
||||
ACC = cc
|
||||
|
||||
AR = ar -rc
|
||||
_AR = $(AR) $(ARFLAGS)
|
||||
G++_AR = $(_AR)
|
||||
CCC_AR = $(AR)
|
||||
ARCMD = $($(CPLUSPLUS)_AR)
|
||||
|
||||
RANLIB = ranlib
|
||||
YACC = $(EYACC)
|
||||
LEX = $(ELEX)
|
||||
G++ = g++
|
||||
CCC = CC
|
||||
CCC = cc
|
||||
|
||||
CP=cp
|
||||
MV = mv
|
||||
RM=rm -f
|
||||
RMDIR = rm -rf
|
||||
MKDIR = mkdir
|
||||
CHMOD = "/bin/chmod"
|
||||
WHAT = what
|
||||
|
||||
ACC_ANSI_INVOKE_W_NO = $(ACC) -w
|
||||
ACC_ANSI_INVOKE_W_YES = $(ACC)
|
||||
ACC_STRICT_INVOKE_W_YES = $(ACC) -stdl -w
|
||||
ACC_STRICT_INVOKE_W_NO = $(ACC) -stdl
|
||||
ACC_TRAD_INVOKE_W_NO = $(ACC) -w
|
||||
ACC_TRAD_INVOKE_W_YES = $(ACC)
|
||||
EXE=
|
||||
OBJ=.o
|
||||
|
||||
|
||||
ACC_ANSI_INVOKE_W_NO = $(ACC) -std -w
|
||||
ACC_ANSI_INVOKE_W_YES = $(ACC) -std
|
||||
ACC_STRICT_INVOKE_W_YES = $(ACC) -std1 -w
|
||||
ACC_STRICT_INVOKE_W_NO = $(ACC) -std1
|
||||
ACC_TRAD_INVOKE_W_NO = $(ACC) -std0 -w
|
||||
ACC_TRAD_INVOKE_W_YES = $(ACC) -std0
|
||||
GCC_ANSI_INVOKE_W_NO = $(GCC) -ansi -w
|
||||
GCC_ANSI_INVOKE_W_YES = $(GCC) -ansi
|
||||
GCC_STRICT_INVOKE_W_NO = $(GCC) -ansi -pedantic
|
||||
@@ -44,15 +61,18 @@ CCC_NORMAL_INVOKE_W_YES = $(CCC) +p +w
|
||||
CCC_STRICT_INVOKE_W_YES = $(CCC) +p +w
|
||||
CCC_LD_FLAGS =
|
||||
CCC_LD_LIBS =
|
||||
CCC_TEMPL_INST_FLAG =
|
||||
G++_NORMAL_INVOKE_W_NO = $(G++) -ansi -pedantic -w
|
||||
G++_NORMAL_INVOKE_W_YES = $(G++) -ansi -pedantic -Wall
|
||||
G++_STRICT_INVOKE_W_YES = $(G++) -ansi -pedantic -Wtraditional -Wall \
|
||||
-Wmissing-prototypes -Woverloaded-virtual \
|
||||
-Wwrite-strings -Wconversion -Wstrict-prototypes\
|
||||
-Wpointer-arith -Winline
|
||||
G++_TEMPL_INST_FLAG = -DEXPL_TEMPL
|
||||
|
||||
CXX_NORMAL = $($(CPLUSPLUS)_NORMAL_INVOKE_W_$(UNIX_WARN))
|
||||
CXX_STRICT = $($(CPLUSPLUS)_STRICT_INVOKE_W_YES)
|
||||
TEMPL_INST_CXXFLAG = $($(CPLUSPLUS)_TEMPL_INST_FLAG)
|
||||
|
||||
# GNU make likes CXX instead of CCC
|
||||
CXX = $(CXX_$(CXXCMPLR))
|
||||
@@ -76,7 +96,8 @@ OPTIM_NO =
|
||||
UNIX_OPT_FLAGS = $(OPTIM_$(UNIX_OPT))
|
||||
|
||||
# Include files
|
||||
UNIX_INCLUDES = -I. -I.. -I$(EPICS_BASE_INCLUDE)
|
||||
UNIX_INCLUDES = -I. -I.. $(USR_INCLUDES) -I$(INSTALL_INCLUDE) -I$(EPICS_BASE_INCLUDE) \
|
||||
-I$(EPICS_BASE_INCLUDE)/os/$(T_A)
|
||||
|
||||
# Operating system flags
|
||||
OP_SYS_FLAGS = -DUNIX
|
||||
@@ -85,24 +106,27 @@ SPECIAL_LDFLAGS =
|
||||
UNIX_LDFLAGS = -L$(EPICS_BASE_LIB)
|
||||
UNIX_LDLIBS = -lm
|
||||
|
||||
ARCH_DEP_CFLAGS = -D_OSF_SOURCE -DLITTLE_ENDIAN
|
||||
ARCH_DEP_CCFLAGS = $(ARCH_DEP_CFLAGS)
|
||||
UNIX_CFLAGS = $(UNIX_SFLAGS) $(USR_INCLUDES) $(UNIX_INCLUDES) $(OP_SYS_FLAGS)
|
||||
# Architecture specific build flags
|
||||
ARCH_DEP_CFLAGS = -D_OSF_SOURCE
|
||||
ARCH_DEP_CXXFLAGS = $(ARCH_DEP_CFLAGS)
|
||||
ARCH_DEP_LDLIBS = -lnsl
|
||||
|
||||
UNIX_CFLAGS = $(UNIX_SFLAGS) $(UNIX_INCLUDES) $(OP_SYS_FLAGS)
|
||||
|
||||
UNIX_CCFLAGS = $(UNIX_CFLAGS)
|
||||
UNIX_CXXFLAGS = $(UNIX_CFLAGS)
|
||||
|
||||
# Target specific flags
|
||||
TARGET_CFLAGS = $($(basename $@)_CFLAGS)
|
||||
TARGET_CCFLAGS = $($(basename $@)_CCFLAGS)
|
||||
TARGET_CXXFLAGS = $($(basename $@)_CXXFLAGS)
|
||||
TARGET_CPPFLAGS = $($(basename $@)_CPPFLAGS)
|
||||
TARGET_LDFLAGS = $($(basename $@)_LDFLAGS)
|
||||
TARGET_LDLIBS = $($(basename $@)_LDLIBS)
|
||||
TARGET_SNCFLAGS = $($(basename $@)_SNCFLAGS)
|
||||
|
||||
CFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CFLAGS) $(USR_CFLAGS) $(ARCH_DEP_CFLAGS) $(UNIX_CFLAGS)
|
||||
CCFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CCFLAGS) $(USR_CCFLAGS) $(ARCH_DEP_CCFLAGS) $(UNIX_CCFLAGS)
|
||||
CXXFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CXXFLAGS) $(USR_CXXFLAGS) \
|
||||
$(ARCH_DEP_CXXFLAGS) $(UNIX_CXXFLAGS) $(TEMPL_INST_CXXFLAG)
|
||||
CPPFLAGS += $(TARGET_CPPFLAGS) $(USR_CPPFLAGS)
|
||||
CXXFLAGS = $(CCFLAGS)
|
||||
|
||||
LDFLAGS = $(SPECIAL_LDFLAGS) $(TARGET_LDFLAGS) $(USR_LDFLAGS) $(ARCH_DEP_LDFLAGS) $(UNIX_LDFLAGS)
|
||||
LDLIBS = $(TARGET_LDLIBS) $(USR_LDLIBS) $(ARCH_DEP_LDLIBS) $(UNIX_LDLIBS)
|
||||
@@ -110,9 +134,10 @@ LDLIBS = $(TARGET_LDLIBS) $(USR_LDLIBS) $(ARCH_DEP_LDLIBS) $(UNIX_LDLIBS)
|
||||
# Override defaults
|
||||
COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c
|
||||
COMPILE.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c
|
||||
LINK.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
LINK.cc = $(CXX) $(CCFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
# Unlike the 'Unix' makesystem, output flags -o .. are now part of LINK.c[c]
|
||||
LINK.c = $(CC) -o $@ $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
LINK.cc = $(CXX) -o $@ $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
|
||||
DEPEND_RULE.c = @echo echo no DEPENDS_RULE.c defined in CONFIG.Unix.alpha
|
||||
DEPEND_RULE.cc = @echo echo no DEPENDS_RULE.cc defined in CONFIG.Unix.alpha
|
||||
DEPEND_RULE.c = @echo no DEPENDS_RULE.c defined in CONFIG.alpha
|
||||
DEPEND_RULE.cc = @echo no DEPENDS_RULE.cc defined in CONFIG.alpha
|
||||
|
||||
|
||||
138
config/CONFIG.cygwin32
Executable file
138
config/CONFIG.cygwin32
Executable file
@@ -0,0 +1,138 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# This file is maintained by the EPICS community.
|
||||
|
||||
BUILD_TYPE = Host
|
||||
|
||||
ARCH_CLASS = cygwin32
|
||||
|
||||
GCC = gcc
|
||||
G++ = g++
|
||||
|
||||
#==========================
|
||||
# Fix for cygwin32 beta17.1 includes
|
||||
CXX_INCLUDES = /usr/local/include/g++
|
||||
#==========================
|
||||
|
||||
# Override values in CONFIG_SITE
|
||||
ANSI=GCC
|
||||
STANDARD=GCC
|
||||
CPLUSPLUS=G++
|
||||
|
||||
EXE=.exe
|
||||
|
||||
OBJ=.o
|
||||
|
||||
AR = ar
|
||||
_AR = $(AR) $(ARFLAGS)
|
||||
G++_AR = $(_AR)
|
||||
ARCMD = $($(CPLUSPLUS)_AR)
|
||||
|
||||
RANLIB = ranlib
|
||||
YACC = $(EYACC)
|
||||
LEX = $(ELEX)
|
||||
RMDIR = rm -rf
|
||||
MKDIR = mkdir
|
||||
CP=cp
|
||||
MV=mv
|
||||
RM=rm -f
|
||||
CHMOD = xxxx
|
||||
WHAT = echo
|
||||
|
||||
GCC_ANSI_INVOKE_W_NO = $(GCC) -ansi -w
|
||||
GCC_ANSI_INVOKE_W_YES = $(GCC) -ansi
|
||||
GCC_STRICT_INVOKE_W_YES = $(GCC) -ansi -Wall -pedantic
|
||||
GCC_TRAD_INVOKE_W_NO = $(GCC) -traditional -w
|
||||
GCC_TRAD_INVOKE_W_YES = $(GCC) -traditional
|
||||
GCC_LD_LIBS =
|
||||
GCC_LD_FLAGS =
|
||||
|
||||
C_OLD = $($(STANDARD)_TRAD_INVOKE_W_$(UNIX_WARN))
|
||||
C_ANSI = $($(ANSI)_ANSI_INVOKE_W_$(UNIX_WARN))
|
||||
C_STRICT = $($(ANSI)_STRICT_INVOKE_W_YES)
|
||||
CC = $(C_$(CMPLR))
|
||||
|
||||
LD_LIBS_OLD = $($(STANDARD)_LD_LIBS)
|
||||
LD_LIBS_ANSI = $($(ANSI)_LD_LIBS)
|
||||
LD_LIBS_STRICT = $($(ANSI)_LD_LIBS)
|
||||
CCOMPILER_LDLIBS = $(LD_LIBS_$(CMPLR))
|
||||
LD_FLAGS_OLD = $($(STANDARD)_LD_FLAGS)
|
||||
LD_FLAGS_ANSI = $($(ANSI)_LD_FLAGS)
|
||||
LD_FLAGS_STRICT = $($(ANSI)_LD_FLAGS)
|
||||
CCOMPILER_LDFLAGS = $(LD_FLAGS_$(CMPLR))
|
||||
|
||||
G++_NORMAL_INVOKE_W_NO = $(G++) -ansi -pedantic -w
|
||||
G++_NORMAL_INVOKE_W_YES = $(G++) -ansi -pedantic -Wall
|
||||
G++_STRICT_INVOKE_W_YES = $(G++) -ansi -pedantic -Wtraditional -Wall \
|
||||
-Wmissing-prototypes -Woverloaded-virtual \
|
||||
-Wwrite-strings -Wconversion -Wstrict-prototypes\
|
||||
-Wpointer-arith -Winline
|
||||
|
||||
CXX_NORMAL = $($(CPLUSPLUS)_NORMAL_INVOKE_W_$(UNIX_WARN))
|
||||
CXX_STRICT = $($(CPLUSPLUS)_STRICT_INVOKE_W_YES)
|
||||
|
||||
# GNU make likes CXX
|
||||
CXX = $(CXX_$(CXXCMPLR))
|
||||
|
||||
# Static Build options
|
||||
GCC_SFLAGS_YES= -static
|
||||
GCC_SFLAGS_NO=
|
||||
|
||||
SF_OLD = $($(STANDARD)_SFLAGS_$(STATIC_BUILD))
|
||||
SF_ANSI = $($(ANSI)_SFLAGS_$(STATIC_BUILD))
|
||||
SF_STRICT = $(SF_ANSI)
|
||||
UNIX_SFLAGS = $(SF_$(CMPLR))
|
||||
|
||||
SL_OLD = $($(STANDARD)_SLIBS_$(STATIC_BUILD))
|
||||
SL_ANSI = $($(ANSI)_SLIBS_$(STATIC_BUILD))
|
||||
SL_STRICT = $(SL_ANSI)
|
||||
UNIX_SLIBS = $(SL_$(CMPLR))
|
||||
|
||||
# Optimization
|
||||
OPTIM_YES = -O
|
||||
OPTIM_NO =
|
||||
UNIX_OPT_FLAGS = $(OPTIM_$(UNIX_OPT))
|
||||
|
||||
# Include files
|
||||
UNIX_INCLUDES = -I. -I.. $(USR_INCLUDES) -I$(INSTALL_INCLUDE) -I$(EPICS_BASE_INCLUDE) \
|
||||
-I$(EPICS_BASE_INCLUDE)/os/$(T_A)
|
||||
|
||||
# Operating system flags
|
||||
OP_SYS_FLAGS = -DUNIX
|
||||
|
||||
UNIX_LDFLAGS = -L$(EPICS_BASE_LIB) $(CCOMPILER_LDFLAGS)
|
||||
UNIX_LDLIBS = $(UNIX_SLIBS) -lm $(CCOMPILER_LDLIBS)
|
||||
|
||||
# Architecture specific build flags
|
||||
ARCH_DEP_CFLAGS = -DCYGWIN32
|
||||
ARCH_DEP_CXXFLAGS = $(ARCH_DEP_CFLAGS) -I$(CXX_INCLUDES)
|
||||
#ARCH_DEP_LDLIBS = -lsocket -lnsl
|
||||
# -lsocket needed by libca.a
|
||||
# -lnsl needed by libca.a
|
||||
|
||||
UNIX_CFLAGS = $(UNIX_SFLAGS) $(UNIX_INCLUDES) $(OP_SYS_FLAGS)
|
||||
|
||||
UNIX_CXXFLAGS = $(UNIX_CFLAGS)
|
||||
|
||||
# Target specific flags
|
||||
TARGET_CFLAGS = $($(basename $@)_CFLAGS)
|
||||
TARGET_CXXFLAGS = $($(basename $@)_CXXFLAGS)
|
||||
TARGET_CPPFLAGS = $($(basename $@)_CPPFLAGS)
|
||||
TARGET_LDFLAGS = $($(basename $@)_LDFLAGS)
|
||||
TARGET_LDLIBS = $($(basename $@)_LDLIBS)
|
||||
TARGET_SNCFLAGS = $($(basename $@)_SNCFLAGS)
|
||||
|
||||
CFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CFLAGS) $(USR_CFLAGS) $(ARCH_DEP_CFLAGS) $(UNIX_CFLAGS)
|
||||
CXXFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CXXFLAGS) $(USR_CXXFLAGS) $(ARCH_DEP_CXXFLAGS) $(UNIX_CXXFLAGS)
|
||||
CPPFLAGS += $(TARGET_CPPFLAGS) $(USR_CPPFLAGS)
|
||||
|
||||
LDFLAGS = $(SPECIAL_LDFLAGS) $(TARGET_LDFLAGS) $(USR_LDFLAGS) $(ARCH_DEP_LDFLAGS) $(UNIX_LDFLAGS)
|
||||
LDLIBS = $(TARGET_LDLIBS) $(USR_LDLIBS) $(ARCH_DEP_LDLIBS) $(UNIX_LDLIBS)
|
||||
|
||||
LINK.c = $(CC) -o $@ $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
LINK.cc = $(CXX) -o $@ $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
|
||||
#DEPENDS_RULE.c = -$(COMPILE.c) -xM $(SRCS.c) > .DEPENDS
|
||||
#DEPENDS_RULE.cc = @echo no DEPENDS_RULE.cc defined in CONFIG.cygwin32
|
||||
DEPENDS_RULE = -$(COMPILE.c) -MM $(SRCS.c) $(SRCS.cc) > .DEPENDS
|
||||
@@ -6,6 +6,8 @@
|
||||
# Currently either Vx or Unix
|
||||
BUILD_TYPE = Unix
|
||||
|
||||
ARCH_CLASS = hp700
|
||||
|
||||
# Compiler and utility invocation (supply path to compiler here)
|
||||
# (with warning flags built in)
|
||||
# Paths to compilers
|
||||
@@ -14,14 +16,25 @@ ACC = cc -Aa
|
||||
HPACC = cc -Aa
|
||||
HPCC = cc -Ac
|
||||
TRADCC = cc
|
||||
AR = ar
|
||||
AR = ar
|
||||
ARCMD = $(AR) $(ARFLAGS)
|
||||
|
||||
RANLIB = ranlib
|
||||
YACC = $(EYACC)
|
||||
LEX = $(ELEX)
|
||||
G++ = g++
|
||||
CCC = CC
|
||||
|
||||
CP=cp
|
||||
MV = mv
|
||||
RM=rm -f
|
||||
RMDIR = rm -rf
|
||||
MKDIR = mkdir
|
||||
CHMOD = "/bin/chmod"
|
||||
WHAT = what
|
||||
|
||||
EXE=
|
||||
OBJ=.o
|
||||
|
||||
ACC_ANSI_INVOKE_W_NO = $(ACC) -w
|
||||
ACC_ANSI_INVOKE_W_YES = $(ACC)
|
||||
@@ -47,15 +60,18 @@ CCC_NORMAL_INVOKE_W_YES = $(CCC) +p +w
|
||||
CCC_STRICT_INVOKE_W_YES = $(CCC) +p +w
|
||||
CCC_LD_FLAGS =
|
||||
CCC_LD_LIBS =
|
||||
CCC_TEMPL_INST_FLAG =
|
||||
G++_NORMAL_INVOKE_W_NO = $(G++) -ansi -pedantic -w
|
||||
G++_NORMAL_INVOKE_W_YES = $(G++) -ansi -pedantic -Wall
|
||||
G++_STRICT_INVOKE_W_YES = $(G++) -ansi -pedantic -Wtraditional -Wall \
|
||||
-Wmissing-prototypes -Woverloaded-virtual \
|
||||
-Wwrite-strings -Wconversion -Wstrict-prototypes\
|
||||
-Wpointer-arith -Winline
|
||||
G++_TEMPL_INST_FLAG = -DEXPL_TEMPL
|
||||
|
||||
CXX_NORMAL = $($(CPLUSPLUS)_NORMAL_INVOKE_W_$(UNIX_WARN))
|
||||
CXX_STRICT = $($(CPLUSPLUS)_STRICT_INVOKE_W_YES)
|
||||
TEMPL_INST_CXXFLAG = $($(CPLUSPLUS)_TEMPL_INST_FLAG)
|
||||
|
||||
# GNU make likes CXX instead of CCC
|
||||
CXX = $(CXX_$(CXXCMPLR))
|
||||
@@ -84,7 +100,8 @@ OPTIM_NO =
|
||||
UNIX_OPT_FLAGS = $(OPTIM_$(UNIX_OPT))
|
||||
|
||||
# Include files
|
||||
UNIX_INCLUDES = -I. -I.. -I$(EPICS_BASE_INCLUDE)
|
||||
UNIX_INCLUDES = -I. -I.. $(USR_INCLUDES) -I$(INSTALL_INCLUDE) -I$(EPICS_BASE_INCLUDE) \
|
||||
-I$(EPICS_BASE_INCLUDE)/os/$(T_A)
|
||||
|
||||
# Operating system flags
|
||||
OP_SYS_FLAGS = -DUNIX
|
||||
@@ -94,23 +111,23 @@ UNIX_LDFLAGS = -L$(EPICS_BASE_LIB)
|
||||
UNIX_LDLIBS = -lm
|
||||
|
||||
ARCH_DEP_CFLAGS = -D_HPUX_SOURCE -DHP_UX
|
||||
ARCH_DEP_CCFLAGS = $(ARCH_DEP_CFLAGS)
|
||||
ARCH_DEP_CXXFLAGS = $(ARCH_DEP_CFLAGS)
|
||||
|
||||
UNIX_CFLAGS = $(UNIX_SFLAGS) $(USR_INCLUDES) $(UNIX_INCLUDES) $(OP_SYS_FLAGS)
|
||||
UNIX_CCFLAGS = $(UNIX_CFLAGS)
|
||||
UNIX_CFLAGS = $(UNIX_SFLAGS) $(UNIX_INCLUDES) $(OP_SYS_FLAGS)
|
||||
UNIX_CXXFLAGS = $(UNIX_CFLAGS)
|
||||
|
||||
# Target specific flags
|
||||
TARGET_CFLAGS = $($(basename $@)_CFLAGS)
|
||||
TARGET_CCFLAGS = $($(basename $@)_CCFLAGS)
|
||||
TARGET_CXXFLAGS = $($(basename $@)_CXXFLAGS)
|
||||
TARGET_CPPFLAGS = $($(basename $@)_CPPFLAGS)
|
||||
TARGET_LDFLAGS = $($(basename $@)_LDFLAGS)
|
||||
TARGET_LDLIBS = $($(basename $@)_LDLIBS)
|
||||
TARGET_SNCFLAGS = $($(basename $@)_SNCFLAGS)
|
||||
|
||||
CFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CFLAGS) $(USR_CFLAGS) $(ARCH_DEP_CFLAGS) $(UNIX_CFLAGS)
|
||||
CCFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CCFLAGS) $(USR_CCFLAGS) $(ARCH_DEP_CCFLAGS) $(UNIX_CCFLAGS)
|
||||
CXXFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CXXFLAGS) $(USR_CXXFLAGS) \
|
||||
$(ARCH_DEP_CXXFLAGS) $(UNIX_CXXFLAGS) $(TEMPL_INST_CXXFLAG)
|
||||
CPPFLAGS += $(TARGET_CPPFLAGS) $(USR_CPPFLAGS)
|
||||
CXXFLAGS = $(CCFLAGS)
|
||||
|
||||
ARFLAGS = rv
|
||||
|
||||
@@ -121,7 +138,7 @@ LDLIBS = $(TARGET_LDLIBS) $(USR_LDLIBS) $(ARCH_DEP_LDLIBS) $(UNIX_LDLIBS)
|
||||
COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c
|
||||
COMPILE.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c
|
||||
LINK.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
LINK.cc = $(CXX) $(CCFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
DEPEND_RULE.c = @echo echo no DEPENDS_RULE.c defined in CONFIG.Unix.hp700
|
||||
DEPEND_RULE.cc = @echo echo no DEPENDS_RULE.cc defined in CONFIG.Unix.hp700
|
||||
LINK.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
DEPENDS_RULE.c = @echo no DEPENDS_RULE.c defined in CONFIG.hp700
|
||||
DEPENDS_RULE.cc = @echo no DEPENDS_RULE.cc defined in CONFIG.hp700
|
||||
|
||||
|
||||
16
config/CONFIG.mv177
Normal file
16
config/CONFIG.mv177
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
# $Id$
|
||||
#
|
||||
# This file is maintained by the EPICS community.
|
||||
|
||||
BUILD_TYPE = Vx
|
||||
|
||||
# For Vx directories of form:
|
||||
# $(VX_DIR)/$(HOST_ARCH).$(ARCH_CLASS)/bin
|
||||
ARCH_CLASS = 68k
|
||||
|
||||
include $(EPICS_BASE)/config/CONFIG.$(BUILD_TYPE).$(ARCH_CLASS)
|
||||
|
||||
# Architecture specific build flags
|
||||
ARCH_DEP_CFLAGS = -DCPU=MC68060 -m68040 -DCPU_FAMILY=MC680X0
|
||||
|
||||
26
config/CONFIG.pc486
Normal file
26
config/CONFIG.pc486
Normal file
@@ -0,0 +1,26 @@
|
||||
|
||||
# BUILD_TYPE
|
||||
# Currently either Vx or Unix
|
||||
BUILD_TYPE = Vx
|
||||
|
||||
# For Vx directories of form:
|
||||
#
|
||||
# $(VX_DIR)/$(HOST_ARCH).$(ARCH_CLASS)/bin
|
||||
#
|
||||
# And configuration files:
|
||||
#
|
||||
# CONFIG_SITE.Vx.68k -or- CONFIG_SITE.Unix.sun4
|
||||
#
|
||||
ARCH_CLASS = pc486
|
||||
|
||||
include $(EPICS_BASE)/config/CONFIG.$(BUILD_TYPE).$(ARCH_CLASS)
|
||||
|
||||
# Architecture specific build flags
|
||||
# Defines:
|
||||
# CPU, CPU_FAMILY is used by VxWorks header files,
|
||||
# _X86_ is used in base/src/ca
|
||||
#
|
||||
# -g is for debugging information, I didn't know where elso to put it
|
||||
#
|
||||
ARCH_DEP_CFLAGS = -DCPU=I80486 -m486 -DCPU_FAMILY=I80x86 -D_X86_ -g
|
||||
|
||||
@@ -4,34 +4,44 @@
|
||||
# This file is maintained by the EPICS community.
|
||||
|
||||
# BUILD_TYPE
|
||||
# Currently either Vx or Unix
|
||||
BUILD_TYPE = Unix
|
||||
# Currently either Vx or Host
|
||||
BUILD_TYPE = Host
|
||||
|
||||
ARCH_CLASS = sgi
|
||||
|
||||
# Compiler and utility invocation (supply path to compiler here)
|
||||
# (with warning flags built in)
|
||||
# Paths to compilers
|
||||
GCC = cc
|
||||
ACC = cc
|
||||
KRCC = cc -cckr
|
||||
AR = ar
|
||||
|
||||
AR = ar
|
||||
ARCMD = $(AR) $(ARFLAGS)
|
||||
ARFLAGS = r
|
||||
RANLIB = ls
|
||||
RANLIBFLAGS =
|
||||
|
||||
RANLIB =
|
||||
YACC = $(EYACC)
|
||||
LEX = $(ELEX)
|
||||
G++ = g++
|
||||
CCC = CC
|
||||
|
||||
CP=cp
|
||||
MV = mv
|
||||
RM=rm -f
|
||||
RMDIR = rm -rf
|
||||
MKDIR = mkdir
|
||||
CHMOD = "/bin/chmod"
|
||||
WHAT = what
|
||||
|
||||
EXE=
|
||||
OBJ=.o
|
||||
|
||||
ACC_ANSI_INVOKE_W_NO = $(ACC) -xansi -w
|
||||
ACC_ANSI_INVOKE_W_YES = $(ACC) -xansi
|
||||
ACC_TRAD_INVOKE_W_NO = $(ACC) -Xs -xansi -w
|
||||
ACC_TRAD_INVOKE_W_YES = $(ACC) -Xs -xansi
|
||||
KRCC_TRAD_INVOKE_W_NO = $(KRCC) -w
|
||||
KRCC_TRAD_INVOKE_W_YES = $(KRCC)
|
||||
ACC_STRICT_INVOKE_W_NO = $(ACC) -ansi -w
|
||||
ACC_STRICT_INVOKE_W_YES = $(ACC) -ansi
|
||||
ACC_STRICT_INVOKE_W_NO = $(ACC) -xansi -w
|
||||
ACC_STRICT_INVOKE_W_YES = $(ACC) -xansi
|
||||
ACC_TRAD_INVOKE_W_NO = $(ACC) -cckr -Xs -w
|
||||
ACC_TRAD_INVOKE_W_YES = $(ACC) -cckr -Xs
|
||||
GCC_ANSI_INVOKE_W_NO = $(GCC) -ansi -w
|
||||
GCC_ANSI_INVOKE_W_YES = $(GCC) -ansi
|
||||
GCC_STRICT_INVOKE_W_NO = $(GCC) -ansi -pedantic
|
||||
@@ -49,15 +59,18 @@ CCC_NORMAL_INVOKE_W_YES = $(CCC) +p +w
|
||||
CCC_STRICT_INVOKE_W_YES = $(CCC) +p +w
|
||||
CCC_LD_FLAGS =
|
||||
CCC_LD_LIBS =
|
||||
CCC_TEMPL_INST_FLAG =
|
||||
G++_NORMAL_INVOKE_W_NO = $(G++) -ansi -pedantic -w
|
||||
G++_NORMAL_INVOKE_W_YES = $(G++) -ansi -pedantic -Wall
|
||||
G++_STRICT_INVOKE_W_YES = $(G++) -ansi -pedantic -Wtraditional -Wall \
|
||||
-Wmissing-prototypes -Woverloaded-virtual \
|
||||
-Wwrite-strings -Wconversion -Wstrict-prototypes\
|
||||
-Wpointer-arith -Winline
|
||||
G++_TEMPL_INST_FLAG = -DEXPL_TEMPL
|
||||
|
||||
CXX_NORMAL = $($(CPLUSPLUS)_NORMAL_INVOKE_W_$(UNIX_WARN))
|
||||
CXX_STRICT = $($(CPLUSPLUS)_STRICT_INVOKE_W_YES)
|
||||
TEMPL_INST_CXXFLAG = $($(CPLUSPLUS)_TEMPL_INST_FLAG)
|
||||
|
||||
# GNU make likes CXX instead of CCC
|
||||
CXX = $(CXX_$(CXXCMPLR))
|
||||
@@ -82,7 +95,8 @@ OPTIM_NO =
|
||||
UNIX_OPT_FLAGS = $(OPTIM_$(UNIX_OPT))
|
||||
|
||||
# Include files
|
||||
UNIX_INCLUDES = -I. -I.. -I$(EPICS_BASE_INCLUDE)
|
||||
UNIX_INCLUDES = -I. -I.. $(USR_INCLUDES) -I$(INSTALL_INCLUDE) -I$(EPICS_BASE_INCLUDE) \
|
||||
-I$(EPICS_BASE_INCLUDE)/os/$(T_A)
|
||||
|
||||
# Operating system flags
|
||||
OP_SYS_FLAGS = -DUNIX
|
||||
@@ -91,35 +105,34 @@ UNIX_LDFLAGS = -L$(EPICS_BASE_LIB)
|
||||
UNIX_LDLIBS = -lm
|
||||
|
||||
ARCH_DEP_CFLAGS = -DSGI
|
||||
ARCH_DEP_CCFLAGS = $(ARCH_DEP_CFLAGS)
|
||||
UNIX_CFLAGS = $(UNIX_SFLAGS) $(USR_INCLUDES) $(UNIX_INCLUDES) $(OP_SYS_FLAGS)
|
||||
ARCH_DEP_CXXFLAGS = $(ARCH_DEP_CFLAGS)
|
||||
|
||||
UNIX_CFLAGS = $(UNIX_SFLAGS) $(UNIX_INCLUDES) $(OP_SYS_FLAGS)
|
||||
|
||||
UNIX_CCFLAGS = $(UNIX_CFLAGS)
|
||||
UNIX_CXXFLAGS = $(UNIX_CFLAGS)
|
||||
|
||||
# Target specific flags
|
||||
TARGET_CFLAGS = $($(basename $@)_CFLAGS)
|
||||
TARGET_CCFLAGS = $($(basename $@)_CCFLAGS)
|
||||
TARGET_CXXFLAGS = $($(basename $@)_CXXFLAGS)
|
||||
TARGET_CPPFLAGS = $($(basename $@)_CPPFLAGS)
|
||||
TARGET_LDFLAGS = $($(basename $@)_LDFLAGS)
|
||||
TARGET_LDLIBS = $($(basename $@)_LDLIBS)
|
||||
TARGET_SNCFLAGS = $($(basename $@)_SNCFLAGS)
|
||||
|
||||
CFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CFLAGS) $(USR_CFLAGS) $(ARCH_DEP_CFLAGS) $(UNIX_CFLAGS)
|
||||
CCFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CCFLAGS) $(USR_CCFLAGS) $(ARCH_DEP_CCFLAGS) $(UNIX_CCFLAGS)
|
||||
CXXFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CXXFLAGS) $(USR_CXXFLAGS) \
|
||||
$(ARCH_DEP_CXXFLAGS) $(UNIX_CXXFLAGS) $(TEMPL_INST_CXXFLAG)
|
||||
CPPFLAGS += $(TARGET_CPPFLAGS) $(USR_CPPFLAGS)
|
||||
|
||||
# GNU make likes CXX instead of CCC
|
||||
CXXFLAGS = $(CCFLAGS)
|
||||
|
||||
LDFLAGS = $(SPECIAL_LDFLAGS) $(TARGET_LDFLAGS) $(USR_LDFLAGS) $(ARCH_DEP_LDFLAGS) $(UNIX_LDFLAGS)
|
||||
LDLIBS = $(TARGET_LDLIBS) $(USR_LDLIBS) $(ARCH_DEP_LDLIBS) $(UNIX_LDLIBS)
|
||||
|
||||
# Override defaults
|
||||
COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c
|
||||
COMPILE.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c
|
||||
LINK.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
LINK.cc = $(CXX) $(CCFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
LOAD.c = ld -shared $(LDFLAGS)
|
||||
# Unlike the 'Unix' makesystem, output flags -o .. are now part of LINK.c[c]
|
||||
LINK.c = $(CC) -o $@ $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
LINK.cc = $(CXX) -o $@ $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
|
||||
DEPENDS_RULE.c = -$(COMPILE.c) -M $(SRCS.c) > .DEPENDS
|
||||
DEPENDS_RULE.cc = @echo no DEPENDS_RULE.cc defined in CONFIG.Unix.sgi
|
||||
DEPENDS_RULE.cc = @echo no DEPENDS_RULE.cc defined in CONFIG.sgi
|
||||
|
||||
@@ -1,27 +1,46 @@
|
||||
#
|
||||
# $Id$: CONFIG.Unix.solaris,v $
|
||||
# $Id$
|
||||
#
|
||||
# This file is maintained by the EPICS community.
|
||||
|
||||
# BUILD_TYPE
|
||||
# Currently either Vx or Unix
|
||||
BUILD_TYPE = Unix
|
||||
# Currently either Vx or Host
|
||||
BUILD_TYPE = Host
|
||||
|
||||
ARCH_CLASS = solaris
|
||||
|
||||
# Compiler and utility invocation (supply path to compiler here)
|
||||
# (with warning flags built in)
|
||||
# Paths to compilers
|
||||
GCC = gcc
|
||||
GCC = /opt/gnu/bin/gcc
|
||||
ACC = $(SPARCWORKS)/bin/cc
|
||||
# SUNCC doesn't exist under Solaris
|
||||
|
||||
#
|
||||
# required by sun's C++ compiler
|
||||
#
|
||||
AR = ar
|
||||
_AR = $(AR) $(ARFLAGS)
|
||||
G++_AR = $(_AR)
|
||||
CCC_AR = $(CCC) -xar -o
|
||||
ARCMD = $($(CPLUSPLUS)_AR)
|
||||
|
||||
RANLIB =
|
||||
YACC = $(EYACC)
|
||||
LEX = $(ELEX)
|
||||
G++ = /opt/gnu/bin/g++
|
||||
CCC = /opt/SUNWspro/bin/CC
|
||||
RMDIR = rm -rf
|
||||
MKDIR = mkdir
|
||||
|
||||
CP=cp
|
||||
MV=mv
|
||||
RM=rm -f
|
||||
MKDIR=mkdir
|
||||
RMDIR=rm -rf
|
||||
CHMOD = "/bin/chmod"
|
||||
WHAT = what
|
||||
|
||||
EXE=
|
||||
OBJ=.o
|
||||
|
||||
ACC_ANSI_INVOKE_W_NO = $(ACC) -Xa -w
|
||||
ACC_ANSI_INVOKE_W_YES = $(ACC) -Xa
|
||||
@@ -59,16 +78,19 @@ CCC_NORMAL_INVOKE_W_YES = $(CCC) +p +w
|
||||
CCC_STRICT_INVOKE_W_YES = $(CCC) +p +w
|
||||
CCC_LD_FLAGS = -L$(SPECIAL_LANG)
|
||||
CCC_LD_LIBS =
|
||||
CCC_TEMPL_INST_FLAG =
|
||||
G++_NORMAL_INVOKE_W_NO = $(G++) -ansi -pedantic -w
|
||||
G++_NORMAL_INVOKE_W_YES = $(G++) -ansi -pedantic -Wall
|
||||
G++_STRICT_INVOKE_W_YES = $(G++) -ansi -pedantic -Wtraditional -Wall \
|
||||
-Wmissing-prototypes -Woverloaded-virtual \
|
||||
-Wwrite-strings -Wconversion -Wstrict-prototypes\
|
||||
-Wpointer-arith -Winline
|
||||
G++_TEMPL_INST_FLAG = -DEXPL_TEMPL
|
||||
|
||||
CXX_NORMAL = $($(CPLUSPLUS)_NORMAL_INVOKE_W_$(UNIX_WARN))
|
||||
CXX_STRICT = $($(CPLUSPLUS)_STRICT_INVOKE_W_YES)
|
||||
|
||||
TEMPL_INST_CXXFLAG = $($(CPLUSPLUS)_TEMPL_INST_FLAG)
|
||||
|
||||
# GNU make likes CXX instead of CCC
|
||||
CXX = $(CXX_$(CXXCMPLR))
|
||||
|
||||
@@ -99,7 +121,8 @@ OPTIM_NO =
|
||||
UNIX_OPT_FLAGS = $(OPTIM_$(UNIX_OPT))
|
||||
|
||||
# Include files
|
||||
UNIX_INCLUDES = -I. -I.. -I$(EPICS_BASE_INCLUDE)
|
||||
UNIX_INCLUDES = -I. -I.. $(USR_INCLUDES) -I$(INSTALL_INCLUDE) -I$(EPICS_BASE_INCLUDE) \
|
||||
-I$(EPICS_BASE_INCLUDE)/os/$(T_A)
|
||||
|
||||
# Operating system flags
|
||||
OP_SYS_FLAGS = -DUNIX
|
||||
@@ -109,38 +132,37 @@ UNIX_LDLIBS = $(UNIX_SLIBS) -lm $(CCOMPILER_LDLIBS)
|
||||
|
||||
# Architecture specific build flags
|
||||
ARCH_DEP_CFLAGS = -DSOLARIS
|
||||
ARCH_DEP_CCFLAGS = $(ARCH_DEP_CFLAGS)
|
||||
ARCH_DEP_CXXFLAGS = $(ARCH_DEP_CFLAGS)
|
||||
ARCH_DEP_LDLIBS = -lsocket -lnsl
|
||||
# -lsocket needed by libca.a
|
||||
# -lnsl needed by libca.a
|
||||
|
||||
UNIX_CFLAGS = $(UNIX_SFLAGS) $(UNIX_INCLUDES) $(USR_INCLUDES) $(OP_SYS_FLAGS)
|
||||
UNIX_CFLAGS = $(UNIX_SFLAGS) $(UNIX_INCLUDES) $(OP_SYS_FLAGS)
|
||||
|
||||
UNIX_CCFLAGS = $(UNIX_CFLAGS)
|
||||
UNIX_CXXFLAGS = $(UNIX_CFLAGS)
|
||||
|
||||
# Target specific flags
|
||||
TARGET_CFLAGS = $($(basename $@)_CFLAGS)
|
||||
TARGET_CCFLAGS = $($(basename $@)_CCFLAGS)
|
||||
TARGET_CXXFLAGS = $($(basename $@)_CXXFLAGS)
|
||||
TARGET_CPPFLAGS = $($(basename $@)_CPPFLAGS)
|
||||
TARGET_LDFLAGS = $($(basename $@)_LDFLAGS)
|
||||
TARGET_LDLIBS = $($(basename $@)_LDLIBS)
|
||||
TARGET_SNCFLAGS = $($(basename $@)_SNCFLAGS)
|
||||
|
||||
CFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CFLAGS) $(USR_CFLAGS) $(ARCH_DEP_CFLAGS) $(UNIX_CFLAGS)
|
||||
CCFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CCFLAGS) $(USR_CCFLAGS) $(ARCH_DEP_CCFLAGS) $(UNIX_CCFLAGS)
|
||||
CXXFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CXXFLAGS) $(USR_CXXFLAGS) \
|
||||
$(ARCH_DEP_CXXFLAGS) $(UNIX_CXXFLAGS) $(TEMPL_INST_CXXFLAG)
|
||||
CPPFLAGS += $(TARGET_CPPFLAGS) $(USR_CPPFLAGS)
|
||||
|
||||
# GNU make likes CXX instead of CCC
|
||||
CXXFLAGS = $(CCFLAGS)
|
||||
|
||||
LDFLAGS = $(SPECIAL_LDFLAGS) $(TARGET_LDFLAGS) $(USR_LDFLAGS) $(ARCH_DEP_LDFLAGS) $(UNIX_LDFLAGS)
|
||||
LDLIBS = $(TARGET_LDLIBS) $(USR_LDLIBS) $(ARCH_DEP_LDLIBS) $(UNIX_LDLIBS)
|
||||
|
||||
# Override SUN defaults
|
||||
COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c
|
||||
COMPILE.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c
|
||||
LINK.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
LINK.cc = $(CXX) $(CCFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
# Unlike the 'Unix' makesystem, output flags -o .. are now part of LINK.c[c]
|
||||
LINK.c = $(CC) -o $@ $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
LINK.cc = $(CXX) -o $@ $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
|
||||
DEPENDS_RULE.c = -$(COMPILE.c) -xM $(SRCS.c) > .DEPENDS
|
||||
DEPENDS_RULE.cc = @echo no DEPENDS_RULE.cc defined in CONFIG.Unix.solaris
|
||||
DEPENDS_RULE.cc = -$(COMPILE.cc) -xM $(SRCS.cc) >> .DEPENDS
|
||||
|
||||
@@ -4,8 +4,11 @@
|
||||
# This file is maintained by the EPICS community.
|
||||
|
||||
# BUILD_TYPE
|
||||
# Currently either Vx or Unix
|
||||
BUILD_TYPE = Unix
|
||||
# Currently either Vx or Host
|
||||
|
||||
BUILD_TYPE = Host
|
||||
|
||||
ARCH_CLASS=sun4
|
||||
|
||||
# Compiler and utility invocation (supply path to compiler here)
|
||||
# (with warning flags built in)
|
||||
@@ -13,16 +16,37 @@ BUILD_TYPE = Unix
|
||||
GCC = gcc
|
||||
ACC = /usr/lang/acc
|
||||
SUNCC = cc
|
||||
AR = ar
|
||||
ARFLAGS = r
|
||||
RANLIB = ranlib
|
||||
RANLIBFLAGS = -t
|
||||
YACC = $(EYACC)
|
||||
LEX = $(ELEX)
|
||||
G++ = g++
|
||||
CCC = /usr/lang/CC
|
||||
|
||||
RMDIR = rm -rf
|
||||
MKDIR = mkdir
|
||||
CHMOD = "/bin/chmod"
|
||||
CP=cp
|
||||
MV=mv
|
||||
RM=rm -f
|
||||
WHAT = what
|
||||
|
||||
EXE=
|
||||
OBJ=.o
|
||||
|
||||
#
|
||||
# original before use of sun C++
|
||||
#
|
||||
|
||||
#
|
||||
# required by sun's C++ compiler
|
||||
#
|
||||
ARFLAGS = r
|
||||
AR = ar
|
||||
_AR = $(AR) $(ARFLAGS)
|
||||
G++_AR = $(_AR)
|
||||
CCC_AR = $(CCC) -xar -o
|
||||
ARCMD = $($(CPLUSPLUS)_AR)
|
||||
|
||||
ACC_ANSI_INVOKE_W_NO = $(ACC) -Xa -w
|
||||
ACC_ANSI_INVOKE_W_YES = $(ACC) -Xa
|
||||
@@ -62,20 +86,22 @@ CCC_NORMAL_INVOKE_W_YES = $(CCC) +p +w
|
||||
CCC_STRICT_INVOKE_W_YES = $(CCC) +p +w
|
||||
CCC_LD_FLAGS = -L$(SPECIAL_LANG)
|
||||
CCC_LD_LIBS =
|
||||
CCC_TEMPL_INST_FLAG =
|
||||
G++_NORMAL_INVOKE_W_NO = $(G++) -ansi -pedantic -w
|
||||
G++_NORMAL_INVOKE_W_YES = $(G++) -ansi -pedantic -Wall
|
||||
G++_STRICT_INVOKE_W_YES = $(G++) -ansi -pedantic -Wtraditional -Wall \
|
||||
-Wmissing-prototypes -Woverloaded-virtual \
|
||||
-Wwrite-strings -Wconversion -Wstrict-prototypes\
|
||||
-Wpointer-arith -Winline
|
||||
G++_TEMPL_INST_FLAG = -DEXPL_TEMPL
|
||||
|
||||
CXX_NORMAL = $($(CPLUSPLUS)_NORMAL_INVOKE_W_$(UNIX_WARN))
|
||||
CXX_STRICT = $($(CPLUSPLUS)_STRICT_INVOKE_W_YES)
|
||||
TEMPL_INST_CXXFLAG = $($(CPLUSPLUS)_TEMPL_INST_FLAG)
|
||||
|
||||
# GNU make likes CXX instead of CCC
|
||||
CXX = $(CXX_$(CXXCMPLR))
|
||||
|
||||
|
||||
# Static Build options
|
||||
ACC_SFLAGS_YES= -Bstatic
|
||||
ACC_SFLAGS_NO=
|
||||
@@ -95,7 +121,8 @@ OPTIM_NO =
|
||||
UNIX_OPT_FLAGS = $(OPTIM_$(UNIX_OPT))
|
||||
|
||||
# Include files
|
||||
UNIX_INCLUDES = -I. -I.. -I$(EPICS_BASE_INCLUDE)
|
||||
UNIX_INCLUDES = -I. -I.. $(USR_INCLUDES) -I$(INSTALL_INCLUDE) -I$(EPICS_BASE_INCLUDE) \
|
||||
-I$(EPICS_BASE_INCLUDE)/os/$(T_A)
|
||||
|
||||
# Operating system flags
|
||||
OP_SYS_FLAGS = -DUNIX
|
||||
@@ -106,34 +133,35 @@ UNIX_LDFLAGS = -L$(EPICS_BASE_LIB) $(CCOMPILER_LDFLAGS)
|
||||
UNIX_LDLIBS = -lm $(CCOMPILER_LDLIBS)
|
||||
|
||||
ARCH_DEP_CFLAGS = -DSUNOS4
|
||||
ARCH_DEP_CCFLAGS = $(ARCH_DEP_CFLAGS)
|
||||
UNIX_CFLAGS = $(UNIX_SFLAGS) $(USR_INCLUDES) $(UNIX_INCLUDES) $(OP_SYS_FLAGS)
|
||||
ARCH_DEP_CXXFLAGS = $(ARCH_DEP_CFLAGS)
|
||||
UNIX_CFLAGS = $(UNIX_SFLAGS) $(UNIX_INCLUDES) $(OP_SYS_FLAGS)
|
||||
|
||||
UNIX_CCFLAGS = $(UNIX_CFLAGS)
|
||||
UNIX_CXXFLAGS = $(UNIX_CFLAGS)
|
||||
|
||||
# Target specific flags
|
||||
TARGET_CFLAGS = $($(basename $@)_CFLAGS)
|
||||
TARGET_CCFLAGS = $($(basename $@)_CCFLAGS)
|
||||
TARGET_CXXFLAGS = $($(basename $@)_CXXFLAGS)
|
||||
TARGET_CPPFLAGS = $($(basename $@)_CPPFLAGS)
|
||||
TARGET_LDFLAGS = $($(basename $@)_LDFLAGS)
|
||||
TARGET_LDLIBS = $($(basename $@)_LDLIBS)
|
||||
TARGET_SNCFLAGS = $($(basename $@)_SNCFLAGS)
|
||||
|
||||
CFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CFLAGS) $(USR_CFLAGS) $(ARCH_DEP_CFLAGS) $(UNIX_CFLAGS)
|
||||
CCFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CCFLAGS) $(USR_CCFLAGS) $(ARCH_DEP_CCFLAGS) $(UNIX_CCFLAGS)
|
||||
CXXFLAGS = $(UNIX_OPT_FLAGS) $(TARGET_CXXFLAGS) $(USR_CXXFLAGS) $(ARCH_DEP_CXXFLAGS) \
|
||||
$(UNIX_CXXFLAGS) $(TEMPL_INST_CXXFLAG)
|
||||
CPPFLAGS += $(TARGET_CPPFLAGS) $(USR_CPPFLAGS)
|
||||
|
||||
# GNU make likes CXX instead of CCC
|
||||
CXXFLAGS = $(CCFLAGS)
|
||||
|
||||
LDFLAGS = $(SPECIAL_LDFLAGS) $(TARGET_LDFLAGS) $(USR_LDFLAGS) $(ARCH_DEP_LDFLAGS) $(UNIX_LDFLAGS)
|
||||
LDLIBS = $(TARGET_LDLIBS) $(USR_LDLIBS) $(ARCH_DEP_LDLIBS) $(UNIX_LDLIBS)
|
||||
|
||||
# Override SUN defaults
|
||||
COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c
|
||||
COMPILE.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c
|
||||
LINK.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
LINK.cc = $(CXX) $(CCFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
|
||||
# changed from 'Unix' makesystem:
|
||||
# link command now contains the output flag '-o $@'
|
||||
LINK.c = $(CC) -o $@ $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
LINK.cc = $(CXX) -o $@ $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS)
|
||||
|
||||
DEPENDS_RULE.c = -$(COMPILE.c) -M $(SRCS.c) > .DEPENDS
|
||||
DEPENDS_RULE.cc = @echo no DEPENDS_RULE.cc defined in CONFIG.Unix.sun4
|
||||
DEPENDS_RULE.cc = @echo no DEPENDS_RULE.cc defined in CONFIG.sun4
|
||||
|
||||
@@ -4,46 +4,52 @@
|
||||
|
||||
# the order of following list is important
|
||||
|
||||
DIRS = \
|
||||
tools \
|
||||
include \
|
||||
cxxTemplates \
|
||||
toolsComm\
|
||||
libCom \
|
||||
libvxWorks\
|
||||
cvtDctsdr \
|
||||
dbStatic \
|
||||
db \
|
||||
bpt \
|
||||
ca \
|
||||
gdd \
|
||||
cas \
|
||||
util \
|
||||
misc \
|
||||
sequencer \
|
||||
dbtools \
|
||||
rsrv\
|
||||
rec\
|
||||
as \
|
||||
drv\
|
||||
dev\
|
||||
devOpt\
|
||||
iocCore
|
||||
#
|
||||
# for c++ build add the dirs gdd and cas after ca
|
||||
# (and uncomment the c++ files in src/lbCom/Makefile.Unix)
|
||||
#
|
||||
DIRS = tools
|
||||
DIRS += include
|
||||
DIRS += cxxTemplates
|
||||
DIRS += toolsComm
|
||||
DIRS += libCom
|
||||
DIRS += libvxWorks
|
||||
DIRS += cvtDctsdr
|
||||
DIRS += dbStatic
|
||||
DIRS += db
|
||||
DIRS += bpt
|
||||
DIRS += ca
|
||||
DIRS += util
|
||||
DIRS += misc
|
||||
DIRS += sequencer
|
||||
DIRS += dbtools
|
||||
DIRS += rsrv
|
||||
DIRS += rec
|
||||
DIRS += as
|
||||
DIRS += drv
|
||||
DIRS += dev
|
||||
DIRS += devOpt
|
||||
DIRS += iocCore
|
||||
|
||||
#
|
||||
# if CPLUSPLUS isnt empty then include C++ src codes
|
||||
#
|
||||
DIRS += $(patsubst %,gdd,$(strip $(CPLUSPLUS)))
|
||||
DIRS += $(patsubst %,cas,$(strip $(CPLUSPLUS)))
|
||||
|
||||
EPICS_BASE = $(TOP)
|
||||
|
||||
# EPICS include config file
|
||||
include $(TOP)/config/CONFIG
|
||||
include $(EPICS_BASE)/config/CONFIG
|
||||
|
||||
EPICS_BASE = $(INSTALL_LOCATION)
|
||||
|
||||
#
|
||||
# this speeds up the build by turning off implicit rules search
|
||||
#
|
||||
.PHONY: $(TOP)/config/CONFIG
|
||||
.PHONY: $(TOP)/config/CONFIG.* $(TOP)/config/CONFIG_*
|
||||
.PHONY: $(TOP)/config/RULES.* $(TOP)/config/RULES_* .DEPENDS
|
||||
.PHONY: $(HOME)/.EPICS_CONFIG
|
||||
.PHONY: ../Makefile.Vx ../Makefile.Unix ../Makefile.Host Makefile
|
||||
.PHONY:: $(EPICS_BASE)/config/CONFIG
|
||||
.PHONY:: $(EPICS_BASE)/config/CONFIG.* $(EPICS_BASE)/config/CONFIG_*
|
||||
.PHONY:: $(EPICS_BASE)/config/RULES.* $(EPICS_BASE)/config/RULES_* .DEPENDS
|
||||
.PHONY:: $(HOME)/.EPICS_CONFIG $(HOME)/.EPICS_CONFIG.$(HOST_ARCH)
|
||||
.PHONY:: ../Makefile.Vx ../Makefile.Unix ../Makefile.Host Makefile
|
||||
|
||||
|
||||
19
config/CONFIG_BASE_VERSION
Normal file
19
config/CONFIG_BASE_VERSION
Normal file
@@ -0,0 +1,19 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# EPICS Version information
|
||||
#
|
||||
# This file is interpreted by the Bourne Shell (MakeRelease), so spaces are
|
||||
# not allowed around the '=' signs or in unquoted values.
|
||||
#
|
||||
|
||||
EPICS_VERSION=3
|
||||
EPICS_REVISION=13
|
||||
EPICS_MODIFICATION=0
|
||||
EPICS_UPDATE_NAME=beta
|
||||
EPICS_UPDATE_LEVEL=9
|
||||
|
||||
EPICS_VERSION_STRING="EPICS Version ${EPICS_VERSION}.${EPICS_REVISION}.${EPICS_MODIFICATION}.${EPICS_UPDATE_NAME}${EPICS_UPDATE_LEVEL}"
|
||||
|
||||
CVS_DATE="\$$Date$$"
|
||||
|
||||
@@ -9,15 +9,15 @@
|
||||
|
||||
# Common Configuration Information
|
||||
|
||||
BUILD_ARCHS=$(HOST_ARCH)
|
||||
ifndef CROSS_COMPILER_HOST_ARCHS
|
||||
BUILD_ARCHS+=$(CROSS_COMPILER_TARGET_ARCHS)
|
||||
else
|
||||
ifeq ($(HOST_ARCH),$(findstring $(HOST_ARCH),$(CROSS_COMPILER_HOST_ARCHS)))
|
||||
BUILD_ARCHS+=$(CROSS_COMPILER_TARGET_ARCHS)
|
||||
endif
|
||||
endif
|
||||
|
||||
# CROSS1 will be defined only when CROSS_COMPILER_HOST_ARCHS is NOT defined
|
||||
CROSS1 = $(CROSS_COMPILER_TARGET_ARCHS$(word 1,$(CROSS_COMPILER_HOST_ARCHS)))
|
||||
|
||||
# CROSS2 will be defined only when CROSS_COMPILER_HOST_ARCHS is defined
|
||||
# and HOST_ARCH is one of it's words
|
||||
CROSS2 = $(CROSS_COMPILER_TARGET_ARCHS$(filter-out 1,$(words $(filter $(HOST_ARCH),$(CROSS_COMPILER_HOST_ARCHS)))))
|
||||
|
||||
BUILD_ARCHS = $(HOST_ARCH) $(CROSS1) $(CROSS2)
|
||||
|
||||
INSTALL_LOCATION = $(TOP)
|
||||
|
||||
INSTALL_LOCATION_LIB = $(INSTALL_LOCATION)/lib
|
||||
@@ -39,11 +39,15 @@ EPICS_EXTENSIONS_TEMPLATES = $(EPICS_EXTENSIONS)/templates
|
||||
DIVIDER = .
|
||||
|
||||
# private versions of lex/yacc from EPICS
|
||||
EYACC = $(EPICS_BASE)/bin/$(HOST_ARCH)/antelope
|
||||
ELEX = $(EPICS_BASE)/bin/$(HOST_ARCH)/e_flex -S$(EPICS_BASE_INCLUDE)/flex.skel.static
|
||||
EYACC = $(EPICS_BASE)/bin/$(HOST_ARCH)/antelope$(EXE)
|
||||
ELEX = $(EPICS_BASE)/bin/$(HOST_ARCH)/e_flex$(EXE) -S$(EPICS_BASE_INCLUDE)/flex.skel.static
|
||||
|
||||
# Default for perl if it's on the PATH,
|
||||
# otherwise override this in e.g. CONFIG_SITE
|
||||
PERL=perl
|
||||
|
||||
# install from EPICS
|
||||
INSTALL = $(EPICS_BASE)/bin/$(HOST_ARCH)/installEpics
|
||||
INSTALL = $(PERL) $(EPICS_BASE)/bin/$(HOST_ARCH)/installEpics.pl
|
||||
INSTALL_PRODUCT = $(INSTALL)
|
||||
|
||||
# dbtools from EPICS
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
# not allowed around the '=' signs or in unquoted values.
|
||||
# Makefile variables are not defined here.
|
||||
#
|
||||
# Note: This file is read by base/src/libCom/bldEnvdata.pl,
|
||||
# so the variable definitions in here should be kept 'simple':
|
||||
# VAR=VALUE
|
||||
# each one on a single line.
|
||||
#
|
||||
|
||||
|
||||
@@ -20,20 +24,43 @@
|
||||
# from white space separated ip addresses in this
|
||||
# environment variable. "Quote" if more than one addr.
|
||||
# EPICS_CA_AUTO_ADDR_LIST YES = augment beacon/search dest ip
|
||||
# addr list from interfaces found; NO = only use
|
||||
# addr list from network interfaces found; NO = only use
|
||||
# EPICS_CA_ADDR_LIST to create this list.
|
||||
# EPICS_CA_CONN_TMO sec before sending echo request from client.
|
||||
# EPICS_CA_BEACON_PERIOD quiescent sec between server beacons.
|
||||
# EPICS_CA_REPEATER_PORT CA repeater port number.
|
||||
# EPICS_CA_SERVER_PORT CA server port number.
|
||||
|
||||
EPICS_CA_ADDR_LIST=""
|
||||
EPICS_CA_AUTO_ADDR_LIST=YES
|
||||
EPICS_CA_CONN_TMO=30.0
|
||||
EPICS_CA_BEACON_PERIOD=15.0
|
||||
EPICS_CA_REPEATER_PORT=5065
|
||||
EPICS_CA_SERVER_PORT=5064
|
||||
|
||||
#
|
||||
# These parameters are only used by the CA server library
|
||||
#
|
||||
# EPICS_CA_BEACON_PERIOD quiescent sec between server beacons.
|
||||
# EPICS_CAS_INTF_ADDR_LIST - list of IP addresses identifying
|
||||
# a limited set of interfaces that the server should bind to.
|
||||
# If this parameter is empty then connections are accepted
|
||||
# from any interface. Beacons are sent only to the broadcast
|
||||
# address of each interface in this list (or the destination
|
||||
# address of point to point interfaces) if EPICS_CA_AUTO_ADDR_LIST
|
||||
# is YES. Type "ifconfig -a" in order to determine which
|
||||
# interfaces are available.
|
||||
# EPICS_CAS_BEACON_ADDR_LIST - If this parameter is specified
|
||||
# or if EPICS_CAS_INTF_ADDR_LIST isnt empty then this parameter
|
||||
# is used instead of EPICS_CA_ADDR_LIST by the server library
|
||||
# to augment the list of addresses to send beacons to.
|
||||
# EPICS_CAS_SERVER_PORT - If this parameter is specified then it
|
||||
# and not EPICS_CA_SERVER_PORT is used to determine the server's
|
||||
# port number.
|
||||
#
|
||||
EPICS_CA_BEACON_PERIOD=15.0
|
||||
EPICS_CAS_INTF_ADDR_LIST=""
|
||||
EPICS_CAS_BEACON_ADDR_LIST=""
|
||||
EPICS_CAS_SERVER_PORT=
|
||||
|
||||
|
||||
# Log Server:
|
||||
# EPICS_IOC_LOG_PORT Log server port number.
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
# solaris
|
||||
# sgi
|
||||
# Linux
|
||||
# WIN32
|
||||
#
|
||||
# HOST_ARCH now an environment variable
|
||||
# HOST_ARCH=$(shell /usr/local/epics/startup/HostArch)
|
||||
@@ -35,6 +36,7 @@ endif
|
||||
# mv147
|
||||
# hkv2f
|
||||
# niCpu030
|
||||
# pc486
|
||||
#
|
||||
CROSS_COMPILER_TARGET_ARCHS=mv167
|
||||
|
||||
@@ -50,9 +52,14 @@ CROSS_COMPILER_TARGET_ARCHS=mv167
|
||||
#VX_DIR=/usr/local/vw/vxV52/vw
|
||||
VX_DIR=/usr/local/vw/vxV52p1/vw
|
||||
|
||||
# Gnu directory for gcc
|
||||
#VX_GNU = $(VX_DIR)
|
||||
VX_GNU = $(VX_DIR)/../vxgccV2.2.3.1
|
||||
|
||||
# Gnu directory for g++
|
||||
GNU_DIR = /usr/local/hideos/gnu_install-2.7.2
|
||||
GNU_BIN = $(GNU_DIR)/bin
|
||||
GNU_LIB = $(GNU_DIR)/lib
|
||||
|
||||
# Client ANSI Compiler
|
||||
# GCC (gcc -ansi)
|
||||
@@ -69,10 +76,11 @@ ANSI=ACC
|
||||
#STANDARD=HPCC
|
||||
STANDARD=ACC
|
||||
|
||||
# Client C++ Compiler (Not supported yet)
|
||||
# C++ Compiler
|
||||
# G++ (g++) GNU C++
|
||||
# CCC (CC) SUN C++
|
||||
# CCC (CC) OS VENDOR C++
|
||||
#CPLUSPLUS=G++
|
||||
#CPLUSPLUS= # use this if site does not have C++ compiler
|
||||
CPLUSPLUS=CCC
|
||||
|
||||
# Build client objects statically ?
|
||||
|
||||
29
config/CONFIG_SITE.Vx.68k.cygwin32
Normal file
29
config/CONFIG_SITE.Vx.68k.cygwin32
Normal file
@@ -0,0 +1,29 @@
|
||||
# $Id$
|
||||
#
|
||||
# This file is maintained by the EPICS community.
|
||||
|
||||
|
||||
# Site host architecture specific overrides for Vx.68k
|
||||
#
|
||||
|
||||
ANSI=GCC
|
||||
STANDARD=GCC
|
||||
CPLUSPLUS=G++
|
||||
|
||||
VX_DIR=/vw/vxV52p1/vw
|
||||
VX_GNU=/usr/local
|
||||
|
||||
VX_GNU_BIN = $(VX_GNU)/bin
|
||||
VX_GNU_LIB = $(VX_GNU)/lib
|
||||
|
||||
AR=$(VX_GNU_BIN)/m68k-wrs-vxworks-ar.exe
|
||||
RANLIB=$(VX_GNU_BIN)/m68k-wrs-vxworks-ranlib.exe
|
||||
CC=$(VX_GNU_BIN)/m68k-wrs-vxworks-gcc.exe -B$(VX_GNU_LIB)/gcc-lib/ -nostdinc
|
||||
G++=$(VX_GNU_BIN)/m68k-wrs-vxworks-g++.exe -B$(VX_GNU_LIB)/gcc-lib/ -nostdinc
|
||||
CPP=$(VX_GNU_BIN)/m68k-wrs-vxworks-cpp.exe -nostdinc
|
||||
LD=$(VX_GNU_BIN)/m68k-wrs-vxworks-ld.exe -r
|
||||
|
||||
# Not in cygwin32
|
||||
WHAT = echo
|
||||
|
||||
|
||||
7
config/CONFIG_SITE.WIN32
Normal file
7
config/CONFIG_SITE.WIN32
Normal file
@@ -0,0 +1,7 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# Site Specific Configuration Information
|
||||
# Only the local epics system manager should modify this file
|
||||
|
||||
|
||||
21
config/CONFIG_SITE.cygwin32
Executable file
21
config/CONFIG_SITE.cygwin32
Executable file
@@ -0,0 +1,21 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# Site Specific Configuration Information
|
||||
# Only the local epics system manager should modify this file
|
||||
|
||||
|
||||
# Default compiler, individual Makefiles will override
|
||||
# if they cannot support ANSI compilation.
|
||||
# STRICT - ANSI C - force warning flags
|
||||
# ANSI - ANSI C
|
||||
# OLD - Standard C - Not appropriate here.
|
||||
CMPLR=ANSI
|
||||
|
||||
# Default C++ compiler, individual Makefiles will override
|
||||
# if they are coded to a higher standard.
|
||||
# STRICT - ANSI C++ force strict warning flags
|
||||
# NORMAL - ANSI C++ optional warning flags
|
||||
CXXCMPLR=NORMAL
|
||||
|
||||
SPECIAL_LANG = .
|
||||
9
config/CONFIG_SITE.mv177
Normal file
9
config/CONFIG_SITE.mv177
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
# $Id$
|
||||
#
|
||||
# Site Specific Configuration Information
|
||||
# Only the local epics system manager should modify this file
|
||||
|
||||
# Epics defs
|
||||
|
||||
|
||||
6
config/CONFIG_SITE.pc486
Normal file
6
config/CONFIG_SITE.pc486
Normal file
@@ -0,0 +1,6 @@
|
||||
# $Log$
|
||||
# Revision 1.1.2.1 1996/11/25 20:20:22 jhill
|
||||
# installed
|
||||
#
|
||||
# -kuk-
|
||||
|
||||
@@ -22,6 +22,6 @@ CXXCMPLR=NORMAL
|
||||
#CXXCMPLR=STRICT
|
||||
|
||||
# Special C library requirements
|
||||
SPECIAL_LANG = /usr/lang/SC2.0.1patch
|
||||
SPECIAL_LANG =
|
||||
|
||||
|
||||
|
||||
@@ -10,6 +10,11 @@
|
||||
# not allowed around the '=' signs or in unquoted values.
|
||||
# Makefile variables are not defined here.
|
||||
#
|
||||
# Note: This file is read by base/src/libCom/bldEnvdata.pl,
|
||||
# so the variable definitions in here should be kept 'simple':
|
||||
# VAR=VALUE
|
||||
# each one on a single line.
|
||||
#
|
||||
|
||||
# Site-specific environment settings
|
||||
|
||||
|
||||
105
config/HostSys.txt
Normal file
105
config/HostSys.txt
Normal file
@@ -0,0 +1,105 @@
|
||||
Short Description of the "Host" (vs. "Unix") Build System
|
||||
---------------------------------------------------------
|
||||
|
||||
7-30-96 -kuk-
|
||||
questions/comments please mailto:kasemir@atdiv.lanl.gov
|
||||
|
||||
|
||||
To build EPICS on the WIN32 architecture
|
||||
the "old" make-system using Makefile.Unix in each
|
||||
subdir and RULES.Host was not suitable because
|
||||
it is too much Unix-dependent.
|
||||
|
||||
A "new" system using Makefile.Host and RULES.Host
|
||||
was used instead. This "host" system should work
|
||||
on all other architectures as well.
|
||||
The idea is that ALL architectures should be able to use
|
||||
the "host" system in future because.
|
||||
|
||||
The syntax of the 'Host' Makefiles is described
|
||||
in 'Sample.Makefile.Host'. Any suggestions for a
|
||||
better syntax (in connection whith ideas how to
|
||||
implement this in RULES.Host!) are very welcome!
|
||||
|
||||
To use it, only a few changes should be necessary:
|
||||
|
||||
A) In CONFIG.<WIN32, sun4, hp700, ... whatever you are using>:
|
||||
|
||||
1) Set
|
||||
BUILD_TYPE=Host
|
||||
instead of 'Unix'. This switches you over to using
|
||||
Makefile.Host instead of Makefile.Unix.
|
||||
|
||||
2) Set ARCH_CLASS to the correct architecture class.
|
||||
(ARCH_CLASS used to be defined in the past, right now
|
||||
it seems it's only set for VxWorks targets, not hosts).
|
||||
|
||||
ARCH_CLASS is used to define system-dependent
|
||||
CFLAGS, library contents etc. in Makefile.Host,
|
||||
so it should describe the general architecture,
|
||||
maybe
|
||||
WIN32 : this is the only one really supported in Makefile.Host by now
|
||||
BSD for sun4,
|
||||
SYSV for ??,
|
||||
|
||||
Maybe this "general arch" is not sufficient, so we will
|
||||
end up using
|
||||
ARCH_CLASS=WIN32, sun4, hp700, ....
|
||||
as it used to be.
|
||||
|
||||
3) Make sure that the following (new) macros are defined:
|
||||
|
||||
CP =$(PERL) $(EPICS_BASE)/src/tools/cp.pl
|
||||
MV =$(PERL) $(EPICS_BASE)/src/tools/mv.pl
|
||||
RM =$(PERL) $(EPICS_BASE)/src/tools/rm.pl -f
|
||||
MKDIR=$(PERL) $(EPICS_BASE)/src/tools/mkdir.pl
|
||||
RMDIR=$(PERL) $(EPICS_BASE)/src/tools/rm.pl -rf
|
||||
or
|
||||
CP=cp
|
||||
MV=mv
|
||||
RM=rm -f
|
||||
MKDIR=mkdir
|
||||
RMDIR=rm -rf
|
||||
|
||||
EXE=
|
||||
OBJ=.o
|
||||
|
||||
4) LINK.c and LINK.cc must now include the target-flag, e.g.:
|
||||
LINK.c = $(CC) $(LDFLAGS) -o $@
|
||||
|
||||
because the "-o $@" is also system dependent (it's -Fe$@ for WIN32)
|
||||
|
||||
5) The bin directory for the host based epics tools
|
||||
$(EPICS)/base/bin/$(HOST_ARCH)
|
||||
must be in your PATH.
|
||||
|
||||
|
||||
B) Adjust Makefile.Host
|
||||
|
||||
If you are trying to build EPICS now, there might be errors
|
||||
because the Makefile.Host files are only tested on WIN32, yet.
|
||||
|
||||
If changes are necessare in some base/src/???/Makefile.Host,
|
||||
refer to Sample.Makefile.Host in the base/config dir.
|
||||
|
||||
|
||||
|
||||
|
||||
The current make-system for WIN32
|
||||
needs
|
||||
* gnumake (OK, sources for WIN32 are available)
|
||||
* several UNIX tools: sed, grep, ... (dito)
|
||||
* a UNIX-like shell (ouch!)
|
||||
|
||||
I found no fully operational shell and no sources for WIN32 so far,
|
||||
Cygnus' bash e.g. cannot handle this:
|
||||
(echo a>a; echo b>>a)
|
||||
Right now I use the knts that I wrote and simplified scripts.
|
||||
Jeff eliminated many shell-lines in Makefile.*,
|
||||
the final solution could be:
|
||||
1) replace shell, awk, grep, sed, ... by Perl!
|
||||
2) use C code
|
||||
|
||||
Perl looks like a real option because it's available
|
||||
for many platforms and maybe the best idea for
|
||||
'portable scripts'.
|
||||
57
config/Makefile.Host
Normal file
57
config/Makefile.Host
Normal file
@@ -0,0 +1,57 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
TOP = ../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
CONFIGS += CONFIG
|
||||
CONFIGS += CONFIG_BASE
|
||||
CONFIGS += CONFIG_BASE_VERSION
|
||||
CONFIGS += CONFIG_COMMON
|
||||
CONFIGS += CONFIG_ENV
|
||||
|
||||
CONFIGS += CONFIG.WIN32
|
||||
CONFIGS += CONFIG.pc486
|
||||
CONFIGS += CONFIG.Linux
|
||||
CONFIGS += CONFIG.alpha
|
||||
CONFIGS += CONFIG.hp700
|
||||
CONFIGS += CONFIG.sgi
|
||||
CONFIGS += CONFIG.solaris
|
||||
CONFIGS += CONFIG.sun4
|
||||
CONFIGS += CONFIG.hkv2f
|
||||
CONFIGS += CONFIG.mv147
|
||||
CONFIGS += CONFIG.mv162
|
||||
CONFIGS += CONFIG.mv162lc
|
||||
CONFIGS += CONFIG.mv167
|
||||
CONFIGS += CONFIG.niCpu030
|
||||
|
||||
CONFIGS += CONFIG.Vx.68k
|
||||
|
||||
CONFIGS += CONFIG_SITE
|
||||
CONFIGS += CONFIG_SITE_ENV
|
||||
|
||||
CONFIGS += CONFIG_SITE.WIN32
|
||||
CONFIGS += CONFIG_SITE.pc486
|
||||
CONFIGS += CONFIG_SITE.Linux
|
||||
CONFIGS += CONFIG_SITE.alpha
|
||||
CONFIGS += CONFIG_SITE.hp700
|
||||
CONFIGS += CONFIG_SITE.sgi
|
||||
CONFIGS += CONFIG_SITE.solaris
|
||||
CONFIGS += CONFIG_SITE.sun4
|
||||
CONFIGS += CONFIG_SITE.hkv2f
|
||||
CONFIGS += CONFIG_SITE.mv147
|
||||
CONFIGS += CONFIG_SITE.mv162lc
|
||||
CONFIGS += CONFIG_SITE.mv162
|
||||
CONFIGS += CONFIG_SITE.mv167
|
||||
CONFIGS += CONFIG_SITE.niCpu030
|
||||
|
||||
CONFIGS += RULES.Host
|
||||
CONFIGS += RULES.Vx
|
||||
CONFIGS += RULES_ARCHS
|
||||
CONFIGS += RULES_DIRS
|
||||
CONFIGS += RULES_TOP
|
||||
CONFIGS += RULES.Db
|
||||
CONFIGS += RULES.ioc
|
||||
|
||||
include $(TOP)/config/RULES.Host
|
||||
59
config/RULES.Db
Normal file
59
config/RULES.Db
Normal file
@@ -0,0 +1,59 @@
|
||||
#RULES.Db
|
||||
SUBTOOL = $(EPICS_BASE_BIN)/subtool
|
||||
PREFIX=$(shell echo $* | sed -e 's-[0-9]--g' | sed -e 's-\.db--g')
|
||||
ARCHS += $(BUILD_ARCHS) host cross
|
||||
ACTIONS += clean inc depends buildInstall build
|
||||
actionArchTargets = $(foreach action, $(ACTIONS) install,\
|
||||
$(foreach arch, $(ARCHS), \
|
||||
$(action)$(DIVIDER)$(arch)))
|
||||
|
||||
all install :: inc buildInstall
|
||||
|
||||
buildInstall: .DEPENDS dbd $(DBFROMTEMPLATE) $(INDDBFROMTEMPLATE) $(PROD)
|
||||
|
||||
inc build depends:
|
||||
|
||||
$(TOP)/dbd:
|
||||
$(MKDIR) $(TOP)/dbd
|
||||
|
||||
dbd: $(TOP)/dbd
|
||||
ifndef WIN32
|
||||
ln -s $(TOP)/dbd dbd
|
||||
endif
|
||||
|
||||
|
||||
$(DBFROMTEMPLATE):%.db: %.template %.substitutions
|
||||
$(RM) $@
|
||||
$(SUBTOOL) $*.template $*.substitutions > $@
|
||||
|
||||
|
||||
$(INDDBFROMTEMPLATE):%.db: %.substitutions
|
||||
$(RM) $@
|
||||
ifndef WIN32
|
||||
$(SUBTOOL) $(PREFIX).template $*.substitutions > $@
|
||||
endif
|
||||
|
||||
.DEPENDS: Makefile
|
||||
@$(RM) $@
|
||||
ifndef WIN32
|
||||
@for NAME in $(INDDBFROMTEMPLATE) garbage_marty ; do \
|
||||
if [ $$NAME != garbage_marty ] ; then \
|
||||
PREFIX="`echo $$NAME | sed -e 's-[0-9]--g' | sed -e 's-\.db--g'`";\
|
||||
echo "$$NAME: $$PREFIX.template" >> $@;\
|
||||
fi ; \
|
||||
done
|
||||
endif
|
||||
|
||||
clean::
|
||||
@$(RM) dbd $(DBFROMTEMPLATE) $(INDDBFROMTEMPLATE) .DEPENDS $(PROD)
|
||||
|
||||
$(actionArchTargets) :%:
|
||||
$(MAKE) $(word 1, $(subst $(DIVIDER), ,$@))
|
||||
|
||||
$(ARCHS):%: install
|
||||
|
||||
.PHONY :: $(ARCHS) $(ACTIONS)
|
||||
.PHONY :: $(actionArchTargets)
|
||||
|
||||
-include .DEPENDS
|
||||
|
||||
601
config/RULES.Host
Normal file
601
config/RULES.Host
Normal file
@@ -0,0 +1,601 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# Rules for making things specified in Makefile.Host
|
||||
#
|
||||
# Some rules for filename-massage are system specific
|
||||
# and have "ifdefs" here instead of using definitions
|
||||
# from CONFIG.Host.$(ARCH_CLASS) - sorry about this,
|
||||
# but so far the rules are quite similar on all systems
|
||||
# except WIN32 has some specials.
|
||||
#
|
||||
# Maybe there is a way to use indentation to make it
|
||||
# easier to read this file?
|
||||
#
|
||||
# Most things may also work if you say e.g.
|
||||
# VAR+=ADD
|
||||
# even if ADD is not there, but this way "VAR" would
|
||||
# be defined in any case, that's why I try to use
|
||||
# ifdef ADD
|
||||
# VAR+=ADD
|
||||
# endif
|
||||
#
|
||||
# -kuk-
|
||||
|
||||
# we are in O.$(ARCH_CLASS), but most sources are one dir above:
|
||||
#
|
||||
# The use of VPATH (no suffix specification) caused everything
|
||||
# to break several times.
|
||||
# vpath, of course, has the disadvantage that we need explicit rules
|
||||
# for scripts or similar os-specific filed which have _no_ suffix...
|
||||
vpath %.c $(USER_VPATH) ../os/$(ARCH_CLASS) ../os/generic ..
|
||||
vpath %.cc $(USER_VPATH) ../os/$(ARCH_CLASS) ../os/generic ..
|
||||
# This prevents base/src/include/*.h from being installed. Why??
|
||||
#vpath %.h ../os/$(ARCH_CLASS) ../os/generic ..
|
||||
vpath %.h $(USER_VPATH)
|
||||
|
||||
# check for add-on CFLAGS and CXXFLAGS
|
||||
#
|
||||
# Rules:
|
||||
# 1) USR_CFLAGS is used
|
||||
# 2) if there is a special USR_CFLAGS_$(ARCH_CLASS), it's
|
||||
# appended to 1)
|
||||
# 3) if there is no special defined, but a generic USR_CFLAGS_DEFAULT,
|
||||
# this one is appended
|
||||
# 4) if you have the special case that your USR_CFLAGS_$(ARCH_CLASS) is
|
||||
# empty but you don't want 3), you have to define it as '-nil-', e.g.:
|
||||
# USR_CFLAGS := <defines for all systems>
|
||||
# USR_CFLAGS_sun4 := -nil-
|
||||
# USR_CFLAGS_DEFAULT := <defines for most systems, not sun4>
|
||||
#
|
||||
# These rules apply to these Makefile-variables:
|
||||
# USR_CFLAGS C flags
|
||||
# USR_CXXFLAGS C++ flags
|
||||
# INC include-files to install
|
||||
# LIBSRCS source files for building library
|
||||
# PROD_LIBS EPICS libs needed by PROD and TESTPROD
|
||||
# SYS_PROD_LIBS system libs needed by PROD and TESTPROD
|
||||
# PROD products to build and install
|
||||
# SCRIPTS scripts to install
|
||||
#
|
||||
# Remark:
|
||||
# If you define a special INC, e.g. INC_WIN32 := getopt.h,
|
||||
# the source (getopt.h) has to be in os/WIN32 (or os/<your ARCH_CLASS>)
|
||||
#
|
||||
# This makes INC_$(ARCH_CLASS) slightly different from OSINC:
|
||||
# OSINC := a_file.h
|
||||
# means that you have a special os/$(ARCH_CLASS)/a_file.h
|
||||
# for _every_ ARCH_CLASS.
|
||||
# If you use INC_$(ARCH_CLASS), you need the special include
|
||||
# only for the specified ARCH_CLASS!
|
||||
#
|
||||
ifneq (x$(USR_CFLAGS_$(ARCH_CLASS)),x)
|
||||
USR_CFLAGS+=$(subst -nil-,,$(USR_CFLAGS_$(ARCH_CLASS)))
|
||||
else
|
||||
ifdef USR_CFLAGS_DEFAULT
|
||||
USR_CFLAGS+=$(USR_CFLAGS_DEFAULT)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq (x$(USR_CXXFLAGS_$(ARCH_CLASS)),x)
|
||||
USR_CXXFLAGS+=$(subst -nil-,,$(USR_CXXFLAGS_$(ARCH_CLASS)))
|
||||
else
|
||||
ifdef USR_CXXFLAGS_DEFAULT
|
||||
USR_CXXFLAGS+=$(USR_CXXFLAGS_DEFAULT)
|
||||
endif
|
||||
endif
|
||||
|
||||
# check for special includes:
|
||||
#
|
||||
ifneq (x$(INC_$(ARCH_CLASS)),x)
|
||||
# os-specific includes go to the include/os-directory:
|
||||
OSINC += $(subst -nil-,,$(INC_$(ARCH_CLASS)))
|
||||
else
|
||||
ifdef INC_DEFAULT
|
||||
INC += $(INC_DEFAULT)
|
||||
endif
|
||||
endif
|
||||
|
||||
# concat specific library contents (if defined) to LIBCONTENS
|
||||
#
|
||||
ifneq (x$(LIBSRCS_$(ARCH_CLASS)),x)
|
||||
LIBSRCS += $(subst -nil-,,$(LIBSRCS_$(ARCH_CLASS)))
|
||||
else
|
||||
|
||||
ifdef LIBSRCS_DEFAULT
|
||||
LIBSRCS+=$(LIBSRCS_DEFAULT)
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
# adjust object names for library contents
|
||||
#
|
||||
ifdef LIBSRCS
|
||||
LIBOBJS=$(addsuffix $(OBJ), $(basename $(LIBSRCS)))
|
||||
endif
|
||||
|
||||
#
|
||||
# concat specific library contents (if defined) to PROD_LIBS
|
||||
#
|
||||
ifneq (x$(PROD_LIBS_$(ARCH_CLASS)),x)
|
||||
PROD_LIBS += $(subst -nil-,,$(PROD_LIBS_$(ARCH_CLASS)))
|
||||
|
||||
else
|
||||
|
||||
ifdef PROD_LIBS_DEFAULT
|
||||
PROD_LIBS += $(PROD_LIBS_DEFAULT)
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
#
|
||||
# concat specific library contents (if defined) to SYS_PROD_LIBS
|
||||
#
|
||||
ifneq (x$(SYS_PROD_LIBS_$(ARCH_CLASS)),x)
|
||||
SYS_PROD_LIBS += $(subst -nil-,,$(SYS_PROD_LIBS_$(ARCH_CLASS)))
|
||||
|
||||
else
|
||||
|
||||
ifdef SYS_PROD_LIBS_DEFAULT
|
||||
SYS_PROD_LIBS += $(SYS_PROD_LIBS_DEFAULT)
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
#
|
||||
# concat specific products
|
||||
#
|
||||
ifneq (x$(PROD_$(ARCH_CLASS)),x)
|
||||
PROD += $(subst -nil-,,$(PROD_$(ARCH_CLASS)))
|
||||
|
||||
else
|
||||
|
||||
ifdef PROD_DEFAULT
|
||||
PROD += $(PROD_DEFAULT)
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
#
|
||||
# concat specific scripts
|
||||
#
|
||||
ifneq (x$(SCRIPTS_$(ARCH_CLASS)),x)
|
||||
SCRIPTS += $(subst -nil-,,$(SCRIPTS_$(ARCH_CLASS)))
|
||||
|
||||
else
|
||||
|
||||
ifdef SCRIPTS_DEFAULT
|
||||
SCRIPTS += $(SCRIPTS_DEFAULT)
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
# -------------------------------------------------------------------
|
||||
# adjust names to platform specific pre-/postfixes,
|
||||
# this is ugly (ifdef XXX...) but hopefully get's you there...
|
||||
# -------------------------------------------------------------------
|
||||
|
||||
# adjust names of libraries to build
|
||||
#
|
||||
# But: if there are no objects LIBOBJS to include
|
||||
# in this library (may be for e.g. base/src/libCompat
|
||||
# on some archs), don't define (and build) any library!
|
||||
ifdef LIBRARY
|
||||
ifdef LIBOBJS
|
||||
|
||||
ifndef WIN32
|
||||
# handle plain Unix first because it's easy: <lib> -> lib<lib>.a
|
||||
LIBNAME:=$(LIBRARY:%=lib%.a)
|
||||
|
||||
else
|
||||
# WIN32 library name:
|
||||
LIBNAME:=$(LIBRARY).lib
|
||||
# check if DLL or plain lib requested:
|
||||
ifeq ($(LIBTYPE),SHARED)
|
||||
# create name for dll, import file
|
||||
DLLNAME:=$(LIBRARY).dll
|
||||
# libs defined that we need to link the DLL with?
|
||||
DLL_DEP_LIBS:=$(DLL_LIBS:%=%.lib)
|
||||
endif # LIBTYPE=SHARED
|
||||
endif # WIN32
|
||||
|
||||
endif
|
||||
endif # LIBRARY and LIBOBJS
|
||||
|
||||
# dito for libraries used by PROD
|
||||
#
|
||||
ifdef PROD_LIBS
|
||||
# add to USR_LDLIBS so that the libs are linked
|
||||
|
||||
ifdef WIN32
|
||||
PRODDEPLIBS:=$(PROD_LIBS:%=$(INSTALL_LIB)/%.lib)
|
||||
USR_LDLIBS += -libpath:$(INSTALL_LIB) $(PROD_LIBS:%=%.lib)
|
||||
else
|
||||
# On Unix: library "ca" is linked with "-lca" etc.
|
||||
PRODDEPLIBS=$(PROD_LIBS:%=$(INSTALL_LIB)/lib%.a)
|
||||
USR_LDLIBS += -L$(INSTALL_LIB) $(PROD_LIBS:%=-l%)
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
|
||||
# dito for system libraries used by PROD
|
||||
#
|
||||
ifdef SYS_PROD_LIBS
|
||||
|
||||
ifdef WIN32
|
||||
# add to USR_LDLIBS so that the libs are linked
|
||||
# we need the full path because there is no "-L" option on WIN32....
|
||||
USR_LDLIBS += $(SYSPRODDEPLIBS)
|
||||
else
|
||||
# On Unix: it is difficult to determine where the
|
||||
# system lib is (because of add on compilere).
|
||||
# Therefore no additions to PRODDEPLIBS for
|
||||
# system libraries.
|
||||
#
|
||||
USR_LDLIBS += $(SYS_PROD_LIBS:%=-l%)
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
# adjust executables
|
||||
ifdef PROD
|
||||
PROD := $(addsuffix $(EXE), $(PROD))
|
||||
endif
|
||||
|
||||
ifdef TESTPROD
|
||||
TESTPROD := $(addsuffix $(EXE), $(TESTPROD))
|
||||
endif
|
||||
|
||||
# ----------------------------------------------------
|
||||
# create names (lists) for installed things
|
||||
# ----------------------------------------------------
|
||||
|
||||
# each list starts with the destination directory name(s)
|
||||
# to make sure it's there
|
||||
|
||||
INSTALL_PROD= $(PROD:%= $(INSTALL_BIN)/%)
|
||||
|
||||
# DLLs (only defined on WIN32) are like executables:
|
||||
ifdef DLLNAME
|
||||
INSTALL_DLLS=$(DLLNAME:%=$(INSTALL_BIN)/%)
|
||||
endif
|
||||
|
||||
INSTALL_LIBS= $(LIBNAME:%=$(INSTALL_LIB)/%)
|
||||
INSTALL_INC= $(INC:%=$(INSTALL_INCLUDE)/%)
|
||||
INSTALL_OSINCLUDE=$(INSTALL_INCLUDE)/os/$(ARCH_CLASS)
|
||||
INSTALL_OSINC= $(OSINC:%= $(INSTALL_OSINCLUDE)/%)
|
||||
MANLIST = 1 2 3 4 5 6 7 8 9
|
||||
INSTALL_MANS = $(foreach n, \
|
||||
$(MANLIST),$(INSTALL_MAN)/man$(n) $(MAN$(n):%= $(INSTALL_MAN)/man$(n)/%))
|
||||
INSTALL_DOCS = $(DOCS:%= $(INSTALL_DOC)/%)
|
||||
INSTALL_SCRIPTS = $(SCRIPTS:%= $(INSTALL_BIN)/%)
|
||||
ifdef TEMPLATES_DIR
|
||||
INSTALL_TEMPLATES_SUBDIR = $(INSTALL_TEMPLATES)/$(TEMPLATES_DIR)
|
||||
else
|
||||
INSTALL_TEMPLATES_SUBDIR = $(INSTALL_TEMPLATES)
|
||||
endif
|
||||
INSTALL_TEMPLATE = $(TEMPLATES:%= $(INSTALL_TEMPLATES_SUBDIR)/%)
|
||||
INSTALL_CONFIGS = $(CONFIGS:%= $(INSTALL_CONFIG)/%)
|
||||
|
||||
MAN_DIRECTORY_TARGETS = $(foreach n, $(MANLIST),$(INSTALL_MAN)/man$(n))
|
||||
|
||||
DIRECTORY_TARGETS = $(INSTALL_INCLUDE) $(INSTALL_INCLUDE)/os \
|
||||
$(INSTALL_OSINCLUDE) $(INSTALL_DOC) \
|
||||
$(INSTALL_LOCATION_BIN) $(INSTALL_BIN) $(INSTALL_LIB) \
|
||||
$(INSTALL_LOCATION_LIB) $(INSTALL_CONFIG) \
|
||||
$(MAN_DIRECTORY_TARGETS) $(INSTALL_MAN) \
|
||||
$(INSTALL_TEMPLATES)
|
||||
|
||||
ifdef TEMPLATES_DIR
|
||||
DIRECTORY_TARGETS += $(INSTALL_TEMPLATES)/$(TEMPLATES_DIR)
|
||||
endif
|
||||
|
||||
|
||||
# Main target
|
||||
#
|
||||
all:: install
|
||||
|
||||
build:: $(LIBNAME) $(DLLNAME) \
|
||||
$(INSTALL_LOCATION_LIB) $(INSTALL_LIB)\
|
||||
$(INSTALL_LIBS) $(INSTALL_DLLS) $(PROD) $(TESTPROD)
|
||||
|
||||
|
||||
inc:: $(INSTALL_INCLUDE) $(INSTALL_INC) \
|
||||
$(INSTALL_INCLUDE)/os $(INSTALL_OSINCLUDE) $(INSTALL_OSINC)
|
||||
|
||||
rebuild:: clean install
|
||||
|
||||
install:: inc buildInstall
|
||||
|
||||
buildInstall :: build $(TARGETS) $(INSTALL_LOCATION_BIN) \
|
||||
$(INSTALL_BIN) $(INSTALL_SCRIPTS) $(INSTALL_PROD) \
|
||||
$(INSTALL_MAN) $(INSTALL_MANS) \
|
||||
$(INSTALL_DOC) $(INSTALL_DOCS) \
|
||||
$(INSTALL_TEMPLATES) $(INSTALL_TEMPLATES_SUBDIR) $(INSTALL_TEMPLATE) \
|
||||
$(INSTALL_CONFIG) $(INSTALL_CONFIGS)
|
||||
|
||||
depends:: $(LIBSRCS) $(SRCS)
|
||||
$(RM) .DEPENDS
|
||||
touch .DEPENDS
|
||||
ifdef $(SRCS.c)
|
||||
$(DEPENDS_RULE.c)
|
||||
endif
|
||||
ifdef $(SRCS.cc)
|
||||
$(DEPENDS_RULE.cc)
|
||||
endif
|
||||
|
||||
|
||||
clean::
|
||||
@echo "Cleaning"
|
||||
@$(RM) *.i *$(OBJ) *.a $(PROD) $(TESTPROD) $(LIBNAME) $(INC)
|
||||
|
||||
$(DIRECTORY_TARGETS) :
|
||||
$(MKDIR) $@
|
||||
|
||||
# The order of the following dependencies is
|
||||
# VERY IMPORTANT !!!!
|
||||
|
||||
# If you want to break this on WIN32, please forget
|
||||
# that $(COMPILE.cc) is like $(COMPILE.c) for WIN32
|
||||
# except the first one ends in -Tp to select 'C++'.
|
||||
#
|
||||
# EPICS uses .cc for C++, which is not recognized
|
||||
# by MS Visual C++, so -Tp has to be directly in front of
|
||||
# the source file.
|
||||
# -> put the source file directly after $(COMPILE.cc),
|
||||
|
||||
# explicit list of source files given for PROD ?
|
||||
# (otherwise implicit rules .c -> $(EXE), .cc -> $(EXE)
|
||||
ifdef SRCS
|
||||
|
||||
ifeq ($(findstring cc,$(suffix $(SRCS))),cc)
|
||||
PROD_LINKER = $(LINK.cc)
|
||||
else
|
||||
PROD_LINKER = $(LINK.c)
|
||||
endif
|
||||
|
||||
PROD_OBJS=$(addsuffix $(OBJ), $(basename $(SRCS)))
|
||||
|
||||
$(PROD): $(PROD_OBJS) $(PRODDEPLIBS)
|
||||
@$(RM) $@
|
||||
$(PROD_LINKER) $(PROD_OBJS) $(LDLIBS)
|
||||
endif
|
||||
|
||||
# explicit list of source files given for TESTPROD ?
|
||||
# (otherwise implicit rule .c -> $(OBJ) -> $(EXE)
|
||||
ifdef TESTPROD_SRCS
|
||||
|
||||
ifeq ($(findstring cc,$(suffix $(TESTPROD_SRCS))),cc)
|
||||
TESTPROD_LINKER = $(LINK.cc)
|
||||
else
|
||||
TESTPROD_LINKER = $(LINK.c)
|
||||
endif
|
||||
|
||||
TESTPROD_OBJS=$(addsuffix $(OBJ), $(basename $(TESTPROD_SRCS)))
|
||||
|
||||
$(TESTPROD): $(TESTPROD_OBJS) $(PRODDEPLIBS)
|
||||
@$(RM) $@
|
||||
$(TESTPROD_LINKER) $(TESTPROD_OBJS) $(LDLIBS)
|
||||
endif
|
||||
|
||||
# Generic Rules for 'simple' targets that
|
||||
# can be generated from a single source with same basename.
|
||||
#
|
||||
# The usual two rules .c* -> $(OBJ) and then $(OBJ) -> $(EXE)
|
||||
# do not work because the $(OBJ)->$(EXE) rule wouldn't
|
||||
# know if the original source was C or C++.
|
||||
#
|
||||
# Hint: The $(subst...) construct removes the .c or .cc
|
||||
# as well as the '../' from the filename and adds $(OBJ):
|
||||
# e.g. $< = '../abc.c' -> 'abc.o'
|
||||
%$(EXE): %.c $(PRODDEPLIBS)
|
||||
@$(RM) $@
|
||||
$(COMPILE.c) $<
|
||||
$(LINK.c) $(subst ../,,$(basename $<))$(OBJ) $(LDLIBS)
|
||||
|
||||
%$(EXE): %.cc $(PRODDEPLIBS)
|
||||
@$(RM) $@
|
||||
$(COMPILE.cc) $<
|
||||
$(LINK.cc) $(subst ../,,$(basename $<))$(OBJ) $(LDLIBS)
|
||||
|
||||
%$(OBJ): %.c
|
||||
@$(RM) $@
|
||||
$(COMPILE.c) $<
|
||||
|
||||
%$(OBJ): %.cc
|
||||
@$(RM) $@
|
||||
$(COMPILE.cc) $<
|
||||
|
||||
%.c %.h: ../%.y
|
||||
@$(RM) y.tab.c y.tab.h
|
||||
$(YACC) $(YACCOPT) $<
|
||||
@if [ -f y.tab.c ]; \
|
||||
then \
|
||||
echo "$(MV) y.tab.c $*.c"; \
|
||||
$(RM) $*.c; \
|
||||
$(MV) y.tab.c $*.c; \
|
||||
fi
|
||||
@if [ -f y.tab.h ]; \
|
||||
then \
|
||||
echo "$(MV) y.tab.h $*.h"; \
|
||||
$(RM) $*.h; \
|
||||
$(MV) y.tab.h $*.h; \
|
||||
fi
|
||||
|
||||
%.c: ../%.l
|
||||
@$(RM) lex.yy.c
|
||||
$(LEX) $(LEXOPT) $<
|
||||
@$(RM) $@
|
||||
$(MV) lex.yy.c $@
|
||||
|
||||
#state notation language rule
|
||||
%.c: ../%.st
|
||||
@echo "preprocessing $*.st"
|
||||
@$(RM) $*.i
|
||||
$(CPP) $(CPPFLAGS) $< $*.i
|
||||
@echo "converting $*.i"
|
||||
@$(RM) $@
|
||||
$(SNC) $(TARGET_SNCFLAGS) $(SNCFLAGS) $*.i
|
||||
|
||||
%.c: %.stt
|
||||
@echo "converting $<"
|
||||
@$(RM) $@
|
||||
$(SNC) $(TARGET_SNCFLAGS) $(SNCFLAGS) $<
|
||||
|
||||
# Capfast Rules:
|
||||
%.db: %.edf
|
||||
$(E2DB) $(E2SR_SYSFLAGS) $(E2SR_FLAGS) $<
|
||||
|
||||
%.db: ../%.edf
|
||||
$(E2DB) $(E2SR_SYSFLAGS) $(E2SR_FLAGS) $<
|
||||
|
||||
%.edf: ../%.sch $(DEPSCHS)
|
||||
@if [ ! -f cad.rc -a -r ../cad.rc ] ; then ln -s ../cad.rc ; fi
|
||||
$(SCH2EDIF) $(SCH2EDIF_SYSFLAGS) $(SCH2EDIF_FLAGS) $<
|
||||
|
||||
# Mangen Rule:
|
||||
%.1:%
|
||||
$(RM) $(<F)
|
||||
$(RM) $(<F).nr
|
||||
ln -s $<
|
||||
$(MANGEN) -s $(<F)
|
||||
$(MV) $(<F).nr $(<F).1
|
||||
|
||||
# Mangen Rule:
|
||||
%.1:../%
|
||||
$(RM) $(<F)
|
||||
$(RM) $(<F).nr
|
||||
ln -s $<
|
||||
$(MANGEN) -s $(<F)
|
||||
$(MV) $(<F).nr $(<F).1
|
||||
|
||||
# Rules for building LIBRARY with LIBSRCS
|
||||
# (which are now LIBNAME, LIBOBJS)
|
||||
#
|
||||
ifdef WIN32
|
||||
|
||||
ifeq ($(LIBTYPE),SHARED)
|
||||
# A WIN32 dll has tree parts:
|
||||
# x.dll: the real dll (DLLNAME)
|
||||
# x.lib: what you link to progs that use the dll (LIBNAME)
|
||||
# x.exp: what you need to build the dll (in no variable)
|
||||
#
|
||||
# the latter two are created automatically when building the dll:
|
||||
$(LIBNAME): $(DLLNAME)
|
||||
|
||||
# test if there is a def file for this dll:
|
||||
#
|
||||
DLL_DEF_FILE := ../$(LIBRARY).def
|
||||
|
||||
ifeq ($(DLL_DEF_FILE), $(wildcard $(DLL_DEF_FILE)))
|
||||
DLL_DEF := -def:$(DLL_DEF_FILE)
|
||||
endif
|
||||
|
||||
# HOST_OPT_FLAGS is part of CFLAGS/CXXFLAGS,
|
||||
# which in turn are used in COMPILE.c[c]
|
||||
#
|
||||
# If we compile a .c, .cc into an $(OBJ),
|
||||
# we test if this object is part of the
|
||||
# library objects LIBOBJS.
|
||||
# If so, we define _WINDLL so that
|
||||
# e.g. include/shareLib.h works correctly.
|
||||
#
|
||||
HOST_OPT_FLAGS += $(subst $@, -D_WINDLL, $(findstring $@,$(LIBOBJS)))
|
||||
|
||||
$(DLLNAME): $(LIBOBJS)
|
||||
link $(WIN32_DLLFLAGS)\
|
||||
-implib:$(LIBNAME) -out:$(DLLNAME) $(DLL_DEF)\
|
||||
$(DLL_DEP_LIBS) $(ARCH_DEP_LDLIBS) $(HOST_LDLIBS) $(LIBOBJS)
|
||||
else
|
||||
# still on WIN32, this time no DLL but plain lib requested:
|
||||
$(LIBNAME): $(LIBOBJS)
|
||||
lib -nologo -verbose -out:$(LIBNAME) $(LIBOBJS)
|
||||
lib -nologo -list $(LIBNAME)
|
||||
|
||||
endif # LIBTYPE is SHARED ?
|
||||
|
||||
else # not WIN32
|
||||
|
||||
# usual Unix rule for lib creation
|
||||
$(LIBNAME): $(LIBOBJS)
|
||||
$(RM) $@
|
||||
$(ARCMD) $@ $(LIBOBJS)
|
||||
@if [ ! -z "$(RANLIB)" ] ; then\
|
||||
echo $(RANLIB) $@; \
|
||||
$(RANLIB) $@; \
|
||||
fi
|
||||
endif # ifdef WIN32
|
||||
# end of library creation rules
|
||||
|
||||
|
||||
$(INSTALL_BIN)/%: ../os/$(ARCH_CLASS)/%
|
||||
@echo "Installing os-specific script $@"
|
||||
@$(INSTALL_PRODUCT) -m 555 $< $(INSTALL_BIN)
|
||||
|
||||
$(INSTALL_BIN)/%: %
|
||||
@echo "Installing binary $@"
|
||||
@$(INSTALL_PRODUCT) -m 555 $< $(INSTALL_BIN)
|
||||
|
||||
$(INSTALL_BIN)/%: ../%
|
||||
@echo "Installing script $@"
|
||||
@$(INSTALL_PRODUCT) -m 555 $< $(INSTALL_BIN)
|
||||
|
||||
$(INSTALL_LIB)/%.a: %.a
|
||||
@echo "Installing library $@"
|
||||
@$(INSTALL) -m 644 $< $(INSTALL_LIB)
|
||||
@if [ ! -z "$(RANLIB)" ] ; then\
|
||||
$(RANLIB) $(RANLIBFLAGS) $@; \
|
||||
fi
|
||||
|
||||
$(INSTALL_LIB)/%.lib: %.lib
|
||||
@echo "Installing library $@"
|
||||
@$(INSTALL) -m 644 $< $(INSTALL_LIB)
|
||||
|
||||
$(INSTALL_CONFIG)/%: %
|
||||
@echo "Installing config file $@"
|
||||
@$(INSTALL) -m 644 $< $(INSTALL_CONFIG)
|
||||
|
||||
$(INSTALL_CONFIG)/%: ../%
|
||||
@echo "Installing config file $@"
|
||||
@$(INSTALL) -m 644 $< $(INSTALL_CONFIG)
|
||||
|
||||
$(addsuffix /%,$(MAN_DIRECTORY_TARGETS)) : %
|
||||
@echo "Installing man file $@"
|
||||
@$(INSTALL) -m 644 $< $(@D)
|
||||
|
||||
$(addsuffix /%,$(MAN_DIRECTORY_TARGETS)) : ../%
|
||||
@echo "Installing man file $@"
|
||||
@$(INSTALL) -m 644 $< $(@D)
|
||||
|
||||
$(INSTALL_INCLUDE)/%: %
|
||||
@echo "Installing include file $@"
|
||||
@$(INSTALL) -m 644 $< $(@D)
|
||||
|
||||
$(INSTALL_INCLUDE)/%: ../%
|
||||
@echo "Installing include file $@"
|
||||
@$(INSTALL) -m 644 $< $(@D)
|
||||
|
||||
$(INSTALL_DOC)/%: %
|
||||
@echo "Installing doc $@"
|
||||
@$(INSTALL) -m 644 $< $(INSTALL_DOC)
|
||||
|
||||
$(INSTALL_DOC)/%: ../%
|
||||
@echo "Installing doc $@"
|
||||
@$(INSTALL) -m 644 $< $(INSTALL_DOC)
|
||||
|
||||
$(INSTALL_TEMPLATES)/$(TEMPLATES_DIR)/%: ../%
|
||||
@echo "Installing $@"
|
||||
@$(INSTALL) -m 644 $< $(INSTALL_TEMPLATES)/$(TEMPLATES_DIR)
|
||||
|
||||
$(INSTALL_TEMPLATES)/$(TEMPLATES_DIR)/%: %
|
||||
@echo "Installing $@"
|
||||
@$(INSTALL) -m 644 $< $(INSTALL_TEMPLATES)/$(TEMPLATES_DIR)
|
||||
|
||||
.PRECIOUS: %.o %.c
|
||||
|
||||
-include .DEPENDS
|
||||
|
||||
.PHONY:: all inc depends build install clean rebuild buildInstall
|
||||
|
||||
# EOF RULES.Host
|
||||
@@ -1,37 +1,50 @@
|
||||
# $Id$
|
||||
|
||||
VPATH += .:..
|
||||
INSTALL_PROD = $(PROD:%= $(INSTALL_BIN)/%)
|
||||
INSTALL_LIBS = $(LIBNAME:%= $(INSTALL_LIB)/%)
|
||||
INSTALL_INC = $(INC:%= $(INSTALL_INCLUDE)/%)
|
||||
INSTALL_OSINCLUDE = $(INSTALL_INCLUDE)/os/$(T_A)
|
||||
INSTALL_OSINC = $(OSINC:%= $(INSTALL_OSINCLUDE)/%)
|
||||
MANLIST = 1 2 3 4 5 6 7 8 9
|
||||
INSTALL_MANS = $(foreach n, \
|
||||
$(MANLIST),$(INSTALL_MAN)/man$(n) $(MAN$(n):%= $(INSTALL_MAN)/man$(n)/%))
|
||||
INSTALL_DOCS = $(DOCS:%= $(INSTALL_DOC)/%)
|
||||
INSTALL_SCRIPTS = $(SCRIPTS:%= $(INSTALL_BIN)/%)
|
||||
INSTALL_TEMPLATES_SUBDIR = $(INSTALL_TEMPLATES)/$(TEMPLATES_DIR)
|
||||
INSTALL_TEMPLATE = $(TEMPLATES:%= $(INSTALL_TEMPLATES_SUBDIR)/%)
|
||||
INSTALL_CONFIGS = $(CONFIGS:%= $(INSTALL_CONFIG)/%)
|
||||
|
||||
INSTALL_PROD=$(PROD:%=$(INSTALL_BIN)/%)
|
||||
INSTALL_LIBS=$(LIBNAME:%=$(INSTALL_LIB)/%)
|
||||
INSTALL_INC=$(INC:%=$(INSTALL_INCLUDE)/%)
|
||||
INSTALL_MANS+=$(MAN1:%=$(INSTALL_MAN)/man1/%)
|
||||
INSTALL_MANS+=$(MAN2:%=$(INSTALL_MAN)/man2/%)
|
||||
INSTALL_MANS+=$(MAN3:%=$(INSTALL_MAN)/man3/%)
|
||||
INSTALL_MANS+=$(MAN4:%=$(INSTALL_MAN)/man4/%)
|
||||
INSTALL_MANS+=$(MAN5:%=$(INSTALL_MAN)/man5/%)
|
||||
INSTALL_MANS+=$(MAN6:%=$(INSTALL_MAN)/man6/%)
|
||||
INSTALL_MANS+=$(MAN7:%=$(INSTALL_MAN)/man7/%)
|
||||
INSTALL_MANS+=$(MAN8:%=$(INSTALL_MAN)/man8/%)
|
||||
INSTALL_MANS+=$(MAN9:%=$(INSTALL_MAN)/man9/%)
|
||||
INSTALL_DOCS=$(DOCS:%=$(INSTALL_DOC)/%)
|
||||
INSTALL_SCRIPTS=$(SCRIPTS:%=$(INSTALL_BIN)/%)
|
||||
INSTALL_TEMPLATE=$(TEMPLATES:%=$(INSTALL_TEMPLATES)/$(TEMPLATES_DIR)/%)
|
||||
INSTALL_TCLLIBS=$(TCLLIBNAME:%=$(INSTALL_TCLLIB)/%)
|
||||
INSTALL_TCLINDEX=$(TCLINDEX:%=$(INSTALL_TCLLIB)/%)
|
||||
INSTALL_CONFIGS=$(CONFIGS:%=$(INSTALL_CONFIG)/%)
|
||||
MAN_DIRECTORY_TARGETS = $(foreach n, $(MANLIST),$(INSTALL_MAN)/man$(n))
|
||||
|
||||
DIRECTORY_TARGETS = $(INSTALL_INCLUDE) $(INSTALL_INCLUDE)/os \
|
||||
$(INSTALL_OSINCLUDE) $(INSTALL_DOC) \
|
||||
$(INSTALL_TEMPLATES)/$(TEMPLATES_DIR) $(INSTALL_TEMPLATES) \
|
||||
$(INSTALL_LOCATION_BIN) $(INSTALL_BIN) $(INSTALL_LIB) \
|
||||
$(INSTALL_LOCATION_LIB) $(INSTALL_CONFIG) \
|
||||
$(MAN_DIRECTORY_TARGETS) $(INSTALL_MAN)
|
||||
|
||||
all:: install
|
||||
|
||||
pre_build::
|
||||
|
||||
rebuild:: clean install
|
||||
|
||||
build:: pre_build $(LIBNAME) $(TARGETS) $(PROD)
|
||||
|
||||
inc:: $(INSTALL_INC)
|
||||
inc:: $(INSTALL_INCLUDE) $(INSTALL_INC) $(INSTALL_INCLUDE)/os \
|
||||
$(INSTALL_OSINCLUDE) $(INSTALL_OSINC)
|
||||
|
||||
install:: inc build $(INSTALL_LIBS) $(TARGETS) $(INSTALL_SCRIPTS) $(INSTALL_PROD) \
|
||||
$(INSTALL_MANS) $(INSTALL_DOCS) $(INSTALL_TEMPLATE) \
|
||||
$(INSTALL_TCLLIBS) $(INSTALL_TCLINDEX) $(INSTALL_CONFIGS)
|
||||
install:: inc buildInstall
|
||||
|
||||
buildInstall :: build \
|
||||
$(INSTALL_LOCATION_LIB) $(INSTALL_LIB) $(INSTALL_LIBS) \
|
||||
$(TARGETS) \
|
||||
$(INSTALL_LOCATION_BIN) $(INSTALL_BIN) \
|
||||
$(INSTALL_SCRIPTS) $(INSTALL_PROD) \
|
||||
$(INSTALL_MAN) $(INSTALL_MANS) \
|
||||
$(INSTALL_DOC) $(INSTALL_DOCS) $(INSTALL_TEMPLATES) \
|
||||
$(INSTALL_TEMPLATES)/$(TEMPLATES_DIR) $(INSTALL_TEMPLATE) \
|
||||
$(INSTALL_CONFIG) $(INSTALL_CONFIGS)
|
||||
|
||||
depends:: $(SRCS.c) $(SRCS.cc)
|
||||
ifdef SRCS
|
||||
@@ -49,6 +62,8 @@ clean::
|
||||
@echo "Cleaning"
|
||||
@$(RM) *.i *.o *.a $(TARGETS) $(PROD) $(LIBNAME) $(INC)
|
||||
|
||||
$(DIRECTORY_TARGETS) :
|
||||
@$(MKDIR) $@
|
||||
|
||||
$(TARGETS) $(PROD): $(DEPLIBS)
|
||||
|
||||
@@ -59,7 +74,7 @@ $(TARGETS) $(PROD): $(DEPLIBS)
|
||||
$(RM) $@
|
||||
$(LINK.c) -o $@ $< $(LDLIBS)
|
||||
|
||||
#$(PROD): $(OBJS) $(DEPLIBS)
|
||||
#$(PROD): $(OBJS)
|
||||
# $(RM) $@
|
||||
# $(LINK.c) -o $@ ${OBJS} $(LDLIBS)
|
||||
|
||||
@@ -67,32 +82,40 @@ $(TARGETS) $(PROD): $(DEPLIBS)
|
||||
$(RM) $@
|
||||
$(COMPILE.c) $<
|
||||
|
||||
%.o: ../%.c
|
||||
$(RM) $@
|
||||
$(COMPILE.c) $<
|
||||
|
||||
%.o: %.cc
|
||||
$(RM) $@
|
||||
$(COMPILE.cc) $<
|
||||
|
||||
%.c: %.y
|
||||
%.o: ../%.cc
|
||||
$(RM) $@
|
||||
$(COMPILE.cc) $<
|
||||
|
||||
%.c: ../%.y
|
||||
$(RM) y.tab.c y.tab.h
|
||||
$(YACC) $(YACCOPT) $<
|
||||
@if [ -f y.tab.c ]; \
|
||||
then \
|
||||
echo "/bin/mv y.tab.c $*.c"; \
|
||||
/bin/mv y.tab.c $*.c; \
|
||||
echo "$(MV) y.tab.c $*.c"; \
|
||||
$(MV) y.tab.c $*.c; \
|
||||
fi
|
||||
@if [ -f y.tab.h ]; \
|
||||
then \
|
||||
echo "/bin/mv y.tab.h $*.h"; \
|
||||
/bin/mv y.tab.h $*.h; \
|
||||
echo "$(MV) y.tab.h $*.h"; \
|
||||
$(MV) y.tab.h $*.h; \
|
||||
fi
|
||||
|
||||
%.c: %.l
|
||||
%.c: ../%.l
|
||||
$(RM) lex.yy.c
|
||||
$(LEX) $(LEXOPT) $<
|
||||
$(RM) $@
|
||||
/bin/mv lex.yy.c $@
|
||||
$(MV) lex.yy.c $@
|
||||
|
||||
#state notation language rules
|
||||
%.c: %.st
|
||||
#state notation language rule
|
||||
%.c: ../%.st
|
||||
@echo "preprocessing $*.st"
|
||||
@$(RM) $*.i
|
||||
$(CPP) $(CPPFLAGS) $< $*.i
|
||||
@@ -109,6 +132,9 @@ $(TARGETS) $(PROD): $(DEPLIBS)
|
||||
%.db: %.edf
|
||||
$(E2DB) $(E2SR_SYSFLAGS) $(E2SR_FLAGS) $<
|
||||
|
||||
%.db: ../%.edf
|
||||
$(E2DB) $(E2SR_SYSFLAGS) $(E2SR_FLAGS) $<
|
||||
|
||||
%.edf: ../%.sch $(DEPSCHS)
|
||||
@if [ ! -f cad.rc -a -r ../cad.rc ] ; then ln -s ../cad.rc ; fi
|
||||
$(SCH2EDIF) $(SCH2EDIF_SYSFLAGS) $(SCH2EDIF_FLAGS) $<
|
||||
@@ -119,79 +145,83 @@ $(TARGETS) $(PROD): $(DEPLIBS)
|
||||
$(RM) $(<F).nr
|
||||
ln -s $<
|
||||
$(MANGEN) -s $(<F)
|
||||
mv $(<F).nr $(<F).1
|
||||
$(MV) $(<F).nr $(<F).1
|
||||
|
||||
# Mangen Rule:
|
||||
%.1:../%
|
||||
$(RM) $(<F)
|
||||
$(RM) $(<F).nr
|
||||
ln -s $<
|
||||
$(MANGEN) -s $(<F)
|
||||
$(MV) $(<F).nr $(<F).1
|
||||
|
||||
$(LIBNAME): $(LIBOBJS)
|
||||
@echo Building library $@
|
||||
$(RM) $@
|
||||
$(AR) $(ARFLAGS) $@ $(LIBOBJS)
|
||||
$(ARCMD) $@ $(LIBOBJS)
|
||||
@if [ ! -z "$(RANLIB)" ] ; then\
|
||||
echo $(RANLIB) $@; \
|
||||
$(RANLIB) $@; \
|
||||
fi
|
||||
|
||||
$(INSTALL_BIN)/%: %
|
||||
@echo "Installing $@"
|
||||
@test -d $(INSTALL_LOCATION_BIN) || mkdir $(INSTALL_LOCATION_BIN)
|
||||
@test -d $(INSTALL_BIN) || mkdir $(INSTALL_BIN)
|
||||
$(INSTALL_BIN)/%: %
|
||||
@echo "Installing Binary $@"
|
||||
@$(INSTALL_PRODUCT) -m 555 $< $(INSTALL_BIN)
|
||||
|
||||
$(INSTALL_LIB)/%.a: %.a
|
||||
$(INSTALL_BIN)/%: ../%
|
||||
@echo "Installing Binary $@"
|
||||
@$(INSTALL_PRODUCT) -m 555 $< $(INSTALL_BIN)
|
||||
|
||||
$(INSTALL_LIB)/%.a: %.a
|
||||
@echo "Installing library $@"
|
||||
@test -d $(INSTALL_LOCATION_LIB) || mkdir $(INSTALL_LOCATION_LIB)
|
||||
@test -d $(INSTALL_LIB) || mkdir $(INSTALL_LIB)
|
||||
@$(INSTALL) -m 644 $< $(INSTALL_LIB)
|
||||
@if [ ! -z "$(RANLIB)" ] ; then\
|
||||
$(RANLIB) $(RANLIBFLAGS) $@; \
|
||||
fi
|
||||
|
||||
$(INSTALL_CONFIG)/%: %
|
||||
@echo "Installing $@"
|
||||
@test -d $(INSTALL_CONFIG) || mkdir $(INSTALL_CONFIG)
|
||||
$(INSTALL_CONFIG)/%: %
|
||||
@echo "Installing Config File $@"
|
||||
@$(INSTALL) -m 644 $< $(INSTALL_CONFIG)
|
||||
|
||||
$(INSTALL_TCLLIB)/%: %
|
||||
@echo "Installing Tcl library $@"
|
||||
@test -d $(INSTALL_LOCATION_LIB) || mkdir $(INSTALL_LOCATION_LIB)
|
||||
@test -d $(INSTALL_LIB) || mkdir $(INSTALL_LIB)
|
||||
@$(INSTALL) -m 644 $< $(INSTALL_LIB)
|
||||
$(INSTALL_CONFIG)/%: ../%
|
||||
@echo "Installing Config File $@"
|
||||
@$(INSTALL) -m 644 $< $(INSTALL_CONFIG)
|
||||
|
||||
$(INSTALL_TCLLIB)/$(TCLINDEX): $(INSTALL_TCLLIBS)
|
||||
@echo "Updating $@"
|
||||
@echo eval auto_mkindex $(INSTALL_LIB) "$(TCLLIBNAME)" | tclsh
|
||||
|
||||
$(INSTALL_MAN)/man9/% \
|
||||
$(INSTALL_MAN)/man8/% \
|
||||
$(INSTALL_MAN)/man7/% \
|
||||
$(INSTALL_MAN)/man6/% \
|
||||
$(INSTALL_MAN)/man5/% \
|
||||
$(INSTALL_MAN)/man4/% \
|
||||
$(INSTALL_MAN)/man3/% \
|
||||
$(INSTALL_MAN)/man2/% \
|
||||
$(INSTALL_MAN)/man1/%: %
|
||||
@echo "Installing $@"
|
||||
@test -d $(INSTALL_MAN) || mkdir $(INSTALL_MAN)
|
||||
@test -d $(@D) || mkdir $(@D)
|
||||
$(addsuffix /%,$(MAN_DIRECTORY_TARGETS)) : %
|
||||
@echo "Installing man file $@"
|
||||
@$(INSTALL) -m 644 $< $(@D)
|
||||
|
||||
$(INSTALL_INCLUDE)/%: %
|
||||
@echo "Installing $@"
|
||||
@test -d $(INSTALL_INCLUDE) || mkdir $(INSTALL_INCLUDE)
|
||||
@$(INSTALL) -m 644 $< $(INSTALL_INCLUDE)
|
||||
$(addsuffix /%,$(MAN_DIRECTORY_TARGETS)) : ../%
|
||||
@echo "Installing man file $@"
|
||||
@$(INSTALL) -m 644 $< $(@D)
|
||||
|
||||
$(INSTALL_DOC)/%: %
|
||||
@echo "Installing $@"
|
||||
@test -d $(INSTALL_DOC) || mkdir $(INSTALL_DOC)
|
||||
$(INSTALL_INCLUDE)/%: %
|
||||
@echo "Installing Include File $@"
|
||||
@$(INSTALL) -m 644 $< $(@D)
|
||||
|
||||
$(INSTALL_INCLUDE)/%: ../%
|
||||
@echo "Installing Include File $@"
|
||||
@$(INSTALL) -m 644 $< $(@D)
|
||||
|
||||
$(INSTALL_DOC)/%: %
|
||||
@echo "Installing doc $@"
|
||||
@$(INSTALL) -m 644 $< $(INSTALL_DOC)
|
||||
|
||||
$(INSTALL_TEMPLATES)/$(TEMPLATES_DIR)/%: %
|
||||
@echo "Installing $@"
|
||||
$(INSTALL_DOC)/%: ../%
|
||||
@echo "Installing doc $@"
|
||||
@$(INSTALL) -m 644 $< $(INSTALL_DOC)
|
||||
|
||||
$(INSTALL_TEMPLATES)/$(TEMPLATES_DIR)/%: ../%
|
||||
@echo "Installing template $@"
|
||||
@$(INSTALL) -d -m 644 $< $(INSTALL_TEMPLATES)/$(TEMPLATES_DIR)
|
||||
|
||||
$(INSTALL_TEMPLATES)/$(TEMPLATES_DIR)/%: %
|
||||
@echo "Installing template $@"
|
||||
@$(INSTALL) -d -m 644 $< $(INSTALL_TEMPLATES)/$(TEMPLATES_DIR)
|
||||
|
||||
.PRECIOUS: %.o %.c
|
||||
|
||||
.PHONY: all inc depends build install pre-build clean
|
||||
.PHONY:: all inc depends build install pre-build clean rebuild
|
||||
|
||||
-include .DEPENDS
|
||||
|
||||
|
||||
208
config/RULES.Vx
208
config/RULES.Vx
@@ -1,46 +1,61 @@
|
||||
# $Id$
|
||||
|
||||
VPATH += .:..
|
||||
|
||||
INCREC +=$(RECTYPES) $(MENUS)
|
||||
INSTALL_PROD=$(PROD:%=$(INSTALL_BIN)/%)
|
||||
INSTALL_LIBS=$(LIBNAME:%=$(INSTALL_BIN)/%)
|
||||
INSTALL_INC=$(INC:%=$(INSTALL_INCLUDE)/%)
|
||||
INSTALL_INCREC=$(INCREC:%=$(INSTALL_INCLUDE)/%)
|
||||
INSTALL_MANS+=$(MAN1:%=$(INSTALL_MAN)/man1/%)
|
||||
INSTALL_MANS+=$(MAN2:%=$(INSTALL_MAN)/man2/%)
|
||||
INSTALL_MANS+=$(MAN3:%=$(INSTALL_MAN)/man3/%)
|
||||
INSTALL_MANS+=$(MAN4:%=$(INSTALL_MAN)/man4/%)
|
||||
INSTALL_MANS+=$(MAN5:%=$(INSTALL_MAN)/man5/%)
|
||||
INSTALL_MANS+=$(MAN6:%=$(INSTALL_MAN)/man6/%)
|
||||
INSTALL_MANS+=$(MAN7:%=$(INSTALL_MAN)/man7/%)
|
||||
INSTALL_MANS+=$(MAN8:%=$(INSTALL_MAN)/man8/%)
|
||||
INSTALL_MANS+=$(MAN9:%=$(INSTALL_MAN)/man9/%)
|
||||
INSTALL_DOCS=$(DOCS:%=$(INSTALL_DOC)/%)
|
||||
INSTALL_SCRIPTS=$(SCRIPTS:%=$(INSTALL_BIN)/%)
|
||||
INSTALL_INSTALLS=$(INSTALLS:%=$(INSTALL_BIN)/%)
|
||||
INSTALL_PROD = $(PROD:%= $(INSTALL_BIN)/%)
|
||||
INSTALL_LIBS = $(LIBNAME:%= $(INSTALL_BIN)/%)
|
||||
INSTALL_LIBS_CXX = $(LIBNAME_CXX:%= $(INSTALL_BIN)/%)
|
||||
INSTALL_INC = $(INC:%= $(INSTALL_INCLUDE)/%)
|
||||
INSTALL_OSINCLUDE = $(INSTALL_INCLUDE)/os/vxWorks
|
||||
INSTALL_OSINC = $(OSINC:%= $(INSTALL_OSINCLUDE)/%)
|
||||
INSTALL_INCREC = $(INCREC:%= $(INSTALL_INCLUDE)/%)
|
||||
MANLIST = 1 2 3 4 5 6 7 8 9
|
||||
INSTALL_MANS = $(foreach n, \
|
||||
$(MANLIST),$(INSTALL_MAN)/man$(n) $(MAN$(n):%= $(INSTALL_MAN)/man$(n)/%))
|
||||
INSTALL_DOCS = $(DOCS:%= $(INSTALL_DOC)/%)
|
||||
INSTALL_SCRIPTS = $(SCRIPTS:%= $(INSTALL_BIN)/%)
|
||||
INSTALL_INSTALLS = $(INSTALLS:%= $(INSTALL_BIN)/%)
|
||||
|
||||
INSTALL_BPTS=$(BPTS:%=$(INSTALL_DBD)/%)
|
||||
INSTALL_DBS=$(DBDINSTALL:%=$(INSTALL_DBD)/%)\
|
||||
$(RECTYPES:%.h=$(INSTALL_DBD)/%.dbd)\
|
||||
$(MENUS:%.h=$(INSTALL_DBD)/%.dbd)
|
||||
INSTALL_BPTS = $(BPTS:%= $(INSTALL_DBD)/%)
|
||||
INSTALL_DBS = $(DBDINSTALL:%= $(INSTALL_DBD)/%)\
|
||||
$(RECTYPES:%.h= $(INSTALL_DBD)/%.dbd)\
|
||||
$(MENUS:%.h= $(INSTALL_DBD)/%.dbd)
|
||||
|
||||
INSTALL_DBDNAME=$(DBDNAME:%=$(INSTALL_DBD)/%)
|
||||
INSTALL_DBDNAME = $(DBDNAME:%= $(INSTALL_DBD)/%)
|
||||
|
||||
all:: install
|
||||
MAN_DIRECTORY_TARGETS = $(foreach n, $(MANLIST),$(INSTALL_MAN)/man$(n))
|
||||
|
||||
DIRECTORY_TARGETS = $(INSTALL_INCLUDE) $(INSTALL_DOC) $(INSTALL_DBD) \
|
||||
$(INSTALL_OSINCLUDE) $(INSTALL_INCLUDE)/os \
|
||||
$(INSTALL_LOCATION_BIN) $(INSTALL_BIN) \
|
||||
$(MAN_DIRECTORY_TARGETS) $(INSTALL_MAN)
|
||||
|
||||
all:: install
|
||||
|
||||
rebuild:: clean install
|
||||
|
||||
pre_build::
|
||||
|
||||
build:: pre_build $(MENUS) $(RECTYPES) $(BPTS)\
|
||||
$(LIBNAME) $(TARGETS) $(PROD) $(DBDEXPAND)
|
||||
$(LIBNAME) $(LIBNAME_CXX) $(TARGETS) $(PROD) $(DBDNAME)
|
||||
|
||||
inc:: $(INSTALL_INC)
|
||||
inc:: $(INSTALL_INCLUDE) $(INSTALL_INC) $(INSTALL_INCLUDE)/os \
|
||||
$(INSTALL_OSINCLUDE) $(INSTALL_OSINC)
|
||||
|
||||
install:: inc build $(INSTALL_INCREC)\
|
||||
$(INSTALL_LIBS) $(TARGETS) $(INSTALL_PROD) $(INSTALL_MANS)\
|
||||
$(INSTALL_DOCS) $(INSTALL_SCRIPTS)\
|
||||
$(INSTALL_INSTALLS) $(INSTALL_DBS) $(INSTALL_BPTS)\
|
||||
$(INSTALL_DBDNAME)
|
||||
install:: inc buildInstall
|
||||
|
||||
buildInstall :: build $(INSTALL_INCREC)\
|
||||
$(INSTALL_LOCATION_BIN) \
|
||||
$(INSTALL_BIN) $(INSTALL_LIBS) $(INSTALL_LIBS_CXX) \
|
||||
$(TARGETS) $(INSTALL_PROD) \
|
||||
$(INSTALL_MAN) $(INSTALL_MANS)\
|
||||
$(INSTALL_DOC) $(INSTALL_DOCS) \
|
||||
$(INSTALL_SCRIPTS) $(INSTALL_INSTALLS)\
|
||||
$(INSTALL_DBD) $(INSTALL_DBS) $(INSTALL_BPTS) \
|
||||
$(INSTALL_DBDNAME)
|
||||
|
||||
ifdef BIN_INSTALLS
|
||||
buildInstall :: binInstalls
|
||||
endif
|
||||
|
||||
depends:: $(SRCS.c) $(SRCS.cc)
|
||||
ifdef SRCS
|
||||
@@ -57,15 +72,17 @@ endif
|
||||
clean::
|
||||
@echo "Cleaning"
|
||||
@$(RM) *.i *.o *.a $(TARGETS) $(PROD) $(LIBNAME) $(INC) \
|
||||
$(DBDINSTALL) $(MENUS) $(RECTYPES) $(BPTS) $(DBDEXPAND)
|
||||
$(DBDINSTALL) $(MENUS) $(RECTYPES) $(BPTS) $(DBDNAME)
|
||||
|
||||
$(DIRECTORY_TARGETS) :
|
||||
@$(MKDIR) $@
|
||||
|
||||
# The order of the following dependencies is
|
||||
# VERY IMPORTANT !!!!
|
||||
|
||||
%: %.o
|
||||
$(RM) $@
|
||||
$(LINK.c) $@ $<
|
||||
$(LINK.c) $@ $< $(LDLIBS)
|
||||
|
||||
#$(PROD): $(OBJS)
|
||||
# $(RM) $@
|
||||
@@ -75,32 +92,40 @@ clean::
|
||||
$(RM) $@
|
||||
$(COMPILE.c) $<
|
||||
|
||||
%.o: ../%.c
|
||||
$(RM) $@
|
||||
$(COMPILE.c) $<
|
||||
|
||||
%.o: %.cc
|
||||
$(RM) $@
|
||||
$(COMPILE.cc) $<
|
||||
|
||||
%.c: %.y
|
||||
%.o: ../%.cc
|
||||
$(RM) $@
|
||||
$(COMPILE.cc) $<
|
||||
|
||||
%.c: ../%.y
|
||||
$(RM) y.tab.c y.tab.h
|
||||
$(YACC) $(YACCOPT) $<
|
||||
@if [ -f y.tab.c ]; \
|
||||
then \
|
||||
echo "/bin/mv y.tab.c $*.c"; \
|
||||
/bin/mv y.tab.c $*.c; \
|
||||
echo "$(MV) y.tab.c $*.c"; \
|
||||
$(MV) y.tab.c $*.c; \
|
||||
fi
|
||||
@if [ -f y.tab.h ]; \
|
||||
then \
|
||||
echo "/bin/mv y.tab.h $*.h"; \
|
||||
/bin/mv y.tab.h $*.h; \
|
||||
echo "$(MV) y.tab.h $*.h"; \
|
||||
$(MV) y.tab.h $*.h; \
|
||||
fi
|
||||
|
||||
%.c: %.l
|
||||
%.c: ../%.l
|
||||
$(RM) lex.yy.c
|
||||
$(LEX) $(LEXOPT) $<
|
||||
$(RM) $@
|
||||
/bin/mv lex.yy.c $@
|
||||
$(MV) lex.yy.c $@
|
||||
|
||||
#state notation language rules
|
||||
%.c: %.st
|
||||
%.c: ../%.st
|
||||
@echo "preprocessing $*.st"
|
||||
@$(RM) $*.i
|
||||
$(CPP) $(CPPFLAGS) $< $*.i
|
||||
@@ -117,6 +142,9 @@ clean::
|
||||
%.db: %.edf
|
||||
$(E2DB) $(E2SR_SYSFLAGS) $(E2SR_FLAGS) $<
|
||||
|
||||
%.db: ../%.edf
|
||||
$(E2DB) $(E2SR_SYSFLAGS) $(E2SR_FLAGS) $<
|
||||
|
||||
%.edf: ../%.sch $(DEPSCHS)
|
||||
@if [ ! -f cad.rc -a -r ../cad.rc ] ; then ln -s ../cad.rc ; fi
|
||||
$(SCH2EDIF) $(SCH2EDIF_SYSFLAGS) $(SCH2EDIF_FLAGS) $<
|
||||
@@ -127,12 +155,17 @@ clean::
|
||||
$(RM) $(<F).nr
|
||||
ln -s $<
|
||||
$(MANGEN) -s $(<F)
|
||||
mv $(<F).nr $(<F).1
|
||||
$(MV) $(<F).nr $(<F).1
|
||||
|
||||
binInstalls: $(BIN_INSTALLS)
|
||||
$(INSTALL) -m 555 $^ $(INSTALL_BIN)
|
||||
|
||||
$(INSTALL_DBD)/%: %
|
||||
$(INSTALL_DBD)/%: %
|
||||
@echo "Installing $@"
|
||||
@$(INSTALL) -m 644 $< $(INSTALL_DBD)
|
||||
|
||||
$(INSTALL_DBD)/%: ../%
|
||||
@echo "Installing $@"
|
||||
@test -d $(INSTALL_DBD) || mkdir $(INSTALL_DBD)
|
||||
@$(INSTALL) -m 644 $< $(INSTALL_DBD)
|
||||
|
||||
%Record.h: %Record.dbd
|
||||
@@ -140,71 +173,94 @@ $(INSTALL_DBD)/%: %
|
||||
$(EPICS_BASE)/bin/$(HOST_ARCH)/dbToRecordtypeH \
|
||||
$(USER_DBDFLAGS) $<
|
||||
|
||||
%Record.h: ../%Record.dbd
|
||||
$(RM) $@
|
||||
$(EPICS_BASE)/bin/$(HOST_ARCH)/dbToRecordtypeH \
|
||||
$(USER_DBDFLAGS) $<
|
||||
|
||||
menu%.h: menu%.dbd
|
||||
$(RM) $@
|
||||
$(EPICS_BASE)/bin/$(HOST_ARCH)/dbToMenuH $<
|
||||
|
||||
menu%.h: ../menu%.dbd
|
||||
$(RM) $@
|
||||
$(EPICS_BASE)/bin/$(HOST_ARCH)/dbToMenuH $<
|
||||
|
||||
bpt%.dbd: bpt%.data
|
||||
$(RM) $@
|
||||
$(EPICS_BASE)/bin/$(HOST_ARCH)/makeBpt $<
|
||||
|
||||
$(DBDNAME): $(DBDEXPAND)
|
||||
bpt%.dbd: ../bpt%.data
|
||||
$(RM) $@
|
||||
$(EPICS_BASE)/bin/$(HOST_ARCH)/makeBpt $<
|
||||
|
||||
$(DBDNAME): ../$(DBDEXPAND)
|
||||
@echo expanding dbd
|
||||
@$(RM) $@
|
||||
$(EPICS_BASE)/bin/$(HOST_ARCH)/dbExpand\
|
||||
$(USER_DBDFLAGS) $< > $@
|
||||
|
||||
%.1:%
|
||||
$(RM) $(<F)
|
||||
$(RM) $(<F).nr
|
||||
ln -s $<
|
||||
$(MANGEN) -s $(<F)
|
||||
mv $(<F).nr $(<F).1
|
||||
|
||||
$(LIBNAME): $(LIBOBJS)
|
||||
@echo Building library $@
|
||||
@$(RM) $@
|
||||
$(LINK.c) $@ $(LIBOBJS)
|
||||
$(LINK.c) $@ $(LIBOBJS) $(LDLIBS)
|
||||
|
||||
$(INSTALL_BIN)/%: %
|
||||
$(LIBNAME_CXX): $(LIBOBJS_CXX)
|
||||
@echo Building CXX library $@
|
||||
@$(RM) $@
|
||||
$(LINK.cc) $@ $(LIBOBJS_CXX) $(CXXLDLIBS)
|
||||
|
||||
$(INSTALL_BIN)/%: %
|
||||
@echo "Installing $@"
|
||||
@test -d $(INSTALL_LOCATION_BIN) || mkdir $(INSTALL_LOCATION_BIN)
|
||||
@test -d $(INSTALL_BIN) || mkdir $(INSTALL_BIN)
|
||||
@$(INSTALL) -m 555 $< $(INSTALL_BIN)
|
||||
|
||||
$(INSTALL_BIN)/%: $(EPICS_BASE_BIN)/%
|
||||
$(INSTALL_BIN)/%: ../%
|
||||
@echo "Installing $@"
|
||||
@test -d $(INSTALL_LOCATION_BIN) || mkdir $(INSTALL_LOCATION_BIN)
|
||||
@test -d $(INSTALL_BIN) || mkdir $(INSTALL_BIN)
|
||||
@$(INSTALL) -m 555 $< $(INSTALL_BIN)
|
||||
|
||||
$(INSTALL_MAN)/man9/% \
|
||||
$(INSTALL_MAN)/man8/% \
|
||||
$(INSTALL_MAN)/man7/% \
|
||||
$(INSTALL_MAN)/man6/% \
|
||||
$(INSTALL_MAN)/man5/% \
|
||||
$(INSTALL_MAN)/man4/% \
|
||||
$(INSTALL_MAN)/man3/% \
|
||||
$(INSTALL_MAN)/man2/% \
|
||||
$(INSTALL_MAN)/man1/%: %
|
||||
#
|
||||
# avoid confusing circular dependency message when
|
||||
# INSTALL_BIN and EPICS_BASE_BIN are the same (in base)
|
||||
#
|
||||
ifneq ($(INSTALL_BIN),$(EPICS_BASE_BIN))
|
||||
$(INSTALL_BIN)/%: $(EPICS_BASE_BIN)/%
|
||||
@echo "Installing $@"
|
||||
@$(INSTALL) -m 555 $< $(INSTALL_BIN)
|
||||
endif
|
||||
|
||||
$(addsuffix /%,$(MAN_DIRECTORY_TARGETS)) : %
|
||||
@echo "Installing $@"
|
||||
@test -d $(INSTALL_MAN) || mkdir $(INSTALL_MAN)
|
||||
@test -d $(@D) || mkdir $(@D)
|
||||
@$(INSTALL) -m 644 $< $(@D)
|
||||
|
||||
$(INSTALL_INCLUDE)/%: %
|
||||
$(addsuffix /%,$(MAN_DIRECTORY_TARGETS)) : ../%
|
||||
@echo "Installing $@"
|
||||
@test -d $(INSTALL_INCLUDE) || mkdir $(INSTALL_INCLUDE)
|
||||
@$(INSTALL) -m 644 $< $(INSTALL_INCLUDE)
|
||||
@$(INSTALL) -m 644 $< $(@D)
|
||||
|
||||
$(INSTALL_DOC)/%: %
|
||||
$(INSTALL_INCLUDE)/%: %
|
||||
@echo "Installing $@"
|
||||
@$(INSTALL) -m 644 $< $(@D)
|
||||
|
||||
$(INSTALL_INCLUDE)/%: ../%
|
||||
@echo "Installing $@"
|
||||
@$(INSTALL) -m 644 $< $(@D)
|
||||
|
||||
$(INSTALL_DOC)/%: %
|
||||
@echo "Installing $@"
|
||||
@$(INSTALL) -m 644 $< $(INSTALL_DOC)
|
||||
|
||||
$(INSTALL_DOC)/%: ../%
|
||||
@echo "Installing $@"
|
||||
@test -d $(INSTALL_DOC) || mkdir $(INSTALL_DOC)
|
||||
@$(INSTALL) -m 644 $< $(INSTALL_DOC)
|
||||
|
||||
.PRECIOUS: %.o %.c
|
||||
|
||||
.PHONY: all inc depends build install pre-build clean
|
||||
.PHONY:: all inc depends build install pre_build clean rebuild buildInstall binInstalls
|
||||
|
||||
-include .DEPENDS
|
||||
|
||||
ifneq (,$(wildcard ../baseLIBOBJS))
|
||||
$(LIBNAME): ../baseLIBOBJS
|
||||
endif
|
||||
$(LIBNAME): ../Makefile.Vx
|
||||
$(DBDNAME): ../base.dbd $(RECTYPES:%.h=../%.dbd)
|
||||
|
||||
|
||||
56
config/RULES.ioc
Normal file
56
config/RULES.ioc
Normal file
@@ -0,0 +1,56 @@
|
||||
#RULES.ioc
|
||||
|
||||
ifndef WIN32
|
||||
APPDIR := $(shell grep '.*".*App/' st.* | sed -e 's/.*"\(.*App\).*/\1/' | sort -u )
|
||||
endif
|
||||
|
||||
ASCF = $(TOP)/../ascf
|
||||
TARGETBIN = $(TOP)/bin/$(ARCH)
|
||||
ARCHS = $(BUILD_ARCHS) host cross
|
||||
ACTIONS += clean inc depends buildInstall build
|
||||
actionArchTargets = $(foreach action, $(ACTIONS) install,\
|
||||
$(foreach arch, $(ARCHS), \
|
||||
$(action)$(DIVIDER)$(arch)))
|
||||
|
||||
all install :: inc buildInstall
|
||||
|
||||
buildInstall: makelinks
|
||||
|
||||
inc build depends:
|
||||
|
||||
makelinks:
|
||||
ifndef WIN32
|
||||
@$(RM) ascf bin vxWorks vxWorks.sym dbd share $(APPDIR)
|
||||
ln -s $(ASCF) ascf
|
||||
ln -s $(TARGETBIN) bin
|
||||
ln -s $(TARGETBIN)/vxWorks vxWorks
|
||||
ln -s $(TARGETBIN)/vxWorks.sym vxWorks.sym
|
||||
ln -s $(TOP)/dbd dbd
|
||||
ln -s $(SHARE) share
|
||||
@for dir in $(APPDIR) scum ; do \
|
||||
if [ $$dir = scum ]; then \
|
||||
: ; \
|
||||
elif [ -d $(TOP)/$$dir ]; then \
|
||||
ln -s $(TOP)/$$dir $$dir ; \
|
||||
echo "ln -s $(TOP)/$$dir $$dir" ; \
|
||||
elif [ -d $(MASTER_IOCAPPS)/$$dir ]; then \
|
||||
ln -s $(MASTER_IOCAPPS)/$$dir $$dir ; \
|
||||
echo "ln -s $(MASTER_IOCAPPS)/$$dir $$dir" ; \
|
||||
else \
|
||||
echo "$$dir not found" ; \
|
||||
fi ; \
|
||||
done
|
||||
endif
|
||||
|
||||
clean::
|
||||
@$(RM) ascf bin vxWorks vxWorks.sym dbd share $(APPDIR)
|
||||
|
||||
$(actionArchTargets) :%:
|
||||
$(MAKE) $(word 1, $(subst $(DIVIDER), ,$@))
|
||||
|
||||
$(ARCHS):%: install
|
||||
|
||||
.PHONY :: $(ARCHS) $(ACTIONS)
|
||||
.PHONY :: $(actionArchTargets)
|
||||
|
||||
|
||||
@@ -10,7 +10,9 @@ all:: install
|
||||
ACTIONS += inc
|
||||
ACTIONS += build
|
||||
ACTIONS += install
|
||||
ACTIONS += buildInstall
|
||||
ACTIONS += depends
|
||||
ACTIONS += rebuild
|
||||
|
||||
actionPart = $(word 1, $(subst $(DIVIDER), ,$@))
|
||||
archPart = $(word 2, $(subst $(DIVIDER), ,$@))
|
||||
@@ -18,7 +20,7 @@ archPart = $(word 2, $(subst $(DIVIDER), ,$@))
|
||||
#
|
||||
# hostActionArchTargets
|
||||
#
|
||||
hostArchs = $(HOST_ARCH) $(filter-out $(HOST_ARCH),$(CROSS_COMPILER_HOST_ARCHS))
|
||||
hostArchs = $(HOST_ARCH)
|
||||
hostActionArchTargets = $(foreach x, $(ACTIONS),\
|
||||
$(foreach arch,$(hostArchs), $(x)$(DIVIDER)$(arch)))
|
||||
ifeq (Makefile.$(BUILD_TYPE), $(wildcard Makefile.$(BUILD_TYPE)))
|
||||
@@ -35,7 +37,7 @@ endif
|
||||
#
|
||||
# crossActionArchTargets
|
||||
#
|
||||
crossArchs = $(CROSS_COMPILER_TARGET_ARCHS)
|
||||
crossArchs = $(filter-out $(hostArchs),$(BUILD_ARCHS))
|
||||
crossActionArchTargets = $(foreach x, $(ACTIONS), \
|
||||
$(foreach arch, $(CROSS_COMPILER_TARGET_ARCHS), $(x)$(DIVIDER)$(arch)))
|
||||
ifeq (Makefile.Vx, $(wildcard Makefile.Vx))
|
||||
@@ -50,19 +52,15 @@ $(crossArchs) :
|
||||
endif
|
||||
|
||||
$(hostDirs) :
|
||||
$(MKDIR) $@
|
||||
echo "T_A=$(subst O.,,$@)" > $@/Makefile
|
||||
echo "include ../Makefile.$(BUILD_TYPE)" >> $@/Makefile
|
||||
$(PERL) $(EPICS_BASE)/config/makeMakefile.pl $@ $(BUILD_TYPE)
|
||||
|
||||
$(crossDirs) :
|
||||
$(MKDIR) $@
|
||||
echo "T_A=$(subst O.,,$@)" > $@/Makefile
|
||||
echo "include ../Makefile.Vx" >> $@/Makefile
|
||||
$(PERL) $(EPICS_BASE)/config/makeMakefile.pl $@ Vx
|
||||
|
||||
#
|
||||
# host/cross action targets
|
||||
#
|
||||
$(ACTIONS) clean : % : %$(DIVIDER)host %$(DIVIDER)cross
|
||||
$(ACTIONS) : % : %$(DIVIDER)host %$(DIVIDER)cross
|
||||
HostActionTargets = $(foreach x, $(ACTIONS) clean, $(x)$(DIVIDER)host)
|
||||
CrossActionTargets = $(foreach x, $(ACTIONS) clean, $(x)$(DIVIDER)cross)
|
||||
$(HostActionTargets) : %$(DIVIDER)host : $(addprefix %$(DIVIDER), $(hostArchs))
|
||||
@@ -78,13 +76,15 @@ cross : $(crossArchs)
|
||||
#
|
||||
# special clean rule
|
||||
#
|
||||
clean :
|
||||
$(RMDIR) $(hostDirs) $(crossDirs)
|
||||
clean$(DIVIDER)% :
|
||||
$(RMDIR) O.$*
|
||||
|
||||
.PHONY : $(HostActionTargets)
|
||||
.PHONY : $(CrossActionTargets)
|
||||
.PHONY : $(crossActionArchTargets)
|
||||
.PHONY : $(hostActionArchTargets)
|
||||
.PHONY : $(hostArchs) $(crossArchs)
|
||||
.PHONY : $(ACTIONS) clean all host cross
|
||||
.PHONY :: $(HostActionTargets)
|
||||
.PHONY :: $(CrossActionTargets)
|
||||
.PHONY :: $(crossActionArchTargets)
|
||||
.PHONY :: $(hostActionArchTargets)
|
||||
.PHONY :: $(hostArchs) $(crossArchs)
|
||||
.PHONY :: $(ACTIONS) clean all host cross
|
||||
|
||||
|
||||
@@ -3,40 +3,44 @@
|
||||
#
|
||||
|
||||
|
||||
ARCHS= $(BUILD_ARCHS) host cross
|
||||
ACTIONS = clean inc install depends
|
||||
ARCHS += $(BUILD_ARCHS) host cross
|
||||
ACTIONS += clean inc depends buildInstall
|
||||
|
||||
dirPart = $(word 1, $(subst $(DIVIDER), ,$@))
|
||||
actionArchPart = $(subst $(dirPart)$(DIVIDER), ,$@)
|
||||
|
||||
dirActionArchTargets = $(foreach dir, $(DIRS), \
|
||||
$(foreach action, $(ACTIONS),\
|
||||
$(foreach action, $(ACTIONS) install,\
|
||||
$(foreach arch, $(ARCHS), \
|
||||
$(dir)$(DIVIDER)$(action)$(DIVIDER)$(arch))))
|
||||
dirArchTargets += $(foreach dir, $(DIRS), \
|
||||
$(foreach arch, $(ARCHS),\
|
||||
$(dir)$(DIVIDER)$(arch)))
|
||||
dirActionTargets += $(foreach dir, $(DIRS), \
|
||||
$(foreach action, $(ACTIONS),\
|
||||
$(foreach action, $(ACTIONS) install,\
|
||||
$(dir)$(DIVIDER)$(action)))
|
||||
actionArchTargets = $(foreach action, $(ACTIONS),\
|
||||
actionArchTargets = $(foreach action, $(ACTIONS) install,\
|
||||
$(foreach arch, $(ARCHS), \
|
||||
$(action)$(DIVIDER)$(arch)))
|
||||
|
||||
all install :: inc buildInstall
|
||||
|
||||
all:: inc install
|
||||
rebuild:: clean all
|
||||
|
||||
rebuild:: clean uninstall all
|
||||
|
||||
$(DIRS) $(dirActionTargets) $(dirArchTargets)$(dirActionArchTargets) ::
|
||||
$(MAKE) -C $(dirPart) $(actionArchPart)
|
||||
|
||||
$(ARCHS) $(ACTIONS) $(actionArchTargets):%: $(foreach dir, $(DIRS), $(dir)$(DIVIDER)%)
|
||||
$(ARCHS) $(installArchTargets) :%: \
|
||||
$(foreach dir, $(DIRS), $(dir)$(DIVIDER)inc) \
|
||||
$(foreach dir, $(DIRS), $(dir)$(DIVIDER)%)
|
||||
|
||||
$(ACTIONS) $(actionArchTargets) :%: \
|
||||
$(foreach dir, $(DIRS), $(dir)$(DIVIDER)%)
|
||||
|
||||
|
||||
.PHONY : $(DIRS)
|
||||
.PHONY : $(ARCHS) $(ACTIONS)
|
||||
.PHONY : $(dirActionTargets) $(dirArchTargets)
|
||||
.PHONY : $(dirActionArchTargets)
|
||||
.PHONY : $(actionArchTargets)
|
||||
.PHONY :: $(DIRS) all install rebuild
|
||||
.PHONY :: $(ARCHS) $(ACTIONS)
|
||||
.PHONY :: $(dirActionTargets) $(dirArchTargets)
|
||||
.PHONY :: $(dirActionArchTargets)
|
||||
.PHONY :: $(actionArchTargets)
|
||||
|
||||
|
||||
@@ -6,7 +6,8 @@ include $(TOP)/config/RULES_DIRS
|
||||
|
||||
uninstall$(DIVIDER)%::
|
||||
@$(RMDIR) $(INSTALL_LOCATION_BIN)/$* $(INSTALL_LOCATION_LIB)/$* \
|
||||
$(INSTALL_LOCATION)/dbd $(INSTALL_MAN) $(INSTALL_INCLUDE)
|
||||
$(INSTALL_LOCATION)/dbd $(INSTALL_MAN) $(INSTALL_INCLUDE) \
|
||||
$(INSTALL_DOC) $(INSTALL_DBD) $(INSTALL_TEMPLATES)
|
||||
@$(RMDIR) rec.bak rec
|
||||
|
||||
uninstall:: $(addprefix uninstall$(DIVIDER),$(BUILD_ARCHS))
|
||||
@@ -45,6 +46,6 @@ help:
|
||||
@echo "Indiv. object targets are supported by O.<arch> level Makefile .e.g"
|
||||
@echo " xxxRecord.o
|
||||
|
||||
.PHONY : uninstall tar help
|
||||
.PHONY : $(addprefix uninstall$(DIVIDER), $(BUILDARCHS))
|
||||
.PHONY :: uninstall tar help
|
||||
.PHONY :: $(addprefix uninstall$(DIVIDER), $(BUILDARCHS))
|
||||
|
||||
|
||||
185
config/Sample.Makefile.Host
Normal file
185
config/Sample.Makefile.Host
Normal file
@@ -0,0 +1,185 @@
|
||||
# Makefile.Host for base/src/sample
|
||||
#
|
||||
#
|
||||
# Sample Makefile.Host showing all possible entries
|
||||
# that are allowed using RULES.Host.
|
||||
#
|
||||
# 8-01-96 -kuk-
|
||||
#
|
||||
#
|
||||
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
CMPLR = STRICT
|
||||
|
||||
# Add-on CFLAGS that are needed in this subproject.
|
||||
# (If possible, all system specific flags should be
|
||||
# defined in CONFIG.$(ARCH_CLASS))
|
||||
#
|
||||
# Whenever possible, ONLY USR_CFLAGS should be
|
||||
# used. If you need special flags for your system,
|
||||
# try to put them in CONFIG.YourSystem!
|
||||
#
|
||||
# This is used on all systems:
|
||||
USR_CFLAGS := -DVAR=value -Ddefine_for_all_systems
|
||||
# This is added to the above, but only for ARCH_CLASS=BSD:
|
||||
USR_CFLAGS_BSD := -DVERSION='Berkeley enhanced'
|
||||
# ..only for WIN32:
|
||||
USR_CFLAGS_WIN32 := -DVERSION='WIN32 port'
|
||||
#
|
||||
# -nil- is special:
|
||||
# if USR_CFLAGS_SYSV was undefined or empty, .._DEFAULT would have
|
||||
# been used.
|
||||
# To indicate
|
||||
# "yes, there is a special USR_CFLAGS for SYSV, but it's empty"
|
||||
# you have to set it to -nil-:
|
||||
USR_CFLAGS_SYSV := -nil-
|
||||
# .. for all other arch classes:
|
||||
USR_CFLAGS_DEFAULT := -DVERSION='generic Unix'
|
||||
|
||||
# CFLAGS that are only used to compile a_file.c or a_file.cc:
|
||||
#
|
||||
a_file_CFLAGS := -DIN_A_FILE
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# general rule for all .c .cc .h .hh files and scripts:
|
||||
#
|
||||
# In here you supply just the filename without '../' etc.
|
||||
# While building in an O.xxx subdir, the
|
||||
# sources are extracted from either the
|
||||
# '..'
|
||||
# dir or - if it exists - the dir
|
||||
# '../$(ARCH_CLASS)'
|
||||
# is preferred.
|
||||
# ---------------------------------------------------------
|
||||
|
||||
|
||||
# includes to install from this sub-project
|
||||
#
|
||||
# again: if INC_$(ARCH_CLASS) is defined, it is added to INC,
|
||||
# otherwise INC_DEFAULT (if defined) is added:
|
||||
#
|
||||
INC_DEFAULT := for_all_but_WIN32_or_hp700.h
|
||||
INC_WIN32 := only_for_WIN32.h
|
||||
INC_hp700 := -nil- # hp700 uses no special include
|
||||
INC := file.h
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
# defining a library
|
||||
# --------------------------------------------------------------------
|
||||
#
|
||||
# Contents of a library are specified via LIBSRCS.
|
||||
# From this the platform specific object names (.o, .obj, ...)
|
||||
# are derived automatically.
|
||||
#
|
||||
# Platform specific objects:
|
||||
# use LIBOBJS_$(ARCH_CLASS) or .._DEFAULT
|
||||
#
|
||||
# Platform specific files can also be put in
|
||||
# separate os/ARCH_CLASS directories!
|
||||
#
|
||||
# For almost every file the seach order is:
|
||||
# ./os/ARCH_CLASS
|
||||
# ./os/generic
|
||||
# .
|
||||
# So usually only LIBSRCS should be sufficient!
|
||||
#
|
||||
LIBSRCS := file_for_lib.c another_file.cc
|
||||
LIBSRCS_DEFAULT := posix.c
|
||||
LIBSRCS_WIN32 := win32_special.c
|
||||
LIBSRCS_BSD := -nil-
|
||||
|
||||
# Type of library to build.
|
||||
# On WIN32, SHARED results in a DLL, others may ignore this.
|
||||
LIBTYPE:=SHARED
|
||||
|
||||
# Ugly but necessary for WIN32:
|
||||
# If LIBRARY is build as a dll, it may need other libraries
|
||||
# to link with that you specify here.
|
||||
# (because a dll is similar to a program:
|
||||
# all references have to be resolved)
|
||||
#
|
||||
# If there is a file ../$(LIBRARY).def, it will
|
||||
# be used as the dll-def-file on WIN32
|
||||
#
|
||||
# We need this flag because
|
||||
# 1) you may not use a def file ('proper' code needs no def files)
|
||||
# 2) you may have one and still not want a DLL (for testing etc.)
|
||||
#
|
||||
DLL_LIBS:=some_dll
|
||||
|
||||
# Library to build:
|
||||
# lib$(LIBRARY).a or ..dll/..exp/..lib
|
||||
#
|
||||
# Currently you can build only one (1) lib per Makefile.Host!
|
||||
#
|
||||
LIBRARY:=libname
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
# defining products (executable programs)
|
||||
# --------------------------------------------------------------------
|
||||
#
|
||||
# if SRCS is undefined, it defaults to $(PROD).c
|
||||
SRCS=a.c b.c c.c
|
||||
|
||||
# libs needed to link PROD and TESTPROD
|
||||
#
|
||||
# for all systems:
|
||||
PROD_LIBS := Com Ca
|
||||
# for most systems:
|
||||
PROD_LIBS_DEFAULT := mathlib
|
||||
PROD_LIBS_WIN32 := -nil-
|
||||
|
||||
# Product,
|
||||
# may be caRepeater.o -> caRepeater
|
||||
# or caRepeater.obj -> caRepeater.exe
|
||||
PROD := prod
|
||||
PROD_DEFAULT := product_for_rest
|
||||
PROD_WIN32 := product_only_for_WIN32
|
||||
PROD_BSD := product_only_for_BSD
|
||||
PROD_SYSV := product_only_for_SYSV
|
||||
|
||||
# Scripts to install
|
||||
#
|
||||
# If there is both ../$(SCRIPT) and ../$(ARCH_CLASS)/$(SCRIPT),
|
||||
# the latter, system specific version will be installed!
|
||||
#
|
||||
SCRIPTS_DEFAULT := script_for_rest
|
||||
SCRIPTS_WIN32 := script_only_for_WIN32
|
||||
SCRIPTS_BSD := script_only_for_BSD
|
||||
SCRIPTS := script
|
||||
|
||||
|
||||
# uncomment if you want to build these locally without installing:
|
||||
# TESTPROD = test
|
||||
|
||||
|
||||
# Unfortunately the above allows you only to
|
||||
# 1) build one PROD:=p from many SRCS:=a.c b.c c.c
|
||||
# or
|
||||
# 2) build many PROD:=a b c each from a single source (a.c, b.c, c.c)
|
||||
#
|
||||
# If you have several multi-source products in the same dir
|
||||
# you have to fall back to explicit rules.
|
||||
# (suggestions for a better syntax welcome!)
|
||||
#
|
||||
# The explicit rules, however, should look like the following:
|
||||
|
||||
# be careful if you add rules and dependencies:
|
||||
# use $(MV) $(RM) $(CP) $(MKDIR) $(RMDIR) $(OBJ) $(EXE) $(LINK.c) ....
|
||||
|
||||
xxxxx$(OBJ): c1.c c2.c h1.h
|
||||
|
||||
# because the output-flag (mostly '-o $@' on Unix, '-Fe$@' on WIN32)
|
||||
# is also system dependend, it's included in $(LINK.c) and $(LINK.cc) !
|
||||
#
|
||||
prog$(EXE): a$(OBJ) b$(OBJ)
|
||||
$(LINK.c) a$(OBJ) b$(OBJ) $(LDLIBS)
|
||||
|
||||
|
||||
clean::
|
||||
$(RM) dbLex.c
|
||||
|
||||
include $(TOP)/config/RULES.Host
|
||||
|
||||
# EOF Makefile.Host
|
||||
30
config/makeMakefile.pl
Normal file
30
config/makeMakefile.pl
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/usr/local/bin/perl
|
||||
#
|
||||
# makeMakefile.pl
|
||||
#
|
||||
# called from RULES_ARCHS
|
||||
#
|
||||
#
|
||||
# Usage: perl makeMakefile.pl O.*-dir Makefile-Type
|
||||
|
||||
$dir = $ARGV[0];
|
||||
$type= $ARGV[1];
|
||||
$makefile="$dir/Makefile";
|
||||
|
||||
if ($dir =~ m'O.(.+)')
|
||||
{
|
||||
$t_a = $1;
|
||||
}
|
||||
else
|
||||
{
|
||||
die "Cannot extract T_A from $dir";
|
||||
}
|
||||
|
||||
mkdir ($dir, 0777) unless -d $dir;
|
||||
|
||||
open OUT, "> $makefile" or die "Cannot create $makefile";
|
||||
print OUT "T_A=$t_a\n";
|
||||
print OUT "include ../Makefile.$type\n";
|
||||
close OUT;
|
||||
|
||||
# EOF makeMakefile.pl
|
||||
32
src/as/Makefile.Host
Normal file
32
src/as/Makefile.Host
Normal file
@@ -0,0 +1,32 @@
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
USR_CFLAGS = -D_NO_PROTO
|
||||
|
||||
INC := asDbLib.h asLib.h
|
||||
|
||||
# build lib As from asLib.c:
|
||||
#
|
||||
LIBSRCS := asLib.c
|
||||
LIBRARY := As
|
||||
|
||||
|
||||
# All systems link the libs As, Com, Db (and again Com ??),
|
||||
# generic Unix needs also lib m:
|
||||
#
|
||||
SYS_PROD_LIBS_DEFAULT := m
|
||||
SYS_PROD_LIBS_WIN32 := -nil-
|
||||
PROD_LIBS := As Com Db Com
|
||||
|
||||
PROD := ascheck
|
||||
|
||||
include $(TOP)/config/RULES.Host
|
||||
|
||||
# Extra rule since asLib_lex.c is included in asLib.c
|
||||
# In my opinion, these objects should really be built
|
||||
# independently.
|
||||
asLib$(OBJ): asLib_lex.c ../asLibRoutines.c
|
||||
|
||||
clean::
|
||||
@$(RM) asLib.c asLib_lex.c
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
USR_CFLAGS = -D_NO_PROTO
|
||||
USR_LDLIBS = -lAs -lCom -lDb -lCom -lm -s
|
||||
USR_LDFLAGS = -L.
|
||||
|
||||
DEPLIBS_BASE = $(INSTALL_LIB)
|
||||
DEPLIBS = ./libAs.a\
|
||||
$(DEPLIBS_BASE)/libCom.a\
|
||||
$(DEPLIBS_BASE)/libDb.a
|
||||
|
||||
INC += asDbLib.h
|
||||
INC += asLib.h
|
||||
|
||||
SRCS.c = ../ascheck.c asLib.c
|
||||
OBJS = ascheck.o
|
||||
LIBOBJS = asLib.o
|
||||
LIBNAME = libAs.a
|
||||
PROD = ascheck
|
||||
|
||||
include $(TOP)/config/RULES.Unix
|
||||
|
||||
# Extra rule since asLib_lex.c is included in asLib.c
|
||||
# In my opinion, these objects should really be built
|
||||
# independently.
|
||||
asLib.o: asLib_lex.c ../asLibRoutines.c
|
||||
|
||||
clean::
|
||||
@$(RM) asLib.c asLib_lex.c
|
||||
|
||||
@@ -127,7 +127,7 @@ LOCAL void eventCallback(struct event_handler_args eha)
|
||||
ASGINP *pasginp;
|
||||
CAPVT *pcapvt;
|
||||
ASG *pasg;
|
||||
struct dbr_sts_double *pdata = eha.dbr;
|
||||
READONLY struct dbr_sts_double *pdata = eha.dbr;
|
||||
int Ilocked=FALSE;
|
||||
|
||||
if(!caInitializing) {
|
||||
@@ -168,9 +168,8 @@ LOCAL void asCaTask(void)
|
||||
pasg->inpBad |= (1<<pasginp->inpIndex);
|
||||
pcapvt = pasginp->capvt = asCalloc(1,sizeof(CAPVT));
|
||||
/*Note calls connectCallback immediately called for local Pvs*/
|
||||
SEVCHK(ca_build_and_connect(pasginp->inp,TYPENOTCONN,0,
|
||||
&pcapvt->chid,0,connectCallback,pasginp),
|
||||
"ca_build_and_connect");
|
||||
SEVCHK(ca_search_and_connect(pasginp->inp,&pcapvt->chid,
|
||||
connectCallback,pasginp),"ca_build_and_connect");
|
||||
/*Note calls accessRightsCallback immediately called for local Pvs*/
|
||||
SEVCHK(ca_replace_access_rights_event(pcapvt->chid,accessRightsCallback),
|
||||
"ca_replace_access_rights_event");
|
||||
|
||||
@@ -65,6 +65,7 @@ DEVELOPMENT CENTER AT ARGONNE NATIONAL LABORATORY (708-252-2000).
|
||||
#include <caeventmask.h>
|
||||
#include <dbStaticLib.h>
|
||||
#include <dbAccess.h>
|
||||
#include <dbEvent.h>
|
||||
#include <asLib.h>
|
||||
#include <asDbLib.h>
|
||||
#include <dbCommon.h>
|
||||
|
||||
@@ -72,10 +72,6 @@ int asActive = FALSE;
|
||||
/*storage for freelist */
|
||||
static void *freeListPvt = NULL;
|
||||
|
||||
/*Forward declarations for Non ANSI routines*/
|
||||
long calcPerform(double *parg,double *presult,char *post);
|
||||
long postfix(char *pinfix, char *ppostfix,short *perror);
|
||||
|
||||
#define RPCL_LEN 184
|
||||
#define DEFAULT "DEFAULT"
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ static ASINPUTFUNCPTR *my_yyinput;
|
||||
#undef YY_INPUT
|
||||
#define YY_INPUT(b,r,ms) (r=(*my_yyinput)(b,ms))
|
||||
|
||||
yyreset()
|
||||
static int yyreset()
|
||||
{
|
||||
line_num=1;
|
||||
BEGIN INITIAL;
|
||||
@@ -66,9 +66,13 @@ INP[A-L] {/* If A-L is changed then ASMAXINP must also be changed*/
|
||||
\n { line_num ++;}
|
||||
. {
|
||||
char message[20];
|
||||
YY_BUFFER_STATE *dummy=0;
|
||||
|
||||
sprintf(message,"invalid character '%c'",yytext[0]);
|
||||
yyerror(message);
|
||||
/*The following suppresses compiler warning messages*/
|
||||
if(FALSE) yyunput('c',message);
|
||||
if(FALSE) yy_switch_to_buffer(*dummy);
|
||||
}
|
||||
|
||||
%%
|
||||
|
||||
10
src/bdt/Makefile.Host
Normal file
10
src/bdt/Makefile.Host
Normal file
@@ -0,0 +1,10 @@
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
INC := bdt.h
|
||||
|
||||
LIBSRCS := bdt.c
|
||||
|
||||
LIBRARY := Bdt
|
||||
|
||||
include $(TOP)/config/RULES.Host
|
||||
@@ -1,10 +0,0 @@
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
INC += bdt.h
|
||||
|
||||
LIBOBJS += bdt.o
|
||||
|
||||
LIBNAME = libBdt.a
|
||||
|
||||
include $(TOP)/config/RULES.Unix
|
||||
@@ -1,4 +1,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
#include <sys/wait.h>
|
||||
@@ -158,7 +160,7 @@ BDT* BdtIpOpen(char* address, int Port)
|
||||
{
|
||||
if ((pHostent = gethostbyname (address)) == NULL)
|
||||
return(NULL);
|
||||
bcopy (pHostent->h_addr, (char *) &addr, sizeof(addr));
|
||||
memcpy (&addr,pHostent->h_addr,sizeof(addr));
|
||||
printf("Converting name >%s< to IP number %08.8X\n", address, addr);
|
||||
}
|
||||
#endif
|
||||
|
||||
14
src/bpt/Makefile.Host
Normal file
14
src/bpt/Makefile.Host
Normal file
@@ -0,0 +1,14 @@
|
||||
# Makefile.Host for base/src/bpt
|
||||
#
|
||||
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
INC := cvtTable.h
|
||||
|
||||
SRCS := makeBpt.c
|
||||
PROD := makeBpt
|
||||
|
||||
include $(TOP)/config/RULES.Host
|
||||
|
||||
# EOF Makefile.Host for base/src/bpt
|
||||
@@ -1,15 +0,0 @@
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
INC += cvtTable.h
|
||||
|
||||
SRCS.c = ../makeBpt.c
|
||||
OBJS = makeBpt.o
|
||||
PROD = makeBpt
|
||||
|
||||
include $(TOP)/config/RULES.Unix
|
||||
|
||||
$(PROD): $(OBJS) $(DEPLIBS)
|
||||
$(RM) $@
|
||||
$(LINK.c) -o $@ ${OBJS} $(LDLIBS)
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
USR_CFLAGS = -ansi
|
||||
VX_WARN_YES = -Wall -pedantic
|
||||
|
||||
MENUS += menuConvert.h
|
||||
|
||||
BPTS += bptTypeJdegC.dbd
|
||||
|
||||
@@ -33,7 +33,9 @@
|
||||
* 01 04OCT95 mrk Taken from old bldCvtTable
|
||||
*/
|
||||
#include <vxWorks.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include <ellLib.h>
|
||||
#include <dbBase.h>
|
||||
|
||||
@@ -50,6 +50,7 @@ $ define /nolog tcp multinet_root:[multinet.include]
|
||||
$!
|
||||
$! Compile the functions and test programs
|
||||
$! Define symbol for the CC command
|
||||
$ call list_define
|
||||
$ call set_cc_command
|
||||
$ if (p1 .nes. "")
|
||||
$ then
|
||||
@@ -69,14 +70,14 @@ TEST_EVENT, -
|
||||
BSD_DEPEN, -
|
||||
IF_DEPEN, -
|
||||
VMS_DEPEN, -
|
||||
ELLLIB, -
|
||||
BUCKETLIB, -
|
||||
ENVSUBR, -
|
||||
TSSUBR, -
|
||||
[-.libcom]ELLLIB, -
|
||||
[-.libcom]BUCKETLIB, -
|
||||
[-.libcom]ENVSUBR, -
|
||||
[-.libcom]TSSUBR, -
|
||||
NEXTFIELDSUBR, -
|
||||
ASSERTUNIX, -
|
||||
ENVDATA, -
|
||||
CATIME, -
|
||||
[-.libcom]ENVDATA, -
|
||||
[-.ca]CATIME, -
|
||||
ACCTST
|
||||
$ endif
|
||||
$
|
||||
@@ -135,10 +136,20 @@ $ if f$getsyi("HW_MODEL") .ge. 1024
|
||||
$ then
|
||||
$! turn of no prototype messages because MULTINET does not
|
||||
$! supply prototypes.
|
||||
$ cc_command:== cc /warn=(disable=IMPLICITFUNC)/float=d_float /include=([], [-.include], [-.libcom])
|
||||
$ cc_command:== cc /warn=(disable=IMPLICITFUNC)/float=d_float -
|
||||
/define=("__STDC__=1", "MULTINET=1") -
|
||||
/include=([], [-.include], [-.include.os.vms], [-.libcom], [-.db])
|
||||
$ else
|
||||
$ cc_command:== cc /include=([], [-.include], [-.libcom])
|
||||
$ cc_command:== cc /define=("__STDC__=1", "MULTINET=1") 'listing' -
|
||||
/include=([], [-.include], [-.include.os.vms], [-.libcom], [-.db])
|
||||
$ endif
|
||||
$
|
||||
$ endsubroutine
|
||||
$ list_define: subroutine
|
||||
$ listing == ""
|
||||
$ if p1 .eqs. "L" then listing == "/lis=list.lis /sho=incl"
|
||||
$ endsubroutine
|
||||
$
|
||||
$! ************************************************************
|
||||
|
||||
|
||||
|
||||
64
src/ca/Makefile.Host
Normal file
64
src/ca/Makefile.Host
Normal file
@@ -0,0 +1,64 @@
|
||||
# Makefile.Host
|
||||
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
CMPLR = STRICT
|
||||
|
||||
#
|
||||
# includes to install from this subproject
|
||||
#
|
||||
INC += cadef.h
|
||||
INC += caerr.h
|
||||
INC += caeventmask.h
|
||||
INC += caProto.h
|
||||
|
||||
#
|
||||
# Contents of library: generic, special and for all systems
|
||||
#
|
||||
|
||||
# on generic system
|
||||
LIBSRCS_DEFAULT := posix_depen.c if_depen.c caRepeater.c
|
||||
|
||||
# on WIN32 only
|
||||
LIBSRCS_WIN32 := windows_depen.c
|
||||
|
||||
# on all systems
|
||||
LIBSRCS += iocinf.c
|
||||
LIBSRCS += service.c
|
||||
LIBSRCS += conn.c
|
||||
LIBSRCS += netdb_depen.c
|
||||
LIBSRCS += flow_control.c
|
||||
LIBSRCS += syncgrp.c
|
||||
LIBSRCS += access.c
|
||||
LIBSRCS += convert.c
|
||||
LIBSRCS += test_event.c
|
||||
LIBSRCS += bsd_depen.c
|
||||
LIBSRCS += repeater.c
|
||||
|
||||
# Library to build:
|
||||
# lib$(LIBRARY).a or ..dll/..exp/..lib
|
||||
#
|
||||
LIBRARY := ca
|
||||
|
||||
# build LIBRARY as a DLL on WIN32, other systems may ignore this
|
||||
LIBTYPE := SHARED
|
||||
|
||||
# WIN32 only: need additional lib to build the DLL and special def-file
|
||||
DLL_LIBS := Com
|
||||
|
||||
PROD := caRepeater
|
||||
|
||||
# libs needed to build [TEST]PRODUCT
|
||||
PROD_LIBS := ca Com
|
||||
|
||||
TESTPROD := catime acctst
|
||||
|
||||
include $(TOP)/config/RULES.Host
|
||||
|
||||
pcatime : catime.o $(PRODDEPLIBS)
|
||||
$(PURIFY) $(LINK.c) catime.o $(LDLIBS)
|
||||
|
||||
pacctst : acctst.o $(PRODDEPLIBS)
|
||||
$(PURIFY) $(LINK.c) acctst.o $(LDLIBS)
|
||||
|
||||
# EOF Makefile.Host
|
||||
@@ -1,36 +0,0 @@
|
||||
TOP = ../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
USR_LDLIBS = -lca -lCom
|
||||
USR_LDFLAGS = -L.
|
||||
|
||||
DEPLIBS_BASE = $(INSTALL_LIB)
|
||||
DEPLIBS = ./libca.a $(DEPLIBS_BASE)/libCom.a
|
||||
|
||||
INC += cadef.h
|
||||
INC += caerr.h
|
||||
INC += caeventmask.h
|
||||
INC += caProto.h
|
||||
|
||||
SRCS.c = \
|
||||
../iocinf.c ../access.c ../test_event.c ../service.c \
|
||||
../flow_control.c ../repeater.c ../conn.c \
|
||||
../syncgrp.c ../if_depen.c ../netdb_depen.c ../bsd_depen.c \
|
||||
../posix_depen.c ../caRepeater.c ../acctst.c ../catime.c \
|
||||
../convert.c
|
||||
|
||||
OBJS = caRepeater.o
|
||||
|
||||
LIBOBJS = \
|
||||
iocinf.o access.o test_event.o service.o flow_control.o repeater.o \
|
||||
conn.o syncgrp.o if_depen.o netdb_depen.o \
|
||||
bsd_depen.o posix_depen.o convert.o
|
||||
|
||||
LIBNAME = libca.a
|
||||
|
||||
PROD = caRepeater
|
||||
|
||||
TARGETS = acctst catime
|
||||
|
||||
include $(TOP)/config/RULES.Unix
|
||||
|
||||
@@ -5,11 +5,12 @@ SRCS.c = \
|
||||
../iocinf.c ../access.c ../test_event.c ../service.c \
|
||||
../flow_control.c ../repeater.c ../conn.c ../syncgrp.c \
|
||||
../if_depen.c ../bsd_depen.c ../vxWorks_depen.c ../acctst.c \
|
||||
../catime.c
|
||||
../catime.c ../convert.c
|
||||
|
||||
LIBOBJS = \
|
||||
iocinf.o access.o test_event.o service.o flow_control.o \
|
||||
repeater.o conn.o syncgrp.o if_depen.o bsd_depen.o vxWorks_depen.o
|
||||
repeater.o conn.o syncgrp.o if_depen.o bsd_depen.o vxWorks_depen.o \
|
||||
convert.o
|
||||
|
||||
LIBNAME = caLib
|
||||
|
||||
|
||||
1302
src/ca/access.c
1302
src/ca/access.c
File diff suppressed because it is too large
Load Diff
496
src/ca/acctst.c
496
src/ca/acctst.c
@@ -7,6 +7,30 @@ static char *sccsId = "@(#) $Id$";
|
||||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.44 1997/04/10 19:26:05 jhill
|
||||
* asynch connect, faster connect, ...
|
||||
*
|
||||
* Revision 1.43 1997/01/22 21:07:27 jhill
|
||||
* fixed array test
|
||||
*
|
||||
* Revision 1.42 1996/12/12 18:51:41 jhill
|
||||
* doc
|
||||
*
|
||||
* Revision 1.41 1996/12/11 01:10:33 jhill
|
||||
* added additional vector tests
|
||||
*
|
||||
* Revision 1.40 1996/11/22 19:07:01 jhill
|
||||
* included string.h
|
||||
*
|
||||
* Revision 1.39 1996/11/02 00:50:36 jhill
|
||||
* many pc port, const in API, and other changes
|
||||
*
|
||||
* Revision 1.37 1996/09/16 16:31:01 jhill
|
||||
* fixed NT warnings
|
||||
*
|
||||
* Revision 1.36 1996/07/24 21:55:33 jhill
|
||||
* fixed gnu warnings
|
||||
*
|
||||
* Revision 1.35 1996/07/01 19:49:15 jhill
|
||||
* turned on analog value wrap-around test
|
||||
*
|
||||
@@ -30,10 +54,6 @@ static char *sccsId = "@(#) $Id$";
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef VMS
|
||||
#include <LIB$ROUTINES.H>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* ANSI
|
||||
*/
|
||||
@@ -41,11 +61,13 @@ static char *sccsId = "@(#) $Id$";
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <float.h>
|
||||
|
||||
#include "os_depen.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <cadef.h>
|
||||
|
||||
/*
|
||||
* CA
|
||||
*/
|
||||
#include "cadef.h"
|
||||
|
||||
#define EVENT_ROUTINE null_event
|
||||
#define CONN_ROUTINE conn
|
||||
@@ -58,6 +80,18 @@ int conn_cb_count;
|
||||
#define min(A,B) ((A)>(B)?(B):(A))
|
||||
#endif
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
#ifndef NELEMENTS
|
||||
#define NELEMENTS(A) (sizeof(A)/sizeof(A[0]))
|
||||
#endif
|
||||
|
||||
int doacctst(char *pname);
|
||||
void test_sync_groups(chid chix);
|
||||
void multiple_sg_requests(chid chix, CA_SYNC_GID gid);
|
||||
@@ -82,6 +116,8 @@ dbr_float_t epsilon,
|
||||
unsigned iterations);
|
||||
|
||||
#ifdef vxWorks
|
||||
#include <vxWorks.h>
|
||||
#include <taskLib.h>
|
||||
int acctst(char *pname)
|
||||
{
|
||||
|
||||
@@ -131,16 +167,19 @@ int doacctst(char *pname)
|
||||
evid monix;
|
||||
char pstring[NUM][MAX_STRING_SIZE];
|
||||
unsigned size;
|
||||
unsigned monCount=0u;
|
||||
|
||||
SEVCHK(ca_task_initialize(), "Unable to initialize");
|
||||
|
||||
conn_cb_count = 0;
|
||||
|
||||
printf("begin\n");
|
||||
#ifdef VMS
|
||||
lib$init_timer();
|
||||
#endif /*VMS*/
|
||||
|
||||
printf("CA Client V%s\n", ca_version());
|
||||
|
||||
/*
|
||||
* CA pend event delay accuracy test
|
||||
*/
|
||||
{
|
||||
TS_STAMP end_time;
|
||||
TS_STAMP start_time;
|
||||
@@ -158,12 +197,28 @@ int doacctst(char *pname)
|
||||
accuracy = 100.0*(delay-request)/request;
|
||||
printf("CA pend event delay accuracy = %f %%\n",
|
||||
accuracy);
|
||||
assert (abs(accuracy) < 10.0);
|
||||
assert (fabs(accuracy) < 10.0);
|
||||
}
|
||||
|
||||
size = dbr_size_n(DBR_GR_FLOAT, NUM);
|
||||
ptr = (struct dbr_gr_float *) malloc(size);
|
||||
|
||||
/*
|
||||
* verify that we dont print a disconnect message when
|
||||
* we delete the last channel
|
||||
* (this fails if we see a disconnect message)
|
||||
*/
|
||||
status = ca_search( pname, &chix3);
|
||||
SEVCHK(status, NULL);
|
||||
status = ca_pend_io(1000.0);
|
||||
SEVCHK(status, NULL);
|
||||
status = ca_clear_channel(chix3);
|
||||
SEVCHK(status, NULL);
|
||||
|
||||
/*
|
||||
* verify lots of disconnects
|
||||
* verify channel connected state variables
|
||||
*/
|
||||
printf("Connect/disconnect test");
|
||||
fflush(stdout);
|
||||
for (i = 0; i < 10; i++) {
|
||||
@@ -183,14 +238,9 @@ int doacctst(char *pname)
|
||||
&chix2);
|
||||
SEVCHK(status, NULL);
|
||||
|
||||
status = ca_build_and_connect(
|
||||
pname,
|
||||
TYPENOTCONN,
|
||||
0,
|
||||
&chix1,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL);
|
||||
status = ca_search(
|
||||
pname,
|
||||
&chix1);
|
||||
SEVCHK(status, NULL);
|
||||
|
||||
if (ca_test_io() == ECA_IOINPROGRESS) {
|
||||
@@ -225,62 +275,207 @@ int doacctst(char *pname)
|
||||
}
|
||||
printf("\n");
|
||||
|
||||
/*
|
||||
* look for problems with ca_search(), ca_clear_channel(),
|
||||
* ca_change_connection_event(), and ca_pend_io(() combo
|
||||
*/
|
||||
status = ca_search(pname,& chix3);
|
||||
SEVCHK(status, NULL);
|
||||
|
||||
status = ca_replace_access_rights_event(chix3, accessSecurity_cb);
|
||||
SEVCHK(status, NULL);
|
||||
|
||||
/*
|
||||
* verify clear before connect
|
||||
*/
|
||||
status = ca_search_and_connect(pname, &chix4, CONN_ROUTINE, NULL);
|
||||
status = ca_search(pname, &chix4);
|
||||
SEVCHK(status, NULL);
|
||||
|
||||
status = ca_clear_channel(chix4);
|
||||
SEVCHK(status, NULL);
|
||||
|
||||
status = ca_search_and_connect(pname, &chix4, CONN_ROUTINE, NULL);
|
||||
status = ca_search(pname, &chix4);
|
||||
SEVCHK(status, NULL);
|
||||
|
||||
status = ca_replace_access_rights_event(chix4, accessSecurity_cb);
|
||||
SEVCHK(status, NULL);
|
||||
|
||||
status = ca_search_and_connect(pname, &chix2, CONN_ROUTINE, NULL);
|
||||
status = ca_search(pname, &chix2);
|
||||
SEVCHK(status, NULL);
|
||||
|
||||
status = ca_replace_access_rights_event(chix2, accessSecurity_cb);
|
||||
SEVCHK(status, NULL);
|
||||
|
||||
status = ca_search_and_connect(pname, &chix1, CONN_ROUTINE, NULL);
|
||||
status = ca_search(pname, &chix1);
|
||||
SEVCHK(status, NULL);
|
||||
|
||||
status = ca_replace_access_rights_event(chix1, accessSecurity_cb);
|
||||
SEVCHK(status, NULL);
|
||||
|
||||
status = ca_change_connection_event(chix1,conn);
|
||||
SEVCHK(status, NULL);
|
||||
|
||||
status = ca_change_connection_event(chix1,NULL);
|
||||
SEVCHK(status, NULL);
|
||||
|
||||
status = ca_change_connection_event(chix1,conn);
|
||||
SEVCHK(status, NULL);
|
||||
|
||||
status = ca_change_connection_event(chix1,NULL);
|
||||
SEVCHK(status, NULL);
|
||||
|
||||
status = ca_pend_io(1000.0);
|
||||
SEVCHK(status, NULL);
|
||||
|
||||
assert(ca_state(chix1) == cs_conn);
|
||||
assert(ca_state(chix2) == cs_conn);
|
||||
assert(ca_state(chix3) == cs_conn);
|
||||
assert(ca_state(chix4) == cs_conn);
|
||||
assert (ca_state(chix1) == cs_conn);
|
||||
assert (ca_state(chix2) == cs_conn);
|
||||
assert (ca_state(chix3) == cs_conn);
|
||||
assert (ca_state(chix4) == cs_conn);
|
||||
|
||||
assert(INVALID_DB_REQ(chix1->type) == FALSE);
|
||||
assert(INVALID_DB_REQ(chix2->type) == FALSE);
|
||||
assert(INVALID_DB_REQ(chix3->type) == FALSE);
|
||||
assert(INVALID_DB_REQ(chix4->type) == FALSE);
|
||||
assert (INVALID_DB_REQ(chix1->type) == FALSE);
|
||||
assert (INVALID_DB_REQ(chix2->type) == FALSE);
|
||||
assert (INVALID_DB_REQ(chix3->type) == FALSE);
|
||||
assert (INVALID_DB_REQ(chix4->type) == FALSE);
|
||||
|
||||
#ifdef VMS
|
||||
lib$show_timer();
|
||||
#endif /*VMS*/
|
||||
/*
|
||||
* clear chans before starting another test
|
||||
*/
|
||||
status = ca_clear_channel(chix1);
|
||||
SEVCHK(status, NULL);
|
||||
status = ca_clear_channel(chix2);
|
||||
SEVCHK(status, NULL);
|
||||
status = ca_clear_channel(chix3);
|
||||
SEVCHK(status, NULL);
|
||||
status = ca_clear_channel(chix4);
|
||||
SEVCHK(status, NULL);
|
||||
|
||||
#ifdef VMS
|
||||
lib$init_timer();
|
||||
#endif /*VMS*/
|
||||
/*
|
||||
* verify ca_pend_io() does not see old search requests
|
||||
* (that did not specify a connection handler)
|
||||
*/
|
||||
status = ca_search_and_connect(pname, &chix1, NULL, NULL);
|
||||
SEVCHK(status, NULL);
|
||||
/*
|
||||
* channel will connect synchronously if on the
|
||||
* local host
|
||||
*/
|
||||
if (ca_state(chix1)==cs_never_conn) {
|
||||
status = ca_pend_io(1e-16);
|
||||
if (status==ECA_TIMEOUT) {
|
||||
assert(ca_state(chix1)==cs_never_conn);
|
||||
|
||||
printf("waiting on pend io verify connect...");
|
||||
fflush(stdout);
|
||||
while (ca_state(chix1)!=cs_conn) {
|
||||
ca_pend_event(0.1);
|
||||
}
|
||||
printf("done\n");
|
||||
|
||||
/*
|
||||
* we end up here if the channel isnt on the same host
|
||||
*/
|
||||
status = ca_search_and_connect(pname, &chix2, NULL, NULL);
|
||||
SEVCHK(status, NULL);
|
||||
status = ca_pend_io(1e-16);
|
||||
if (status==ECA_TIMEOUT) {
|
||||
assert(ca_state(chix2)==cs_never_conn);
|
||||
}
|
||||
else {
|
||||
assert(ca_state(chix2)==cs_conn);
|
||||
}
|
||||
status = ca_clear_channel(chix2);
|
||||
SEVCHK(status, NULL);
|
||||
}
|
||||
else {
|
||||
assert(ca_state(chix1)==cs_conn);
|
||||
}
|
||||
}
|
||||
status = ca_clear_channel(chix1);
|
||||
SEVCHK(status, NULL);
|
||||
|
||||
/*
|
||||
* verify connection handlers are working
|
||||
*/
|
||||
status = ca_search_and_connect(pname, &chix1, conn, NULL);
|
||||
SEVCHK(status, NULL);
|
||||
status = ca_search_and_connect(pname, &chix2, conn, NULL);
|
||||
SEVCHK(status, NULL);
|
||||
status = ca_search_and_connect(pname, &chix3, conn, NULL);
|
||||
SEVCHK(status, NULL);
|
||||
status = ca_search_and_connect(pname, &chix4, conn, NULL);
|
||||
SEVCHK(status, NULL);
|
||||
|
||||
printf("waiting on conn handler call back connect...");
|
||||
fflush(stdout);
|
||||
while (conn_cb_count != 4) {
|
||||
ca_pend_event(0.1);
|
||||
}
|
||||
printf("done\n");
|
||||
|
||||
printf("Read Access=%d Write Access=%d\n",
|
||||
ca_read_access(chix1),
|
||||
ca_write_access(chix1));
|
||||
|
||||
/*
|
||||
* ca_pend_io() must block
|
||||
*/
|
||||
if(ca_read_access(chix4)){
|
||||
dbr_float_t req;
|
||||
dbr_float_t resp;
|
||||
|
||||
printf ("get TMO test ...");
|
||||
fflush(stdout);
|
||||
req = 56.57f;
|
||||
resp = -99.99f;
|
||||
SEVCHK(ca_put(DBR_FLOAT, chix4, &req),NULL);
|
||||
SEVCHK(ca_get(DBR_FLOAT, chix4, &resp),NULL);
|
||||
status = ca_pend_io(1.0e-12);
|
||||
if (status==ECA_NORMAL) {
|
||||
if (resp != req) {
|
||||
printf (
|
||||
"get block test failed - val written %f\n", req);
|
||||
printf (
|
||||
"get block test failed - val read %f\n", resp);
|
||||
assert(0);
|
||||
}
|
||||
}
|
||||
else if (resp != -99.99f) {
|
||||
printf (
|
||||
"CA didnt block for get to return?\n");
|
||||
}
|
||||
|
||||
req = 33.44f;
|
||||
resp = -99.99f;
|
||||
SEVCHK (ca_put(DBR_FLOAT, chix4, &req),NULL);
|
||||
SEVCHK (ca_get(DBR_FLOAT, chix4, &resp),NULL);
|
||||
SEVCHK (ca_pend_io(2000.0),NULL);
|
||||
if (resp != req) {
|
||||
printf (
|
||||
"get block test failed - val written %f\n", req);
|
||||
printf (
|
||||
"get block test failed - val read %f\n", resp);
|
||||
assert(0);
|
||||
}
|
||||
printf ("done\n");
|
||||
}
|
||||
|
||||
/*
|
||||
* Verify that we can do IO with the new types for ALH
|
||||
*/
|
||||
#if 0
|
||||
if(ca_read_access(chix4)&&ca_write_access(chix4)){
|
||||
{
|
||||
dbr_put_ackt_t acktIn=1u;
|
||||
dbr_put_acks_t acksIn=1u;
|
||||
struct dbr_stsack_string stsackOut;
|
||||
|
||||
SEVCHK (ca_put(DBR_PUT_ACKT, chix4, &acktIn),NULL);
|
||||
SEVCHK (ca_put(DBR_PUT_ACKS, chix4, &acksIn),NULL);
|
||||
SEVCHK (ca_get(DBR_STSACK_STRING, chix4, &stsackOut),NULL);
|
||||
SEVCHK (ca_pend_io(2000.0),NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Verify that we can write and then read back
|
||||
* the same analog value (DBR_FLOAT)
|
||||
@@ -290,33 +485,45 @@ int doacctst(char *pname)
|
||||
ca_read_access(chix1) &&
|
||||
ca_write_access(chix1)){
|
||||
|
||||
dbr_double_t incr;
|
||||
dbr_double_t epsil;
|
||||
dbr_double_t base;
|
||||
dbr_float_t incr;
|
||||
dbr_float_t epsil;
|
||||
dbr_float_t base;
|
||||
unsigned long iter;
|
||||
|
||||
printf ("float test ...");
|
||||
fflush(stdout);
|
||||
epsil = FLT_EPSILON*4;
|
||||
epsil = FLT_EPSILON*4.0F;
|
||||
base = FLT_MIN;
|
||||
for (i=FLT_MIN_EXP; i<FLT_MAX_EXP; i+=FLT_MAX_EXP/10) {
|
||||
incr = ldexp (0.5,i);
|
||||
iter = FLT_MAX/fabs(incr);
|
||||
iter = min (iter,10);
|
||||
incr = (dbr_float_t) ldexp (0.5F,i);
|
||||
if (fabs(incr)>FLT_MAX/10.0) {
|
||||
iter = (unsigned long) (FLT_MAX/fabs(incr));
|
||||
}
|
||||
else {
|
||||
iter = 10.0;
|
||||
}
|
||||
floatTest(chix1, base, incr, epsil, iter);
|
||||
}
|
||||
base = FLT_MAX;
|
||||
for (i=FLT_MIN_EXP; i<FLT_MAX_EXP; i+=FLT_MAX_EXP/10) {
|
||||
incr = - ldexp (0.5,i);
|
||||
iter = FLT_MAX/fabs(incr);
|
||||
iter = min (iter,10);
|
||||
incr = (dbr_float_t) - ldexp (0.5F,i);
|
||||
if (fabs(incr)>FLT_MAX/10.0) {
|
||||
iter = (unsigned long) (FLT_MAX/fabs(incr));
|
||||
}
|
||||
else {
|
||||
iter = 10.0;
|
||||
}
|
||||
floatTest(chix1, base, incr, epsil, iter);
|
||||
}
|
||||
base = - FLT_MAX;
|
||||
for (i=FLT_MIN_EXP; i<FLT_MAX_EXP; i+=FLT_MAX_EXP/10) {
|
||||
incr = ldexp (0.5,i);
|
||||
iter = FLT_MAX/fabs(incr);
|
||||
iter = min (iter,10);
|
||||
incr = (dbr_float_t) ldexp (0.5F,i);
|
||||
if (fabs(incr)>FLT_MAX/10.0) {
|
||||
iter = (unsigned long) (FLT_MAX/fabs(incr));
|
||||
}
|
||||
else {
|
||||
iter = 10.0;
|
||||
}
|
||||
floatTest(chix1, base, incr, epsil, iter);
|
||||
}
|
||||
printf ("done\n");
|
||||
@@ -341,54 +548,39 @@ int doacctst(char *pname)
|
||||
base = DBL_MIN;
|
||||
for (i=DBL_MIN_EXP; i<DBL_MAX_EXP; i+=DBL_MAX_EXP/10) {
|
||||
incr = ldexp (0.5,i);
|
||||
iter = DBL_MAX/fabs(incr);
|
||||
iter = min (iter,10);
|
||||
if (fabs(incr)>DBL_MAX/10.0) {
|
||||
iter = (unsigned long) (DBL_MAX/fabs(incr));
|
||||
}
|
||||
else {
|
||||
iter = 10.0;
|
||||
}
|
||||
doubleTest(chix1, base, incr, epsil, iter);
|
||||
}
|
||||
base = DBL_MAX;
|
||||
for (i=DBL_MIN_EXP; i<DBL_MAX_EXP; i+=DBL_MAX_EXP/10) {
|
||||
incr = - ldexp (0.5,i);
|
||||
iter = DBL_MAX/fabs(incr);
|
||||
iter = min (iter,10);
|
||||
if (fabs(incr)>DBL_MAX/10.0) {
|
||||
iter = (unsigned long) (DBL_MAX/fabs(incr));
|
||||
}
|
||||
else {
|
||||
iter = 10.0;
|
||||
}
|
||||
doubleTest(chix1, base, incr, epsil, iter);
|
||||
}
|
||||
base = - DBL_MAX;
|
||||
for (i=DBL_MIN_EXP; i<DBL_MAX_EXP; i+=DBL_MAX_EXP/10) {
|
||||
incr = ldexp (0.5,i);
|
||||
iter = DBL_MAX/fabs(incr);
|
||||
iter = min (iter,10);
|
||||
if (fabs(incr)>DBL_MAX/10.0) {
|
||||
iter = (unsigned long) (DBL_MAX/fabs(incr));
|
||||
}
|
||||
else {
|
||||
iter = 10.0;
|
||||
}
|
||||
doubleTest(chix1, base, incr, epsil, iter);
|
||||
}
|
||||
printf ("done\n");
|
||||
}
|
||||
|
||||
/*
|
||||
* ca_pend_io() must block
|
||||
*/
|
||||
if(ca_read_access(chix4)){
|
||||
dbr_float_t req = 3.3;
|
||||
dbr_float_t resp = 0.0;
|
||||
|
||||
printf ("get TMO test ...");
|
||||
fflush(stdout);
|
||||
SEVCHK(ca_put(DBR_FLOAT, chix4, &req),NULL);
|
||||
SEVCHK(ca_get(DBR_FLOAT, chix4, &resp),NULL);
|
||||
status = ca_pend_io(1.0e-12);
|
||||
if (status==ECA_NORMAL) {
|
||||
assert (resp == req);
|
||||
}
|
||||
else {
|
||||
assert (resp == 0.0);
|
||||
}
|
||||
|
||||
resp = 0.0;
|
||||
SEVCHK (ca_put(DBR_FLOAT, chix4, &req),NULL);
|
||||
SEVCHK (ca_get(DBR_FLOAT, chix4, &resp),NULL);
|
||||
SEVCHK (ca_pend_io(2000.0),NULL);
|
||||
assert (resp == req);
|
||||
printf ("done\n");
|
||||
}
|
||||
|
||||
/*
|
||||
* verify we dont jam up on many uninterrupted
|
||||
* solicitations
|
||||
@@ -458,7 +650,7 @@ int doacctst(char *pname)
|
||||
|
||||
/*
|
||||
* verify we dont jam up on many uninterrupted
|
||||
* solicitations
|
||||
* put callback solicitations
|
||||
*/
|
||||
if(ca_write_access(chix1) && ca_v42_ok(chix1)){
|
||||
unsigned count=0u;
|
||||
@@ -482,12 +674,37 @@ int doacctst(char *pname)
|
||||
printf("waiting...");
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
printf("done.\n");
|
||||
}
|
||||
else{
|
||||
printf("Skipped multiple put cb test - no write access\n");
|
||||
}
|
||||
|
||||
/*
|
||||
* verify that we detect that a large string has been written
|
||||
*/
|
||||
if(ca_write_access(chix1)){
|
||||
dbr_string_t stimStr;
|
||||
dbr_string_t respStr;
|
||||
memset(stimStr, 'a', sizeof(stimStr));
|
||||
status = ca_array_put(DBR_STRING, 1u, chix1, stimStr);
|
||||
assert(status==ECA_STRTOBIG);
|
||||
sprintf(stimStr, "%u", 8u);
|
||||
status = ca_array_put(DBR_STRING, 1u, chix1, stimStr);
|
||||
assert(status==ECA_NORMAL);
|
||||
status = ca_array_get(DBR_STRING, 1u, chix1, respStr);
|
||||
assert(status==ECA_NORMAL);
|
||||
status = ca_pend_io(0.0);
|
||||
assert(status==ECA_NORMAL);
|
||||
printf(
|
||||
"Test fails if stim \"%s\" isnt roughly equiv to resp \"%s\"\n",
|
||||
stimStr, respStr);
|
||||
}
|
||||
else{
|
||||
printf("Skipped bad string test - no write access\n");
|
||||
}
|
||||
|
||||
if(ca_v42_ok(chix1)){
|
||||
test_sync_groups(chix1);
|
||||
}
|
||||
@@ -498,16 +715,21 @@ int doacctst(char *pname)
|
||||
printf("Performing multiple monitor test...");
|
||||
fflush(stdout);
|
||||
{
|
||||
unsigned count=0u;
|
||||
evid mid[1000];
|
||||
dbr_float_t temp;
|
||||
|
||||
for(i=0; i<NELEMENTS(mid); i++){
|
||||
SEVCHK(ca_add_event(DBR_GR_FLOAT, chix4, null_event,
|
||||
NULL, &mid[i]),NULL);
|
||||
&count, &mid[i]),NULL);
|
||||
}
|
||||
/*
|
||||
* force all of the monitors requests to
|
||||
* complete
|
||||
*
|
||||
* NOTE: this hopefully demonstrates that when the
|
||||
* server is very busy with monitors the client
|
||||
* is still able to punch through with a request.
|
||||
*/
|
||||
SEVCHK(ca_get(DBR_FLOAT,chix4,&temp),NULL);
|
||||
SEVCHK(ca_pend_io(1000.0),NULL);
|
||||
@@ -538,7 +760,7 @@ int doacctst(char *pname)
|
||||
DBR_FLOAT,
|
||||
chix4,
|
||||
EVENT_ROUTINE,
|
||||
NULL,
|
||||
&monCount,
|
||||
&monix);
|
||||
SEVCHK(status, NULL);
|
||||
SEVCHK(ca_clear_event(monix), NULL);
|
||||
@@ -546,7 +768,7 @@ int doacctst(char *pname)
|
||||
DBR_FLOAT,
|
||||
chix4,
|
||||
EVENT_ROUTINE,
|
||||
NULL,
|
||||
&monCount,
|
||||
&monix);
|
||||
SEVCHK(status, NULL);
|
||||
}
|
||||
@@ -555,7 +777,7 @@ int doacctst(char *pname)
|
||||
DBR_FLOAT,
|
||||
chix4,
|
||||
EVENT_ROUTINE,
|
||||
NULL,
|
||||
&monCount,
|
||||
&monix);
|
||||
SEVCHK(status, NULL);
|
||||
SEVCHK(ca_clear_event(monix), NULL);
|
||||
@@ -565,14 +787,14 @@ int doacctst(char *pname)
|
||||
DBR_FLOAT,
|
||||
chix3,
|
||||
EVENT_ROUTINE,
|
||||
NULL,
|
||||
&monCount,
|
||||
&monix);
|
||||
SEVCHK(status, NULL);
|
||||
status = ca_add_event(
|
||||
DBR_FLOAT,
|
||||
chix3,
|
||||
write_event,
|
||||
NULL,
|
||||
&monCount,
|
||||
&monix);
|
||||
SEVCHK(status, NULL);
|
||||
}
|
||||
@@ -616,9 +838,77 @@ int doacctst(char *pname)
|
||||
|
||||
SEVCHK(ca_pend_io(4000.0), NULL);
|
||||
|
||||
#ifdef VMS
|
||||
lib$show_timer();
|
||||
#endif /*VMS*/
|
||||
/*
|
||||
* array test
|
||||
* o verifies that we can at least write and read back the same array
|
||||
* if multiple elements are present
|
||||
*/
|
||||
if (VALID_DB_REQ(chix1->type)) {
|
||||
if (ca_element_count(chix1)>1u && ca_read_access(chix1)) {
|
||||
dbr_float_t *pRF, *pWF, *pEF, *pT1, *pT2;
|
||||
|
||||
printf("Performing %u element array test...",
|
||||
ca_element_count(chix1));
|
||||
fflush(stdout);
|
||||
|
||||
pRF = (dbr_float_t *) calloc(ca_element_count(chix1),
|
||||
sizeof(*pRF));
|
||||
assert(pRF!=NULL);
|
||||
|
||||
pWF = (dbr_float_t *)calloc(ca_element_count(chix1),
|
||||
sizeof(*pWF));
|
||||
assert(pWF!=NULL);
|
||||
|
||||
/*
|
||||
* write some random numbers into the array
|
||||
*/
|
||||
if (ca_write_access(chix1)) {
|
||||
pT1 = pWF;
|
||||
pEF = &pWF[ca_element_count(chix1)];
|
||||
while(pT1<pEF) {
|
||||
*pT1++ = rand();
|
||||
}
|
||||
status = ca_array_put(
|
||||
DBR_FLOAT,
|
||||
ca_element_count(chix1),
|
||||
chix1,
|
||||
pWF);
|
||||
SEVCHK(status, "array write request failed");
|
||||
}
|
||||
|
||||
/*
|
||||
* read back the array
|
||||
*/
|
||||
if (ca_read_access(chix1)) {
|
||||
status = ca_array_get(
|
||||
DBR_FLOAT,
|
||||
ca_element_count(chix1),
|
||||
chix1,
|
||||
pRF);
|
||||
SEVCHK(status, "array read request failed");
|
||||
status = ca_pend_io(30.0);
|
||||
SEVCHK(status, "array read failed");
|
||||
}
|
||||
|
||||
/*
|
||||
* verify read response matches values written
|
||||
*/
|
||||
if (ca_read_access(chix1) && ca_write_access(chix1)) {
|
||||
pEF = &pRF[ca_element_count(chix1)];
|
||||
pT1 = pRF;
|
||||
pT2 = pWF;
|
||||
while (pT1<pEF) {
|
||||
assert (*pT1 == *pT2);
|
||||
pT1++;
|
||||
pT2++;
|
||||
}
|
||||
}
|
||||
printf("done\n");
|
||||
free(pRF);
|
||||
free(pWF);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < NUM; i++) {
|
||||
printf("Float value Returned from put/get %f\n", pfloat[i]);
|
||||
printf("Double value Returned from put/get %f\n", pdouble[i]);
|
||||
@@ -634,11 +924,6 @@ int doacctst(char *pname)
|
||||
SEVCHK(ca_modify_user_name("Willma"), NULL);
|
||||
SEVCHK(ca_modify_host_name("Bed Rock"), NULL);
|
||||
|
||||
if (conn_cb_count != 3){
|
||||
printf ("!!!! Connect cb count = %d expected = 3 !!!!\n",
|
||||
conn_cb_count);
|
||||
}
|
||||
|
||||
{
|
||||
TS_STAMP end_time;
|
||||
TS_STAMP start_time;
|
||||
@@ -657,7 +942,6 @@ int doacctst(char *pname)
|
||||
accuracy = 100.0*(delay-request)/request;
|
||||
printf("CA pend event delay accuracy = %f %%\n",
|
||||
accuracy);
|
||||
assert (abs(accuracy) < 10.0);
|
||||
}
|
||||
|
||||
{
|
||||
@@ -754,11 +1038,13 @@ unsigned iterations)
|
||||
|
||||
void null_event(struct event_handler_args args)
|
||||
{
|
||||
static int i;
|
||||
unsigned *pInc = (unsigned *) args.usr;
|
||||
|
||||
if (pInc) {
|
||||
(*pInc)++;
|
||||
if (*pInc%1000u == 0u) {
|
||||
printf("1000 occurred\n");
|
||||
}
|
||||
}
|
||||
#if 0
|
||||
if (ca_state(args.chid)==cs_conn) {
|
||||
@@ -770,11 +1056,6 @@ void null_event(struct event_handler_args args)
|
||||
ca_name(args.chid));
|
||||
}
|
||||
#endif
|
||||
|
||||
if (i++ > 1000) {
|
||||
printf("1000 occurred\n");
|
||||
i = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -844,6 +1125,7 @@ void test_sync_groups(chid chix)
|
||||
|
||||
status = ca_sg_create(&gid2);
|
||||
SEVCHK(status, NULL);
|
||||
|
||||
multiple_sg_requests(chix, gid2);
|
||||
multiple_sg_requests(chix, gid1);
|
||||
status = ca_sg_test(gid2);
|
||||
@@ -854,10 +1136,12 @@ void test_sync_groups(chid chix)
|
||||
SEVCHK(status, "SYNC GRP1");
|
||||
status = ca_sg_block(gid2, 500.0);
|
||||
SEVCHK(status, "SYNC GRP2");
|
||||
|
||||
status = ca_sg_delete(gid2);
|
||||
SEVCHK(status, NULL);
|
||||
status = ca_sg_create(&gid2);
|
||||
SEVCHK(status, NULL);
|
||||
|
||||
multiple_sg_requests(chix, gid1);
|
||||
multiple_sg_requests(chix, gid2);
|
||||
status = ca_sg_block(gid1, 15.0);
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#include <envDefs.h>
|
||||
#include "envDefs.h"
|
||||
|
||||
void caSetupAddrList(
|
||||
ELLLIST *pList,
|
||||
@@ -15,16 +14,18 @@ void caPrintAddrList(ELLLIST *pList);
|
||||
void caDiscoverInterfaces(
|
||||
ELLLIST *pList,
|
||||
SOCKET socket,
|
||||
int port);
|
||||
int port,
|
||||
struct in_addr matchAddr);
|
||||
|
||||
void caAddConfiguredAddr(
|
||||
ELLLIST *pList,
|
||||
ENV_PARAM *pEnv,
|
||||
const ENV_PARAM *pEnv,
|
||||
SOCKET socket,
|
||||
int port);
|
||||
|
||||
int local_addr(SOCKET socket, struct sockaddr_in *plcladdr);
|
||||
unsigned short caFetchPortConfig(ENV_PARAM *pEnv, unsigned short defaultPort);
|
||||
unsigned short caFetchPortConfig(const ENV_PARAM *pEnv,
|
||||
unsigned short defaultPort);
|
||||
|
||||
typedef union ca_addr {
|
||||
struct sockaddr_in in;
|
||||
|
||||
@@ -52,6 +52,7 @@ int cac_select_io(struct timeval *ptimeout, int flags)
|
||||
unsigned long freespace;
|
||||
SOCKET maxfd;
|
||||
caFDInfo *pfdi;
|
||||
int ioPending;
|
||||
|
||||
LOCK;
|
||||
pfdi = (caFDInfo *) ellGet(&ca_static->fdInfoFreeList);
|
||||
@@ -70,11 +71,12 @@ int cac_select_io(struct timeval *ptimeout, int flags)
|
||||
FD_ZERO (&pfdi->writeMask);
|
||||
|
||||
maxfd = 0;
|
||||
ioPending = FALSE;
|
||||
for( piiu = (IIU *) iiuList.node.next;
|
||||
piiu;
|
||||
piiu = (IIU *) piiu->node.next) {
|
||||
|
||||
if (!piiu->conn_up) {
|
||||
if (piiu->state==iiu_disconnected) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -106,40 +108,71 @@ int cac_select_io(struct timeval *ptimeout, int flags)
|
||||
|
||||
/*
|
||||
* Dont bother receiving if we have insufficient
|
||||
* space for the maximum UDP message
|
||||
* space for the maximum UDP message, or space
|
||||
* for one TCP byte.
|
||||
*/
|
||||
if (flags&CA_DO_RECVS) {
|
||||
freespace = cacRingBufferWriteSize (&piiu->recv, TRUE);
|
||||
if (freespace>=piiu->minfreespace) {
|
||||
maxfd = max (maxfd,piiu->sock_chan);
|
||||
FD_SET (piiu->sock_chan, &pfdi->readMask);
|
||||
piiu->recvPending = TRUE;
|
||||
ioPending = TRUE;
|
||||
}
|
||||
else {
|
||||
piiu->recvPending = FALSE;
|
||||
}
|
||||
}
|
||||
else {
|
||||
piiu->recvPending = FALSE;
|
||||
}
|
||||
|
||||
if (flags&CA_DO_SENDS) {
|
||||
if (cacRingBufferReadSize(&piiu->send, FALSE)>0) {
|
||||
maxfd = max (maxfd,piiu->sock_chan);
|
||||
if (flags&CA_DO_SENDS || piiu->pushPending) {
|
||||
if (piiu->state==iiu_connecting) {
|
||||
FD_SET (piiu->sock_chan, &pfdi->writeMask);
|
||||
ioPending = TRUE;
|
||||
}
|
||||
else {
|
||||
if (cacRingBufferReadSize(&piiu->send, FALSE)>0) {
|
||||
maxfd = max (maxfd,piiu->sock_chan);
|
||||
FD_SET (piiu->sock_chan, &pfdi->writeMask);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
UNLOCK;
|
||||
|
||||
# if defined(__hpux)
|
||||
/*
|
||||
* win32 requires this (others will
|
||||
* run faster with this installed)
|
||||
*/
|
||||
if ( !ioPending &&
|
||||
ptimeout->tv_sec==0 &&
|
||||
ptimeout->tv_usec==0 ) {
|
||||
status = 0;
|
||||
}
|
||||
else {
|
||||
# if defined(__hpux)
|
||||
# define HPCAST (int *)
|
||||
# else
|
||||
# define HPCAST
|
||||
# endif
|
||||
status = select(
|
||||
maxfd+1,
|
||||
(int *)&pfdi->readMask,
|
||||
(int *)&pfdi->writeMask,
|
||||
(int *)NULL,
|
||||
HPCAST &pfdi->readMask,
|
||||
HPCAST &pfdi->writeMask,
|
||||
HPCAST NULL,
|
||||
&autoTimeOut);
|
||||
# else
|
||||
status = select(
|
||||
maxfd+1,
|
||||
&pfdi->readMask,
|
||||
&pfdi->writeMask,
|
||||
NULL,
|
||||
&autoTimeOut);
|
||||
# endif
|
||||
if (status<0) {
|
||||
int errnoCpy = SOCKERRNO;
|
||||
|
||||
if (errnoCpy!=EINTR) {
|
||||
ca_printf (
|
||||
"CAC: unexpected select fail: %s\n",
|
||||
strerror(SOCKERRNO));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* get a new time stamp if we have been waiting
|
||||
@@ -149,34 +182,46 @@ int cac_select_io(struct timeval *ptimeout, int flags)
|
||||
cac_gettimeval (&ca_static->currentTime);
|
||||
}
|
||||
|
||||
if (status<0) {
|
||||
if (MYERRNO == EINTR) {
|
||||
}
|
||||
else if (MYERRNO == EWOULDBLOCK) {
|
||||
ca_printf("CAC: blocked at select ?\n");
|
||||
}
|
||||
else if (MYERRNO == ESRCH) {
|
||||
}
|
||||
else {
|
||||
ca_printf (
|
||||
"CAC: unexpected select fail: %s\n",
|
||||
strerror(MYERRNO));
|
||||
}
|
||||
}
|
||||
|
||||
LOCK;
|
||||
if (status>0) {
|
||||
/*
|
||||
* must run through the IIU list even if no IO is pending
|
||||
* if any of the IOCs are in flow control (so that an exit
|
||||
* flow control msg can be sent to each of them that are)
|
||||
*/
|
||||
if (status>0 ||
|
||||
(ca_static->ca_number_iiu_in_fc>0u&&status>=0) ) {
|
||||
for ( piiu = (IIU *) iiuList.node.next;
|
||||
piiu;
|
||||
piiu = (IIU *) piiu->node.next) {
|
||||
|
||||
if (!piiu->conn_up) {
|
||||
if (piiu->state==iiu_disconnected) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (FD_ISSET(piiu->sock_chan,&pfdi->readMask)) {
|
||||
(*piiu->recvBytes)(piiu);
|
||||
/*
|
||||
* if we were not blocking and there is a
|
||||
* message present then start to suspect that
|
||||
* we are getting behind
|
||||
*/
|
||||
if (piiu->sock_proto==IPPROTO_TCP) {
|
||||
if (ptimeout->tv_sec==0
|
||||
|| ptimeout->tv_usec==0) {
|
||||
flow_control_on(piiu);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (piiu->recvPending) {
|
||||
/*
|
||||
* if we are looking for incoming messages
|
||||
* and there are none then we are certain that
|
||||
* we are not getting behind
|
||||
*/
|
||||
if (piiu->sock_proto==IPPROTO_TCP) {
|
||||
flow_control_off(piiu);
|
||||
}
|
||||
}
|
||||
|
||||
if (FD_ISSET(piiu->sock_chan,&pfdi->writeMask)) {
|
||||
(*piiu->sendBytes)(piiu);
|
||||
|
||||
59
src/ca/ca.def
Normal file
59
src/ca/ca.def
Normal file
@@ -0,0 +1,59 @@
|
||||
LIBRARY ca
|
||||
|
||||
VERSION 13
|
||||
CODE PRELOAD MOVEABLE DISCARDABLE
|
||||
DATA PRELOAD SINGLE
|
||||
|
||||
|
||||
EXPORTS
|
||||
|
||||
ca_version
|
||||
ca_test_event
|
||||
ca_task_initialize
|
||||
ca_task_exit
|
||||
ca_search_and_connect
|
||||
ca_build_and_connect
|
||||
ca_change_connection_event
|
||||
ca_replace_access_rights_event
|
||||
ca_add_exception_event
|
||||
ca_clear_channel
|
||||
ca_array_put
|
||||
ca_array_put_callback
|
||||
ca_array_get
|
||||
ca_array_get_callback
|
||||
ca_add_masked_array_event
|
||||
ca_clear_event
|
||||
ca_pend
|
||||
ca_repeater
|
||||
ca_test_io
|
||||
ca_flush_io
|
||||
ca_signal
|
||||
ca_signal_with_file_and_lineno
|
||||
ca_host_name_function
|
||||
ca_add_fd_registration
|
||||
ca_sg_create
|
||||
ca_sg_delete
|
||||
ca_sg_block
|
||||
ca_sg_test
|
||||
ca_sg_reset
|
||||
ca_sg_array_get
|
||||
ca_sg_array_put
|
||||
ca_modify_user_name
|
||||
ca_modify_host_name
|
||||
ca_v42_ok
|
||||
caFetchPortConfig
|
||||
caAddConfiguredAddr
|
||||
caDiscoverInterfaces
|
||||
ca_printf
|
||||
ca_message_text
|
||||
ca_message
|
||||
cac_gettimeval
|
||||
dbr_value_size
|
||||
dbr_value_offset
|
||||
dbf_text
|
||||
dbf_text_invalid
|
||||
dbf_text_dim
|
||||
dbr_text
|
||||
dbr_text_invalid
|
||||
dbr_text_dim
|
||||
dbr_size
|
||||
@@ -29,6 +29,12 @@
|
||||
*
|
||||
* History
|
||||
* $Log$
|
||||
* Revision 1.2 1996/09/16 16:32:49 jhill
|
||||
* added CA version string
|
||||
*
|
||||
* Revision 1.1 1996/06/20 18:02:22 jhill
|
||||
* installed into CVS
|
||||
*
|
||||
* Revision 1.1.1.1 1996/06/20 00:28:15 jhill
|
||||
* ca server installation
|
||||
*
|
||||
@@ -62,6 +68,12 @@
|
||||
*
|
||||
* .10 050594 joh New command added for CA V4.3 - wakeup the server
|
||||
* $Log$
|
||||
* Revision 1.2 1996/09/16 16:32:49 jhill
|
||||
* added CA version string
|
||||
*
|
||||
* Revision 1.1 1996/06/20 18:02:22 jhill
|
||||
* installed into CVS
|
||||
*
|
||||
* Revision 1.1.1.1 1996/06/20 00:28:15 jhill
|
||||
* ca server installation
|
||||
*
|
||||
@@ -70,9 +82,13 @@
|
||||
|
||||
#define __CAPROTO__
|
||||
|
||||
/* TCP/UDP port number (bumped each protocol change) */
|
||||
/*
|
||||
* CA protocol number
|
||||
* TCP/UDP port number (bumped each major protocol change)
|
||||
*/
|
||||
#define CA_PROTOCOL_VERSION 4u
|
||||
#define CA_MINOR_VERSION 7u
|
||||
#define CA_VERSION_STRING "4.7"
|
||||
#define CA_UKN_MINOR_VERSION 0u /* unknown minor version */
|
||||
#if CA_PROTOCOL_VERSION == 4u
|
||||
#define CA_V41(MAJOR,MINOR) ((MINOR)>=1u)
|
||||
|
||||
@@ -19,11 +19,12 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <iocinf.h>
|
||||
#include "iocinf.h"
|
||||
|
||||
main()
|
||||
int main()
|
||||
{
|
||||
ca_repeater ();
|
||||
assert (0);
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
1116
src/ca/cadef.h
1116
src/ca/cadef.h
File diff suppressed because it is too large
Load Diff
@@ -47,8 +47,8 @@
|
||||
#ifndef INCLcaerrh
|
||||
#define INCLcaerrh
|
||||
|
||||
#include <shareLib.h>
|
||||
#include <epicsTypes.h>
|
||||
#include "shareLib.h"
|
||||
#include "epicsTypes.h"
|
||||
|
||||
#ifndef HDRVERSIONID
|
||||
# define HDRVERSIONID(NAME,VERS)
|
||||
@@ -213,9 +213,19 @@ READONLY char *ca_message_text[]
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef __STDC__
|
||||
READONLY char *ca_message(long ca_status);
|
||||
#else /* __STDC__ */
|
||||
#ifdef __STDC__
|
||||
#define CAERR_USE_FUNC_PROTO
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifndef CAERR_USE_FUNC_PROTO
|
||||
#define CAERR_USE_FUNC_PROTO
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CAERR_USE_FUNC_PROTO
|
||||
epicsShareFunc READONLY char * epicsShareAPI ca_message(long ca_status);
|
||||
#else /* CAERR_USE_FUNC_PROTO */
|
||||
READONLY char *ca_message();
|
||||
#endif
|
||||
|
||||
|
||||
139
src/ca/catime.c
139
src/ca/catime.c
@@ -12,9 +12,11 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <float.h>
|
||||
|
||||
#include <epicsAssert.h>
|
||||
#include <cadef.h>
|
||||
#include "epicsAssert.h"
|
||||
#include "cadef.h"
|
||||
|
||||
#ifndef LOCAL
|
||||
#define LOCAL static
|
||||
@@ -36,7 +38,11 @@
|
||||
#define NELEMENTS(A) (sizeof (A) / sizeof ((A) [0]))
|
||||
#endif
|
||||
|
||||
#ifdef vxWorks
|
||||
#define ITERATION_COUNT 1000
|
||||
#else
|
||||
#define ITERATION_COUNT 10000
|
||||
#endif
|
||||
|
||||
#define WAIT_FOR_ACK
|
||||
|
||||
@@ -50,7 +56,9 @@ typedef struct testItem {
|
||||
|
||||
ti itemList[ITERATION_COUNT];
|
||||
|
||||
int catime (char *channelName);
|
||||
enum appendNumberFlag {appendNumber, dontAppendNumber};
|
||||
|
||||
int catime (char *channelName, enum appendNumberFlag appNF);
|
||||
|
||||
typedef void tf (ti *pItems, unsigned iterations, unsigned *pInlineIter);
|
||||
|
||||
@@ -59,8 +67,11 @@ LOCAL void test (
|
||||
unsigned iterations
|
||||
);
|
||||
|
||||
LOCAL void printSearchStat(unsigned iterations);
|
||||
|
||||
LOCAL tf test_pend;
|
||||
LOCAL tf test_search;
|
||||
LOCAL tf test_sync_search;
|
||||
LOCAL tf test_free;
|
||||
LOCAL tf test_wait;
|
||||
LOCAL tf test_put;
|
||||
@@ -78,13 +89,19 @@ int main(int argc, char **argv)
|
||||
{
|
||||
char *pname;
|
||||
|
||||
if(argc == 2){
|
||||
pname = argv[1];
|
||||
catime(pname);
|
||||
if(argc <= 1 || argc>3){
|
||||
printf("usage: %s <channel name> [<if 2nd arg present append number to pv name>]\n",
|
||||
argv[0]);
|
||||
return -1;
|
||||
}
|
||||
else{
|
||||
printf("usage: %s <channel name>\n", argv[0]);
|
||||
return -1;
|
||||
pname = argv[1];
|
||||
if (argc==3) {
|
||||
catime(pname, appendNumber);
|
||||
}
|
||||
else {
|
||||
catime(pname, dontAppendNumber);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -94,25 +111,54 @@ int main(int argc, char **argv)
|
||||
/*
|
||||
* catime ()
|
||||
*/
|
||||
int catime (char *channelName)
|
||||
int catime (char *channelName, enum appendNumberFlag appNF)
|
||||
{
|
||||
long i;
|
||||
unsigned strsize;
|
||||
|
||||
SEVCHK (ca_task_initialize(),"Unable to initialize");
|
||||
|
||||
if (appNF==appendNumber) {
|
||||
printf("Testing with %lu channels named %snnn\n",
|
||||
(unsigned long) NELEMENTS(itemList), channelName);
|
||||
}
|
||||
else {
|
||||
printf("Testing with %lu channels named %s\n",
|
||||
(unsigned long) NELEMENTS(itemList), channelName);
|
||||
}
|
||||
|
||||
strsize = sizeof(itemList[i].name)-1;
|
||||
for (i=0; i<NELEMENTS(itemList); i++) {
|
||||
strncpy (
|
||||
itemList[i].name,
|
||||
channelName,
|
||||
strsize);
|
||||
if (appNF==appendNumber) {
|
||||
sprintf(itemList[i].name,"%.*s%lu",
|
||||
(int) (strsize - 15u), channelName, i);
|
||||
}
|
||||
else {
|
||||
strncpy (
|
||||
itemList[i].name,
|
||||
channelName,
|
||||
strsize);
|
||||
}
|
||||
itemList[i].name[strsize]= '\0';
|
||||
itemList[i].count = 1;
|
||||
}
|
||||
|
||||
printf ("sync search test\n");
|
||||
assert (100u<=NELEMENTS(itemList));
|
||||
timeIt (test_sync_search, itemList, 100u);
|
||||
printSearchStat(100u);
|
||||
|
||||
printf ("free test\n");
|
||||
timeIt (test_free, itemList, 100u);
|
||||
|
||||
printf ("waiting for the server to reply to free requests...");
|
||||
fflush (stdout);
|
||||
ca_pend_event(1.0);
|
||||
printf ("hopefully done\n");
|
||||
|
||||
printf ("search test\n");
|
||||
timeIt (test_search, itemList, NELEMENTS(itemList));
|
||||
printSearchStat(NELEMENTS(itemList));
|
||||
|
||||
printf (
|
||||
"channel name=%s, native type=%d, native count=%d\n",
|
||||
@@ -152,6 +198,36 @@ int catime (char *channelName)
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* printSearchStat()
|
||||
*/
|
||||
LOCAL void printSearchStat(unsigned iterations)
|
||||
{
|
||||
ti *pi;
|
||||
double X = 0u;
|
||||
double XX = 0u;
|
||||
double max = DBL_MIN;
|
||||
double min = DBL_MAX;
|
||||
double mean;
|
||||
double stdDev;
|
||||
|
||||
for (pi=itemList; pi<&itemList[iterations]; pi++) {
|
||||
double retry = pi->chix->retry;
|
||||
X += retry;
|
||||
XX += retry*retry;
|
||||
if (retry>max) {
|
||||
max = retry;
|
||||
}
|
||||
if (retry<min) {
|
||||
min = retry;
|
||||
}
|
||||
}
|
||||
|
||||
mean = X/iterations;
|
||||
stdDev = sqrt(XX/iterations - mean*mean);
|
||||
printf ("Search tries per chan - mean=%f std dev=%f min=%f max=%f\n",
|
||||
mean, stdDev, min, max);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
@@ -196,12 +272,20 @@ void timeIt(
|
||||
assert (status == S_ts_OK);
|
||||
#endif
|
||||
TsDiffAsDouble(&delay,&end_time,&start_time);
|
||||
printf ("Elapsed Per Item = %f\n", delay/(iterations*inlineIter));
|
||||
if (delay>0.0) {
|
||||
printf ("Elapsed Per Item = %12.8f sec (%10.1f Items per sec)\n",
|
||||
delay/(iterations*inlineIter),
|
||||
(iterations*inlineIter)/delay);
|
||||
}
|
||||
else {
|
||||
printf ("Elapsed Per Item = %12.8f sec\n",
|
||||
delay/(iterations*inlineIter));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* test_search ()
|
||||
* test_pend()
|
||||
*/
|
||||
LOCAL void test_pend(
|
||||
ti *pItems,
|
||||
@@ -262,6 +346,31 @@ unsigned *pInlineIter
|
||||
*pInlineIter = 1;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* test_sync_search()
|
||||
*/
|
||||
LOCAL void test_sync_search(
|
||||
ti *pItems,
|
||||
unsigned iterations,
|
||||
unsigned *pInlineIter
|
||||
)
|
||||
{
|
||||
ti *pi;
|
||||
int status;
|
||||
|
||||
for (pi=pItems; pi<&pItems[iterations]; pi++) {
|
||||
status = ca_search (
|
||||
pi->name,
|
||||
&pi->chix);
|
||||
SEVCHK (status, NULL);
|
||||
status = ca_pend_io(0.0);
|
||||
SEVCHK (status, NULL);
|
||||
}
|
||||
|
||||
*pInlineIter = 1;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* test_free ()
|
||||
|
||||
630
src/ca/conn.c
630
src/ca/conn.c
@@ -30,6 +30,15 @@
|
||||
/* (dont send all chans in a block) */
|
||||
/* */
|
||||
/* $Log$
|
||||
* Revision 1.37 1996/11/02 00:50:46 jhill
|
||||
* many pc port, const in API, and other changes
|
||||
*
|
||||
* Revision 1.36 1996/09/16 16:35:22 jhill
|
||||
* local exceptions => exception handler
|
||||
*
|
||||
* Revision 1.35 1996/06/19 17:59:04 jhill
|
||||
* many 3.13 beta changes
|
||||
*
|
||||
* Revision 1.34 1995/08/22 00:19:21 jhill
|
||||
* use current time var to init time stamp in a beacon hash entry
|
||||
* */
|
||||
@@ -57,22 +66,23 @@ LOCAL void logRetryInterval(char *pFN, unsigned lineno);
|
||||
#define LOGRETRYINTERVAL
|
||||
#endif
|
||||
|
||||
LOCAL void retrySearchRequest(int silent);
|
||||
LOCAL void retrySearchRequest();
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
* MANAGE_CONN
|
||||
*
|
||||
* retry disconnected channels
|
||||
* manages
|
||||
* o retry of disconnected channels
|
||||
* o connection heart beats
|
||||
*
|
||||
*
|
||||
*/
|
||||
void manage_conn(int silent)
|
||||
void manage_conn()
|
||||
{
|
||||
IIU *piiu;
|
||||
ca_real delay;
|
||||
long idelay;
|
||||
|
||||
/*
|
||||
* prevent recursion
|
||||
@@ -92,7 +102,7 @@ void manage_conn(int silent)
|
||||
piiu;
|
||||
piiu = (IIU *) piiu->node.next){
|
||||
|
||||
if (piiu == piiuCast || !piiu->conn_up) {
|
||||
if (piiu==piiuCast || piiu->state!=iiu_connected) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -172,7 +182,7 @@ void manage_conn(int silent)
|
||||
/*
|
||||
* Stop here if there are not any disconnected channels
|
||||
*/
|
||||
if(!piiuCast) {
|
||||
if (!piiuCast) {
|
||||
ca_static->ca_manage_conn_active = FALSE;
|
||||
return;
|
||||
}
|
||||
@@ -181,36 +191,224 @@ void manage_conn(int silent)
|
||||
return;
|
||||
}
|
||||
|
||||
if(ca_static->ca_conn_next_retry.tv_sec == CA_CURRENT_TIME.tv_sec &&
|
||||
ca_static->ca_conn_next_retry.tv_usec == CA_CURRENT_TIME.tv_usec){
|
||||
ca_static->ca_conn_next_retry = ca_static->currentTime;
|
||||
LOGRETRYINTERVAL
|
||||
}
|
||||
|
||||
delay = cac_time_diff (
|
||||
&ca_static->ca_conn_next_retry,
|
||||
&ca_static->currentTime);
|
||||
|
||||
if (delay > 0.0) {
|
||||
ca_static->ca_manage_conn_active = FALSE;
|
||||
/*
|
||||
* the retry sequence number if we have tried a reasonable
|
||||
* number of times and if the retry delay has expired
|
||||
*
|
||||
* (search_retry increments once all channels have received this
|
||||
* number of tries)
|
||||
*/
|
||||
if (delay <= 0.0 && ca_static->ca_search_retry < MAXCONNTRIES) {
|
||||
retrySearchRequest ();
|
||||
}
|
||||
|
||||
ca_static->ca_manage_conn_active = FALSE;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* retrySearchRequest ()
|
||||
*/
|
||||
LOCAL void retrySearchRequest ()
|
||||
{
|
||||
ciu chan;
|
||||
ciu firstChan;
|
||||
int status;
|
||||
unsigned nSent=0u;
|
||||
|
||||
if (!piiuCast) {
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* the retry sequence number
|
||||
* (increments once all channels have received this
|
||||
* number of tries)
|
||||
* check to see if there is nothing to do here
|
||||
*/
|
||||
if (ca_static->ca_search_retry >= MAXCONNTRIES) {
|
||||
ca_static->ca_manage_conn_active = FALSE;
|
||||
return;
|
||||
if (ellCount(&piiuCast->chidlist)==0) {
|
||||
return;
|
||||
}
|
||||
|
||||
retrySearchRequest (silent);
|
||||
LOCK;
|
||||
|
||||
/*
|
||||
* dynamically adjust the number of UDP frames per
|
||||
* try depending how many search requests are not
|
||||
* replied to
|
||||
*
|
||||
* This determines how many search request can be
|
||||
* sent together (at the same instant in time).
|
||||
*
|
||||
* The variable ca_static->ca_frames_per_try
|
||||
* determines the number of UDP frames to be sent
|
||||
* each time that retrySearchRequest() is called.
|
||||
* If this value is too high we will waste some
|
||||
* network bandwidth. If it is too low we will
|
||||
* use very little of the incoming UDP message
|
||||
* buffer associated with the server's port and
|
||||
* will therefore take longer to connect. We
|
||||
* initialize ca_static->ca_frames_per_try
|
||||
* to a prime number so that it is less likely that the
|
||||
* same channel is in the last UDP frame
|
||||
* sent every time that this is called (and
|
||||
* potentially discarded by a CA server with
|
||||
* a small UDP input queue).
|
||||
*/
|
||||
|
||||
/*
|
||||
* increase rapidly if we see better than a 75% success rate
|
||||
*/
|
||||
if (ca_static->ca_search_responses >
|
||||
(ca_static->ca_search_tries-(ca_static->ca_search_tries/4u)) ) {
|
||||
/*
|
||||
* double UDP frames per try if we have a good score
|
||||
*/
|
||||
if (ca_static->ca_frames_per_try < (UINT_MAX/2u) ) {
|
||||
ca_static->ca_frames_per_try += ca_static->ca_frames_per_try;
|
||||
#ifdef DEBUG
|
||||
printf ("Increasing frame count to %u t=%u r=%u\n",
|
||||
ca_static->ca_frames_per_try, ca_static->ca_search_tries,
|
||||
ca_static->ca_search_responses);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
/*
|
||||
* if we have less than a 50% success rate then reduce the count gradually
|
||||
*/
|
||||
else if (ca_static->ca_search_responses < (ca_static->ca_search_tries/2u) ) {
|
||||
if (ca_static->ca_frames_per_try>1u) {
|
||||
ca_static->ca_frames_per_try--;
|
||||
#ifdef DEBUG
|
||||
printf ("Decreasing frame count to %u t=%u r=%u\n",
|
||||
ca_static->ca_frames_per_try, ca_static->ca_search_tries,
|
||||
ca_static->ca_search_responses);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* a successful search_msg() sends channel to
|
||||
* the end of the list
|
||||
*/
|
||||
firstChan = chan = (ciu) ellFirst (&piiuCast->chidlist);
|
||||
while (chan) {
|
||||
|
||||
ca_static->ca_min_retry =
|
||||
min(ca_static->ca_min_retry, chan->retry);
|
||||
|
||||
/*
|
||||
* clear counter when we reach the end of the list
|
||||
*
|
||||
* if we are making some progress then
|
||||
* dont increase the delay between search
|
||||
* requests
|
||||
*/
|
||||
if (ca_static->ca_pEndOfBCastList == chan) {
|
||||
if (ca_static->ca_search_responses==0u) {
|
||||
cacSetRetryInterval(ca_static->ca_min_retry+1u);
|
||||
}
|
||||
else {
|
||||
ca_static->ca_search_responses=0u;
|
||||
}
|
||||
ca_static->ca_search_tries = 0u;
|
||||
ca_static->ca_min_retry = UINT_MAX;
|
||||
}
|
||||
|
||||
/*
|
||||
* this moves the channel to the end of the
|
||||
* list (if successful)
|
||||
*/
|
||||
status = search_msg (chan, DONTREPLY);
|
||||
if (status != ECA_NORMAL) {
|
||||
nSent++;
|
||||
|
||||
/*
|
||||
* flush out the search request buffer
|
||||
*/
|
||||
(*piiuCast->sendBytes)(piiuCast);
|
||||
|
||||
/*
|
||||
* try again
|
||||
*/
|
||||
status = search_msg (chan, DONTREPLY);
|
||||
if (status != ECA_NORMAL) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (nSent>=ca_static->ca_frames_per_try) {
|
||||
break;
|
||||
}
|
||||
|
||||
chan = (ciu) ellFirst (&piiuCast->chidlist);
|
||||
|
||||
/*
|
||||
* dont send any of the channels twice within one try
|
||||
*/
|
||||
if (chan==firstChan) {
|
||||
/*
|
||||
* add one to nSent because there may be
|
||||
* one more partial frame to be sent
|
||||
*/
|
||||
nSent++;
|
||||
|
||||
/*
|
||||
* cap ca_static->ca_frames_per_try to
|
||||
* the number of frames required for all of
|
||||
* the unresolved channels
|
||||
*/
|
||||
if (ca_static->ca_frames_per_try>nSent) {
|
||||
ca_static->ca_frames_per_try = nSent;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
UNLOCK;
|
||||
|
||||
ca_static->ca_conn_next_retry =
|
||||
cac_time_sum (
|
||||
&ca_static->currentTime,
|
||||
&ca_static->ca_conn_retry_delay);
|
||||
LOGRETRYINTERVAL
|
||||
}
|
||||
|
||||
/*
|
||||
* cacClrSearchCounters()
|
||||
* (reset broadcasted search counters)
|
||||
*/
|
||||
void cacClrSearchCounters()
|
||||
{
|
||||
ca_static->ca_search_responses = 0u;
|
||||
ca_static->ca_search_tries = 0;
|
||||
ca_static->ca_frames_per_try = TRIESPERFRAME;
|
||||
ca_static->ca_conn_next_retry = ca_static->currentTime;
|
||||
cacSetRetryInterval(0u);
|
||||
}
|
||||
|
||||
/*
|
||||
* cacSetRetryInterval()
|
||||
* (sets the interval between search tries)
|
||||
*/
|
||||
void cacSetRetryInterval(unsigned retryNo)
|
||||
{
|
||||
long idelay;
|
||||
ca_real delay;
|
||||
|
||||
/*
|
||||
* NOOP if no change
|
||||
*/
|
||||
if (ca_static->ca_search_retry == retryNo) {
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* set the retry interval
|
||||
*/
|
||||
ca_static->ca_search_retry = retryNo;
|
||||
assert(ca_static->ca_search_retry < CHAR_BIT*sizeof(idelay));
|
||||
idelay = 1;
|
||||
idelay = idelay << ca_static->ca_search_retry;
|
||||
@@ -220,104 +418,6 @@ void manage_conn(int silent)
|
||||
ca_static->ca_conn_retry_delay.tv_sec = idelay;
|
||||
ca_static->ca_conn_retry_delay.tv_usec =
|
||||
(long) ((delay-idelay)*USEC_PER_SEC);
|
||||
ca_static->ca_conn_next_retry =
|
||||
cac_time_sum (
|
||||
&ca_static->currentTime,
|
||||
&ca_static->ca_conn_retry_delay);
|
||||
LOGRETRYINTERVAL
|
||||
|
||||
ca_static->ca_manage_conn_active = FALSE;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* retrySearchRequest ()
|
||||
*/
|
||||
LOCAL void retrySearchRequest (int silent)
|
||||
{
|
||||
ELLLIST channelsSent;
|
||||
chid chix;
|
||||
unsigned min_retry_num;
|
||||
unsigned retry_cnt = 0;
|
||||
unsigned retry_cnt_no_handler = 0;
|
||||
int status;
|
||||
|
||||
if (!piiuCast) {
|
||||
return;
|
||||
}
|
||||
|
||||
ellInit (&channelsSent);
|
||||
|
||||
LOCK;
|
||||
min_retry_num = MAXCONNTRIES;
|
||||
while (chix = (chid) ellGet (&piiuCast->chidlist)) {
|
||||
|
||||
ellAdd (&channelsSent, &chix->node);
|
||||
|
||||
min_retry_num = min (min_retry_num, chix->retry);
|
||||
|
||||
if (chix->retry <= ca_static->ca_search_retry) {
|
||||
|
||||
status = search_msg (chix, DONTREPLY);
|
||||
if (status == ECA_NORMAL) {
|
||||
retry_cnt++;
|
||||
if (!(silent || chix->pConnFunc)) {
|
||||
ca_signal (
|
||||
ECA_CHIDNOTFND,
|
||||
(char *)(chix+1));
|
||||
retry_cnt_no_handler++;
|
||||
}
|
||||
}
|
||||
else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* if we saw the entire list
|
||||
*/
|
||||
if (chix==NULL) {
|
||||
/*
|
||||
* increment the retry sequence number
|
||||
* (only if we get no responses during a sequence)
|
||||
*/
|
||||
if (ca_static->ca_search_retry<MAXCONNTRIES
|
||||
&& ca_static->ca_search_responses==0) {
|
||||
ca_static->ca_search_retry++;
|
||||
}
|
||||
|
||||
/*
|
||||
* jump to the minimum retry number
|
||||
*/
|
||||
if (ca_static->ca_search_retry<min_retry_num) {
|
||||
ca_static->ca_search_retry = min_retry_num;
|
||||
ca_static->ca_search_responses = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* return channels sent to main cast IIU's
|
||||
* channel prior to removing the lock
|
||||
*
|
||||
* This reorders the list so that each channel
|
||||
* get a fair chance to connect
|
||||
*/
|
||||
ellConcat (&piiuCast->chidlist, &channelsSent);
|
||||
|
||||
/*
|
||||
* LOCK around use of the sprintf buffer
|
||||
*/
|
||||
if (retry_cnt) {
|
||||
if (!silent && retry_cnt_no_handler) {
|
||||
sprintf (
|
||||
sprintf_buf,
|
||||
"%d channels outstanding",
|
||||
retry_cnt);
|
||||
ca_signal (ECA_CHIDRETRY, sprintf_buf);
|
||||
}
|
||||
}
|
||||
UNLOCK;
|
||||
}
|
||||
|
||||
|
||||
@@ -356,18 +456,12 @@ LOCAL void logRetryInterval(char *pFN, unsigned lineno)
|
||||
*/
|
||||
void mark_server_available(const struct in_addr *pnet_addr)
|
||||
{
|
||||
chid chan;
|
||||
ciu chan;
|
||||
ca_real currentPeriod;
|
||||
bhe *pBHE;
|
||||
unsigned port;
|
||||
int netChange = FALSE;
|
||||
|
||||
/*
|
||||
* if timers have expired take care of them
|
||||
* before they are reset
|
||||
*/
|
||||
manage_conn(TRUE);
|
||||
|
||||
if(!piiuCast){
|
||||
return;
|
||||
}
|
||||
@@ -377,70 +471,131 @@ void mark_server_available(const struct in_addr *pnet_addr)
|
||||
* look for it in the hash table
|
||||
*/
|
||||
pBHE = lookupBeaconInetAddr(pnet_addr);
|
||||
if(pBHE){
|
||||
|
||||
if(!pBHE){
|
||||
/*
|
||||
* if we have seen the beacon before ignore it
|
||||
* (unless there is an unusual change in its period)
|
||||
* wait until 2nd beacon is seen before deciding
|
||||
* if it is a new server (or just the first
|
||||
* time that we have seen a server's beacon
|
||||
* shortly after the program started up)
|
||||
*/
|
||||
createBeaconHashEntry(pnet_addr, TRUE);
|
||||
UNLOCK;
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* update time stamp and average period
|
||||
/*
|
||||
* if we have seen the beacon before ignore it
|
||||
* (unless there is an unusual change in its period)
|
||||
*/
|
||||
|
||||
/*
|
||||
* compute the beacon period (if we have seen at least two beacons)
|
||||
*/
|
||||
if (pBHE->timeStamp.tv_sec==0 && pBHE->timeStamp.tv_usec==0) {
|
||||
/*
|
||||
* this is the 1st beacon seen
|
||||
* (nothing to do but set the beacon time stamp)
|
||||
*/
|
||||
pBHE->timeStamp = ca_static->currentTime;
|
||||
UNLOCK;
|
||||
return;
|
||||
}
|
||||
else {
|
||||
currentPeriod = cac_time_diff (
|
||||
&ca_static->currentTime,
|
||||
&pBHE->timeStamp);
|
||||
/*
|
||||
* update the average
|
||||
*/
|
||||
pBHE->averagePeriod += currentPeriod;
|
||||
pBHE->averagePeriod /= 2.0;
|
||||
pBHE->timeStamp = ca_static->currentTime;
|
||||
|
||||
if ((currentPeriod/4.0)>=pBHE->averagePeriod) {
|
||||
if (pBHE->averagePeriod<0.0) {
|
||||
ca_real totRunningTime;
|
||||
/*
|
||||
* this is the 2nd beacon seen
|
||||
* (init the average period)
|
||||
*/
|
||||
totRunningTime = cac_time_diff (
|
||||
&pBHE->timeStamp,
|
||||
&ca_static->programBeginTime);
|
||||
pBHE->averagePeriod = currentPeriod;
|
||||
if (currentPeriod<=totRunningTime) {
|
||||
/*
|
||||
* this is a beacon seen for the first
|
||||
* time because the host was reinitialized
|
||||
* or because a network link was restored
|
||||
*
|
||||
* this is not a beacon seen for the first
|
||||
* time just after program init
|
||||
*/
|
||||
netChange = TRUE;
|
||||
#ifdef DEBUG
|
||||
ca_printf(
|
||||
"net resume seen %x cur=%d avg=%d\n",
|
||||
pnet_addr->s_addr,
|
||||
currentPeriod,
|
||||
pBHE->averagePeriod);
|
||||
ca_printf(
|
||||
"new server at %x cur=%f avg=%f\n",
|
||||
pnet_addr->s_addr,
|
||||
currentPeriod,
|
||||
pBHE->averagePeriod);
|
||||
#endif
|
||||
netChange = TRUE;
|
||||
}
|
||||
}
|
||||
else {
|
||||
/*
|
||||
* this is any other beacon
|
||||
* (update a running average)
|
||||
*/
|
||||
pBHE->averagePeriod += currentPeriod;
|
||||
pBHE->averagePeriod /= 2.0;
|
||||
|
||||
/*
|
||||
* is this an IOC seen because of a restored
|
||||
* network segment
|
||||
*/
|
||||
if ((currentPeriod/4.0)>=pBHE->averagePeriod) {
|
||||
#ifdef DEBUG
|
||||
ca_printf(
|
||||
"net resume seen %x cur=%f avg=%f\n",
|
||||
pnet_addr->s_addr,
|
||||
currentPeriod,
|
||||
pBHE->averagePeriod);
|
||||
#endif
|
||||
netChange = TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* is this an IOC seen because of an IOC reboot
|
||||
*/
|
||||
if ((pBHE->averagePeriod/2.0)>=currentPeriod) {
|
||||
#ifdef DEBUG
|
||||
ca_printf(
|
||||
"reboot seen %x cur=%f avg=%f\n",
|
||||
pnet_addr->s_addr,
|
||||
currentPeriod,
|
||||
pBHE->averagePeriod);
|
||||
#endif
|
||||
netChange = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if ((pBHE->averagePeriod/2.0)>=currentPeriod) {
|
||||
#ifdef DEBUG
|
||||
ca_printf(
|
||||
"reboot seen %x cur=%d avg=%d\n",
|
||||
pnet_addr->s_addr,
|
||||
currentPeriod,
|
||||
pBHE->averagePeriod);
|
||||
#endif
|
||||
netChange = TRUE;
|
||||
}
|
||||
if(pBHE->piiu){
|
||||
pBHE->piiu->timeAtLastRecv = ca_static->currentTime;
|
||||
}
|
||||
if(!netChange){
|
||||
UNLOCK;
|
||||
return;
|
||||
}
|
||||
/*
|
||||
* update beacon time stamp
|
||||
*/
|
||||
pBHE->timeStamp = ca_static->currentTime;
|
||||
}
|
||||
else{
|
||||
pBHE = createBeaconHashEntry(pnet_addr);
|
||||
if(!pBHE){
|
||||
UNLOCK;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* This part is essential since many machines
|
||||
* might have channels in a disconnected state which
|
||||
* update state of health for active virtual circuits
|
||||
*/
|
||||
if(pBHE->piiu){
|
||||
pBHE->piiu->timeAtLastRecv = ca_static->currentTime;
|
||||
}
|
||||
|
||||
if(!netChange){
|
||||
UNLOCK;
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* This part is needed when many machines
|
||||
* have channels in a disconnected state that
|
||||
* dont exist anywhere on the network. This insures
|
||||
* that we dont have many CA clients synchronously
|
||||
* flooding the network with broadcasts.
|
||||
* flooding the network with broadcasts (and swamping
|
||||
* out requests for valid channels).
|
||||
*
|
||||
* I fetch the local port number and use the low order bits
|
||||
* as a pseudo random delay to prevent every one
|
||||
@@ -481,21 +636,17 @@ void mark_server_available(const struct in_addr *pnet_addr)
|
||||
ca_static->ca_conn_next_retry = next;
|
||||
LOGRETRYINTERVAL
|
||||
}
|
||||
idelay = (long) CA_RECAST_DELAY;
|
||||
ca_static->ca_conn_retry_delay.tv_sec = idelay;
|
||||
ca_static->ca_conn_retry_delay.tv_usec =
|
||||
(long) ((CA_RECAST_DELAY-idelay) * USEC_PER_SEC);
|
||||
ca_static->ca_search_retry = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* set retry count of all disconnected channels
|
||||
* to zero
|
||||
*/
|
||||
chan = (chid) ellFirst(&piiuCast->chidlist);
|
||||
cacSetRetryInterval(0u);
|
||||
chan = (ciu) ellFirst(&piiuCast->chidlist);
|
||||
while (chan) {
|
||||
chan->retry = 0;
|
||||
chan = (chid) ellNext (&chan->node);
|
||||
chan->retry = 0u;
|
||||
chan = (ciu) ellNext (&chan->node);
|
||||
}
|
||||
|
||||
UNLOCK;
|
||||
@@ -507,7 +658,7 @@ void mark_server_available(const struct in_addr *pnet_addr)
|
||||
*
|
||||
* LOCK must be applied
|
||||
*/
|
||||
bhe *createBeaconHashEntry(const struct in_addr *pnet_addr)
|
||||
bhe *createBeaconHashEntry(const struct in_addr *pnet_addr, unsigned sawBeacon)
|
||||
{
|
||||
bhe *pBHE;
|
||||
unsigned index;
|
||||
@@ -528,7 +679,7 @@ bhe *createBeaconHashEntry(const struct in_addr *pnet_addr)
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
ca_printf("new IOC %x\n", pnet_addr->s_addr);
|
||||
ca_printf("new beacon at %x\n", pnet_addr->s_addr);
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -537,10 +688,29 @@ bhe *createBeaconHashEntry(const struct in_addr *pnet_addr)
|
||||
pBHE->inetAddr = *pnet_addr;
|
||||
|
||||
/*
|
||||
* start the average at zero
|
||||
* set average to -1.0 so that when the next beacon
|
||||
* occurs we can distinguish between:
|
||||
* o new server
|
||||
* o existing server's beacon we are seeing
|
||||
* for the first time shortly after program
|
||||
* start up
|
||||
*/
|
||||
pBHE->averagePeriod = 0.0;
|
||||
pBHE->timeStamp = ca_static->currentTime;
|
||||
pBHE->averagePeriod = -1.0;
|
||||
|
||||
/*
|
||||
* if creating this in response to a search reply
|
||||
* and not in response to a beacon then sawBeacon
|
||||
* is false and we set the beacon time stamp to
|
||||
* zero (so we can correctly compute the period
|
||||
beacon at * between the 1st and 2nd beacons)
|
||||
*/
|
||||
if (sawBeacon) {
|
||||
pBHE->timeStamp = ca_static->currentTime;
|
||||
}
|
||||
else {
|
||||
pBHE->timeStamp.tv_sec = 0;
|
||||
pBHE->timeStamp.tv_usec = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* install in the hash table
|
||||
@@ -637,3 +807,89 @@ void freeBeaconHash(struct ca_static *ca_temp)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* retryPendingClaims()
|
||||
*
|
||||
* This assumes that all channels with claims pending are at the
|
||||
* front of the list (and that the channel is moved to the end of
|
||||
* the list when a claim message has been sent for it)
|
||||
*
|
||||
* We send claim messages here until the outgoing message buffer
|
||||
* will not accept any more messages
|
||||
*/
|
||||
void retryPendingClaims(IIU *piiu)
|
||||
{
|
||||
chid chan;
|
||||
int status;
|
||||
|
||||
while ( (chan= (ciu) ellFirst (&piiu->chidlist)) ) {
|
||||
if (!chan->claimPending) {
|
||||
piiu->claimsPending = FALSE;
|
||||
return;
|
||||
}
|
||||
status = issue_claim_channel(chan);
|
||||
if (status!=ECA_NORMAL) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Add chan to IIU and guarantee that
|
||||
* one chan on the B cast IIU list is pointed to by
|
||||
* ca_pEndOfBCastList
|
||||
*/
|
||||
void addToChanList(ciu chan, IIU *piiu)
|
||||
{
|
||||
if (piiu==piiuCast) {
|
||||
/*
|
||||
* add to the beginning of the list so that search requests for
|
||||
* this channel will be sent first (since the retry count is zero)
|
||||
*/
|
||||
if (ellCount(&piiu->chidlist)==0) {
|
||||
ca_static->ca_pEndOfBCastList = chan;
|
||||
}
|
||||
/*
|
||||
* add to the front of the list so that
|
||||
* search requests for new channels will be sent first
|
||||
*/
|
||||
chan->retry = 0u;
|
||||
ellInsert(&piiu->chidlist, NULL, &chan->node);
|
||||
}
|
||||
else {
|
||||
/*
|
||||
* add to the beginning of the list until we
|
||||
* have sent the claim message (after which we
|
||||
* move it to the end of the list)
|
||||
*/
|
||||
chan->claimPending = TRUE;
|
||||
ellInsert(&piiu->chidlist, NULL, &chan->node);
|
||||
}
|
||||
chan->piiu = piiu;
|
||||
}
|
||||
|
||||
/*
|
||||
* Remove chan from B-cast IIU and guarantee that
|
||||
* one chan on the list is pointed to by
|
||||
* ca_pEndOfBCastList
|
||||
*/
|
||||
void removeFromChanList(ciu chan)
|
||||
{
|
||||
IIU *piiu = (IIU *) chan->piiu;
|
||||
|
||||
if (piiu==piiuCast) {
|
||||
if (ca_static->ca_pEndOfBCastList == chan) {
|
||||
if (ellPrevious(&chan->node)) {
|
||||
ca_static->ca_pEndOfBCastList = (ciu)
|
||||
ellPrevious(&chan->node);
|
||||
}
|
||||
else {
|
||||
ca_static->ca_pEndOfBCastList = (ciu)
|
||||
ellLast(&piiu->chidlist);
|
||||
}
|
||||
}
|
||||
}
|
||||
ellDelete(&piiu->chidlist, &chan->node);
|
||||
chan->piiu=NULL;
|
||||
}
|
||||
|
||||
|
||||
102
src/ca/convert.c
102
src/ca/convert.c
@@ -35,6 +35,11 @@ static char *sccsId = "@(#) $Id$";
|
||||
#include "iocinf.h"
|
||||
#include "net_convert.h"
|
||||
|
||||
/*
|
||||
* NOOP if this isnt required
|
||||
*/
|
||||
#ifdef CONVERSION_REQUIRED
|
||||
|
||||
/*
|
||||
* if hton is true then it is a host to network conversion
|
||||
* otherwise vise-versa
|
||||
@@ -86,6 +91,9 @@ LOCAL CACVRTFUNC cvrt_ctrl_char;
|
||||
LOCAL CACVRTFUNC cvrt_ctrl_long;
|
||||
LOCAL CACVRTFUNC cvrt_ctrl_double;
|
||||
|
||||
LOCAL CACVRTFUNC cvrt_put_ackt;
|
||||
LOCAL CACVRTFUNC cvrt_stsack_string;
|
||||
|
||||
/* cvrt is (array of) (pointer to) (function returning) int */
|
||||
CACVRTFUNC *cac_dbr_cvrt[]
|
||||
=
|
||||
@@ -128,7 +136,11 @@ CACVRTFUNC *cac_dbr_cvrt[]
|
||||
cvrt_ctrl_enum,
|
||||
cvrt_ctrl_char,
|
||||
cvrt_ctrl_long,
|
||||
cvrt_ctrl_double
|
||||
cvrt_ctrl_double,
|
||||
|
||||
cvrt_put_ackt,
|
||||
cvrt_put_ackt, /* DBR_PUT_ACKS identical to DBR_PUT_ACKT */
|
||||
cvrt_stsack_string
|
||||
};
|
||||
|
||||
|
||||
@@ -156,6 +168,9 @@ unsigned long num /* number of values */
|
||||
char *pSrc = s;
|
||||
char *pDest = d;
|
||||
|
||||
/* convert "in place" -> nothing to do */
|
||||
if (s == d)
|
||||
return;
|
||||
if(num == 1){
|
||||
strcpy(pDest, pSrc);
|
||||
}
|
||||
@@ -212,6 +227,9 @@ unsigned long num /* number of values */
|
||||
dbr_char_t *pSrc = s;
|
||||
dbr_char_t *pDest = d;
|
||||
|
||||
/* convert "in place" -> nothing to do */
|
||||
if (s == d)
|
||||
return;
|
||||
for(i=0; i<num; i++){
|
||||
*pDest++ = *pSrc++;
|
||||
}
|
||||
@@ -377,6 +395,11 @@ unsigned long num /* number of values */
|
||||
/* convert ieee to vax format or vax to ieee */
|
||||
pDest->status = dbr_ntohs(pSrc->status);
|
||||
pDest->severity = dbr_ntohs(pSrc->severity);
|
||||
|
||||
/* convert "in place" -> nothing else to do */
|
||||
if (s == d)
|
||||
return;
|
||||
|
||||
if (num == 1) /* if single value */
|
||||
strcpy(pDest->value, pSrc->value);
|
||||
else
|
||||
@@ -570,6 +593,10 @@ unsigned long num /* number of values */
|
||||
|
||||
pDest->status = dbr_ntohs(pSrc->status);
|
||||
pDest->severity = dbr_ntohs(pSrc->severity);
|
||||
|
||||
if (s == d) /* source == dest -> no more conversions */
|
||||
return;
|
||||
|
||||
memcpy(pDest->units,pSrc->units,sizeof(pSrc->units));
|
||||
|
||||
pDest->upper_disp_limit = pSrc->upper_disp_limit;
|
||||
@@ -1361,6 +1388,76 @@ unsigned long num /* number of values */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* cvrt_put_ackt()
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
LOCAL void cvrt_put_ackt(
|
||||
void *s, /* source */
|
||||
void *d, /* destination */
|
||||
int encode, /* cvrt HOST to NET if T */
|
||||
unsigned long num /* number of values */
|
||||
)
|
||||
{
|
||||
dbr_put_ackt_t *pSrc = s;
|
||||
dbr_put_ackt_t *pDest = d;
|
||||
unsigned long i;
|
||||
|
||||
for(i=0; i<num; i++){
|
||||
*pDest = dbr_ntohs( *pSrc );
|
||||
/*
|
||||
* dont increment these inside the MACRO
|
||||
*/
|
||||
pDest++;
|
||||
pSrc++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
** cvrt_stsack_string(s,d)
|
||||
** struct dbr_stsack_string *s pointer to source struct
|
||||
** struct dbr_stsack_string *d pointer to destination struct
|
||||
** int encode; boolean, if true vax to ieee
|
||||
** else ieee to vax
|
||||
**
|
||||
** converts fields of struct in HOST format to NET format
|
||||
** or
|
||||
** converts fields of struct in NET format to fields with HOST
|
||||
** format;
|
||||
****************************************************************************/
|
||||
|
||||
LOCAL void cvrt_stsack_string(
|
||||
void *s, /* source */
|
||||
void *d, /* destination */
|
||||
int encode, /* cvrt HOST to NET if T */
|
||||
unsigned long num /* number of values */
|
||||
)
|
||||
{
|
||||
struct dbr_stsack_string *pSrc = s;
|
||||
struct dbr_stsack_string *pDest = d;
|
||||
|
||||
/* convert ieee to vax format or vax to ieee */
|
||||
pDest->status = dbr_ntohs(pSrc->status);
|
||||
pDest->severity = dbr_ntohs(pSrc->severity);
|
||||
pDest->ackt = dbr_ntohs(pSrc->ackt);
|
||||
pDest->acks = dbr_ntohs(pSrc->acks);
|
||||
|
||||
/* convert "in place" -> nothing else to do */
|
||||
if (s == d)
|
||||
return;
|
||||
|
||||
if (num == 1) /* if single value */
|
||||
strcpy(pDest->value, pSrc->value);
|
||||
else
|
||||
memcpy(pDest->value, pSrc->value, (MAX_STRING_SIZE * num));
|
||||
|
||||
}
|
||||
|
||||
|
||||
#if defined(CA_FLOAT_MIT)
|
||||
/************************************************************************/
|
||||
@@ -1653,7 +1750,7 @@ void dbr_ntohd (dbr_double_t *IEEEnet, dbr_double_t *IEEEhost)
|
||||
*/
|
||||
tmp = pNet[0];
|
||||
pHost[0] = dbr_ntohl (pNet[1]);
|
||||
pHost[1] = dbr_htonl (tmp);
|
||||
pHost[1] = dbr_ntohl (tmp);
|
||||
#else
|
||||
*IEEEhost = *IEEEnet;
|
||||
#endif
|
||||
@@ -1686,4 +1783,5 @@ void dbr_htonf (dbr_float_t *IEEEhost, dbr_float_t *IEEEnet)
|
||||
#endif /* IEEE float and little endian */
|
||||
|
||||
|
||||
#endif /* CONVERSION_REQUIRED */
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
#include <cadef.h>
|
||||
#include <dbDefs.h>
|
||||
#include "cadef.h"
|
||||
#include "dbDefs.h"
|
||||
|
||||
void event_handler(struct event_handler_args args);
|
||||
int main(int argc, char **argv);
|
||||
|
||||
@@ -37,7 +37,6 @@ static char *sccsId = "@(#) $Id$";
|
||||
|
||||
#include "iocinf.h"
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* FLOW CONTROL
|
||||
@@ -47,49 +46,54 @@ static char *sccsId = "@(#) $Id$";
|
||||
* suppress monitors if we are behind
|
||||
* (an update is sent when we catch up)
|
||||
*/
|
||||
void flow_control(struct ioc_in_use *piiu)
|
||||
|
||||
void flow_control_on(struct ioc_in_use *piiu)
|
||||
{
|
||||
unsigned nbytes;
|
||||
int status;
|
||||
int status;
|
||||
|
||||
LOCK;
|
||||
|
||||
/*
|
||||
* use of the additional system call here does not
|
||||
* seem to slow things down appreciably
|
||||
*/
|
||||
status = socket_ioctl(piiu->sock_chan,
|
||||
FIONREAD,
|
||||
&nbytes);
|
||||
if (status < 0) {
|
||||
TAG_CONN_DOWN(piiu);
|
||||
UNLOCK;
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* I wish to avoid going into flow control however
|
||||
* I prefer to avoid going into flow control
|
||||
* as this impacts the performance of batched fetches
|
||||
*/
|
||||
if (nbytes) {
|
||||
piiu->contiguous_msg_count++;
|
||||
if (!piiu->client_busy)
|
||||
if (piiu->contiguous_msg_count >
|
||||
MAX_CONTIGUOUS_MSG_COUNT) {
|
||||
if (piiu->contiguous_msg_count >= MAX_CONTIGUOUS_MSG_COUNT) {
|
||||
if (!piiu->client_busy) {
|
||||
status = ca_busy_message(piiu);
|
||||
if (status==ECA_NORMAL) {
|
||||
assert(ca_static->ca_number_iiu_in_fc<UINT_MAX);
|
||||
ca_static->ca_number_iiu_in_fc++;
|
||||
piiu->client_busy = TRUE;
|
||||
ca_busy_message(piiu);
|
||||
# if defined(DEBUG)
|
||||
printf("fc on\n");
|
||||
# endif
|
||||
}
|
||||
} else {
|
||||
piiu->contiguous_msg_count = 0;
|
||||
if (piiu->client_busy) {
|
||||
}
|
||||
}
|
||||
else {
|
||||
piiu->contiguous_msg_count++;
|
||||
}
|
||||
|
||||
UNLOCK;
|
||||
return;
|
||||
}
|
||||
|
||||
void flow_control_off(struct ioc_in_use *piiu)
|
||||
{
|
||||
int status;
|
||||
|
||||
LOCK;
|
||||
|
||||
piiu->contiguous_msg_count = 0;
|
||||
if (piiu->client_busy) {
|
||||
status = ca_ready_message(piiu);
|
||||
if (status==ECA_NORMAL) {
|
||||
assert(ca_static->ca_number_iiu_in_fc>0u);
|
||||
ca_static->ca_number_iiu_in_fc--;
|
||||
piiu->client_busy = FALSE;
|
||||
# if defined(DEBUG)
|
||||
printf("fc off\n");
|
||||
# endif
|
||||
ca_ready_message(piiu);
|
||||
piiu->client_busy = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -37,7 +37,6 @@
|
||||
|
||||
static char *sccsId = "@(#) $Id$";
|
||||
|
||||
|
||||
#include "iocinf.h"
|
||||
|
||||
/*
|
||||
@@ -79,7 +78,7 @@ int local_addr(int s, struct sockaddr_in *plcladdr)
|
||||
if (status < 0 || ifconf.ifc_len == 0) {
|
||||
ca_printf(
|
||||
"CAC: ioctl failed because \"%s\"\n",
|
||||
strerror(MYERRNO));
|
||||
strerror(SOCKERRNO));
|
||||
ifconf.ifc_len = 0;
|
||||
}
|
||||
|
||||
@@ -88,7 +87,7 @@ int local_addr(int s, struct sockaddr_in *plcladdr)
|
||||
#endif
|
||||
|
||||
for ( pifreq = ifconf.ifc_req;
|
||||
ifconf.ifc_len >= sizeof(*pifreq);
|
||||
((size_t)ifconf.ifc_len) >= sizeof(*pifreq);
|
||||
pifreq++, ifconf.ifc_len -= sizeof(*pifreq)) {
|
||||
|
||||
status = socket_ioctl(s, SIOCGIFFLAGS, pifreq);
|
||||
@@ -169,12 +168,14 @@ int local_addr (int s, struct sockaddr_in *plcladdr)
|
||||
/*
|
||||
* caDiscoverInterfaces()
|
||||
*
|
||||
* This routine is provided with the address of an ELLLIST a socket
|
||||
* and a destination port number. When the routine returns there
|
||||
* will be one additional inet address (a caAddrNode) in the list
|
||||
* for each inet interface found that is up and isnt a loop back
|
||||
* interface. If the interface supports broadcast then I add its
|
||||
* broadcast address to the list. If the interface is a point to
|
||||
* This routine is provided with the address of an ELLLIST, a socket
|
||||
* a destination port number, and a match address. When the
|
||||
* routine returns there will be one additional inet address
|
||||
* (a caAddrNode) in the list for each inet interface found that
|
||||
* is up and isnt a loop back interface (match addr is INADDR_ANY)
|
||||
* or it matches the specified interface (match addr isnt INADDR_ANY).
|
||||
* If the interface supports broadcast then I add its broadcast
|
||||
* address to the list. If the interface is a point to
|
||||
* point link then I add the destination address of the point to
|
||||
* point link to the list. In either case I set the port number
|
||||
* in the address node to the port supplied in the argument
|
||||
@@ -183,7 +184,8 @@ int local_addr (int s, struct sockaddr_in *plcladdr)
|
||||
* LOCK should be applied here for (pList)
|
||||
* (this is also called from the server)
|
||||
*/
|
||||
void caDiscoverInterfaces(ELLLIST *pList, int socket, int port)
|
||||
void caDiscoverInterfaces(ELLLIST *pList, int socket, int port,
|
||||
struct in_addr matchAddr)
|
||||
{
|
||||
struct sockaddr_in localAddr;
|
||||
struct sockaddr_in *pInetAddr;
|
||||
@@ -243,6 +245,7 @@ void caDiscoverInterfaces(ELLLIST *pList, int socket, int port)
|
||||
if (status){
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* If its not an internet inteface
|
||||
* then dont use it.
|
||||
@@ -250,9 +253,23 @@ void caDiscoverInterfaces(ELLLIST *pList, int socket, int port)
|
||||
if (pifreq->ifr_addr.sa_family != AF_INET) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* save the interface's IP address
|
||||
*/
|
||||
pInetAddr = (struct sockaddr_in *)&pifreq->ifr_addr;
|
||||
localAddr = *pInetAddr;
|
||||
|
||||
/*
|
||||
* if it isnt a wildcarded interface then look for
|
||||
* an exact match
|
||||
*/
|
||||
if (matchAddr.s_addr != INADDR_ANY) {
|
||||
if (pInetAddr->sin_addr.s_addr != matchAddr.s_addr) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* If this is an interface that supports
|
||||
* broadcast fetch the broadcast address.
|
||||
@@ -285,9 +302,6 @@ void caDiscoverInterfaces(ELLLIST *pList, int socket, int port)
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
pNode = (caAddrNode *) calloc(1,sizeof(*pNode));
|
||||
if(!pNode){
|
||||
continue;
|
||||
@@ -306,4 +320,3 @@ void caDiscoverInterfaces(ELLLIST *pList, int socket, int port)
|
||||
free(pIfreqList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
541
src/ca/iocinf.c
541
src/ca/iocinf.c
File diff suppressed because it is too large
Load Diff
212
src/ca/iocinf.h
212
src/ca/iocinf.h
@@ -32,6 +32,27 @@
|
||||
/************************************************************************/
|
||||
|
||||
/* $Log$
|
||||
* Revision 1.62 1997/04/29 06:11:08 jhill
|
||||
* use free lists
|
||||
*
|
||||
* Revision 1.61 1997/04/23 17:05:07 jhill
|
||||
* pc port changes
|
||||
*
|
||||
* Revision 1.60 1997/04/10 19:26:24 jhill
|
||||
* asynch connect, faster connect, ...
|
||||
*
|
||||
* Revision 1.59 1997/01/22 21:10:26 jhill
|
||||
* smaller external sym name for VAXC
|
||||
*
|
||||
* Revision 1.58 1996/11/02 00:50:56 jhill
|
||||
* many pc port, const in API, and other changes
|
||||
*
|
||||
* Revision 1.57 1996/09/16 16:38:05 jhill
|
||||
* local except => except handler
|
||||
*
|
||||
* Revision 1.56 1996/08/13 23:16:19 jhill
|
||||
* removed os specific code
|
||||
*
|
||||
* Revision 1.55 1996/08/05 19:21:26 jhill
|
||||
* removed unused proto
|
||||
*
|
||||
@@ -91,7 +112,7 @@
|
||||
# define GLBLTYPE extern
|
||||
#endif
|
||||
|
||||
#ifdef __STDC__
|
||||
#if defined(__STDC__) && !defined(VAXC)
|
||||
# define VERSIONID(NAME,VERS) \
|
||||
char *EPICS_CAS_VID_ ## NAME = VERS;
|
||||
#else /*__STDC__*/
|
||||
@@ -118,28 +139,76 @@ HDRVERSIONID(iocinfh, "$Id$")
|
||||
#include <stdarg.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <shareLib.h>
|
||||
|
||||
/*
|
||||
* OS dependent includes
|
||||
*/
|
||||
#include "osiSock.h"
|
||||
#include "os_depen.h"
|
||||
|
||||
/*
|
||||
* EPICS includes
|
||||
*/
|
||||
#include <epicsAssert.h>
|
||||
#include <cadef.h>
|
||||
#include <bucketLib.h>
|
||||
#include <ellLib.h>
|
||||
#include <envDefs.h>
|
||||
#include <epicsPrint.h>
|
||||
#if defined(epicsExportSharedSymbols)
|
||||
#error suspect that libCom was not imported
|
||||
#endif
|
||||
|
||||
#include "epicsAssert.h"
|
||||
#include "bucketLib.h"
|
||||
#include "ellLib.h"
|
||||
#include "envDefs.h"
|
||||
#include "epicsPrint.h"
|
||||
|
||||
#if defined(epicsExportSharedSymbols)
|
||||
#error suspect that libCom was not imported
|
||||
#endif
|
||||
|
||||
/*
|
||||
* this is defined only after we import from libCom above
|
||||
*/
|
||||
#define epicsExportSharedSymbols
|
||||
#include "cadef.h"
|
||||
|
||||
/*
|
||||
* CA private includes
|
||||
*/
|
||||
#include "addrList.h"
|
||||
#include "caProto.h"
|
||||
#include "net_convert.h"
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#endif
|
||||
|
||||
#ifndef OK
|
||||
#define OK 0
|
||||
#endif
|
||||
|
||||
#ifndef ERROR
|
||||
#define ERROR (-1)
|
||||
#endif
|
||||
|
||||
#ifndef NELEMENTS
|
||||
#define NELEMENTS(array) (sizeof(array)/sizeof((array)[0]))
|
||||
#endif
|
||||
|
||||
#ifndef LOCAL
|
||||
#define LOCAL static
|
||||
#endif
|
||||
|
||||
/*
|
||||
* writable channel_in_use and pending_event pointers
|
||||
* for internal use
|
||||
*/
|
||||
typedef struct channel_in_use *ciu;
|
||||
typedef struct pending_event *miu;
|
||||
|
||||
#ifndef min
|
||||
#define min(A,B) ((A)>(B)?(B):(A))
|
||||
@@ -169,8 +238,8 @@ if(!ca_static){ \
|
||||
/* throw out requests prior to last ECA_TIMEOUT from ca_pend */
|
||||
#define VALID_MSG(PIIU) (piiu->read_seq == piiu->cur_read_seq)
|
||||
|
||||
#define SETPENDRECV {pndrecvcnt++;}
|
||||
#define CLRPENDRECV(LOCK) {if(--pndrecvcnt<1){POST_IO_EV;}}
|
||||
#define SETPENDRECV {pndrecvcnt++;}
|
||||
#define CLRPENDRECV {if(--pndrecvcnt<1u){POST_IO_EV;}}
|
||||
|
||||
struct udpmsglog{
|
||||
long nbytes;
|
||||
@@ -196,15 +265,6 @@ typedef struct timeval ca_time;
|
||||
((PCATIME)->tv_sec = (long) (FLOAT_TIME), \
|
||||
(PCATIME)->tv_usec = (long) ( ((FLOAT_TIME)-(PCATIME)->tv_sec)*USEC_PER_SEC ))
|
||||
|
||||
/*
|
||||
* dont adjust
|
||||
*/
|
||||
#ifdef CA_GLBLSOURCE
|
||||
const ca_time CA_CURRENT_TIME = {0,0};
|
||||
#else /*CA_GLBLSOURCE*/
|
||||
extern const ca_time CA_CURRENT_TIME;
|
||||
#endif /*CA_GLBLSOURCE*/
|
||||
|
||||
/*
|
||||
* these control the duration and period of name resolution
|
||||
* broadcasts
|
||||
@@ -213,6 +273,11 @@ extern const ca_time CA_CURRENT_TIME;
|
||||
*/
|
||||
#define MAXCONNTRIES 30 /* N conn retries on unchanged net */
|
||||
|
||||
/*
|
||||
* A prime number works best here (see comment in retrySearchRequest()
|
||||
*/
|
||||
#define TRIESPERFRAME 5u /* N UDP frames per search try */
|
||||
|
||||
/*
|
||||
* NOTE: These must be larger than one vxWorks tick or we will end up
|
||||
* using the CPU. A vxWorks tick is usually 1/60th of a sec.
|
||||
@@ -255,7 +320,16 @@ typedef struct caclient_put_notify{
|
||||
}CACLIENTPUTNOTIFY;
|
||||
#endif /*vxWorks*/
|
||||
|
||||
#define MAX_CONTIGUOUS_MSG_COUNT 2
|
||||
/*
|
||||
* this determines the number of messages received
|
||||
* without a delay in between before we go into
|
||||
* monitor flow control
|
||||
*
|
||||
* turning this down effect maximum throughput
|
||||
* because we dont get an optimal number of bytes
|
||||
* per network frame
|
||||
*/
|
||||
#define MAX_CONTIGUOUS_MSG_COUNT 10
|
||||
|
||||
/*
|
||||
* ! lock needs to be applied when an id is allocated !
|
||||
@@ -272,13 +346,8 @@ typedef struct caclient_put_notify{
|
||||
#define iiuList (ca_static->ca_iiuList)
|
||||
#define piiuCast (ca_static->ca_piiuCast)
|
||||
#define pndrecvcnt (ca_static->ca_pndrecvcnt)
|
||||
#define chidlist_pend (ca_static->ca_chidlist_pend)
|
||||
#define chidlist_conn (ca_static->ca_chidlist_conn)
|
||||
#define chidlist_noreply\
|
||||
(ca_static->ca_chidlist_noreply)
|
||||
#define ioeventlist (ca_static->ca_ioeventlist)
|
||||
#define nxtiiu (ca_static->ca_nxtiiu)
|
||||
#define free_event_list (ca_static->ca_free_event_list)
|
||||
#define pend_read_list (ca_static->ca_pend_read_list)
|
||||
#define pend_write_list (ca_static->ca_pend_write_list)
|
||||
#define fd_register_func\
|
||||
@@ -292,12 +361,11 @@ typedef struct caclient_put_notify{
|
||||
#define nextFastBucketId (ca_static->ca_nextFastBucketId)
|
||||
|
||||
#if defined(vxWorks)
|
||||
# define io_done_sem (ca_static->ca_io_done_sem)
|
||||
# define io_done_sem (ca_static->ca_io_done_sem)
|
||||
# define evuser (ca_static->ca_evuser)
|
||||
# define client_lock (ca_static->ca_client_lock)
|
||||
# define event_lock (ca_static->ca_event_lock)
|
||||
# define local_chidlist (ca_static->ca_local_chidlist)
|
||||
# define dbfree_ev_list (ca_static->ca_dbfree_ev_list)
|
||||
# define lcl_buff_list (ca_static->ca_lcl_buff_list)
|
||||
# define event_tid (ca_static->ca_event_tid)
|
||||
#endif
|
||||
@@ -346,9 +414,11 @@ struct ca_buffer{
|
||||
#define TAG_CONN_DOWN(PIIU) \
|
||||
( \
|
||||
/* ca_printf("Tagging connection down at %d in %s\n", __LINE__, __FILE__), */ \
|
||||
(PIIU)->conn_up = FALSE \
|
||||
(PIIU)->state = iiu_disconnected\
|
||||
)
|
||||
|
||||
enum iiu_conn_state{iiu_connecting, iiu_connected, iiu_disconnected};
|
||||
|
||||
/*
|
||||
* One per IOC
|
||||
*/
|
||||
@@ -378,15 +448,17 @@ typedef struct ioc_in_use{
|
||||
unsigned cur_read_seq;
|
||||
unsigned minfreespace;
|
||||
char host_name_str[32];
|
||||
unsigned char state; /* for use with iiu_conn_state enum */
|
||||
|
||||
/*
|
||||
* bit fields placed together for better packing density
|
||||
*/
|
||||
unsigned client_busy:1;
|
||||
unsigned echoPending:1;
|
||||
unsigned send_needed:1; /* CA needs a send */
|
||||
unsigned conn_up:1; /* boolean: T-conn /F-disconn */
|
||||
unsigned sendPending:1;
|
||||
unsigned claimsPending:1;
|
||||
unsigned recvPending:1;
|
||||
unsigned pushPending:1;
|
||||
}IIU;
|
||||
|
||||
/*
|
||||
@@ -414,13 +486,10 @@ typedef struct {
|
||||
struct ca_static{
|
||||
ELLLIST ca_iiuList;
|
||||
ELLLIST ca_ioeventlist;
|
||||
ELLLIST ca_free_event_list;
|
||||
ELLLIST ca_pend_read_list;
|
||||
ELLLIST ca_pend_write_list;
|
||||
ELLLIST activeCASG;
|
||||
ELLLIST freeCASG;
|
||||
ELLLIST activeCASGOP;
|
||||
ELLLIST freeCASGOP;
|
||||
ELLLIST putCvrtBuf;
|
||||
ELLLIST fdInfoFreeList;
|
||||
ELLLIST fdInfoList;
|
||||
@@ -429,30 +498,34 @@ struct ca_static{
|
||||
ca_time ca_conn_retry_delay;
|
||||
ca_time ca_last_repeater_try;
|
||||
ca_real ca_connectTMO;
|
||||
long ca_pndrecvcnt;
|
||||
unsigned long ca_nextSlowBucketId;
|
||||
unsigned long ca_nextFastBucketId;
|
||||
ca_time programBeginTime;
|
||||
IIU *ca_piiuCast;
|
||||
void (*ca_exception_func)
|
||||
(struct exception_handler_args);
|
||||
void *ca_exception_arg;
|
||||
#if 0
|
||||
void (*ca_connection_func)
|
||||
(struct connection_handler_args);
|
||||
void *ca_connection_arg;
|
||||
#endif
|
||||
const void *ca_exception_arg;
|
||||
int (*ca_printf_func)(const char *pformat, va_list args);
|
||||
void (*ca_fd_register_func)
|
||||
(void *, SOCKET, int);
|
||||
void *ca_fd_register_arg;
|
||||
const void *ca_fd_register_arg;
|
||||
char *ca_pUserName;
|
||||
char *ca_pHostName;
|
||||
BUCKET *ca_pSlowBucket;
|
||||
BUCKET *ca_pFastBucket;
|
||||
bhe *ca_beaconHash[BHT_INET_ADDR_MASK+1];
|
||||
unsigned ca_repeater_tries;
|
||||
void *ca_ioBlockFreeListPVT;
|
||||
void *ca_sgFreeListPVT;
|
||||
void *ca_sgopFreeListPVT;
|
||||
ciu ca_pEndOfBCastList;
|
||||
unsigned long ca_search_responses; /* num valid search resp within seq # */
|
||||
unsigned long ca_search_tries; /* num search tries within seq # */
|
||||
unsigned ca_search_retry; /* search retry seq number */
|
||||
unsigned ca_search_responses; /* num search resp within seq # */
|
||||
unsigned ca_min_retry; /* min retry no so far */
|
||||
unsigned ca_frames_per_try; /* # of UDP frames per search try */
|
||||
unsigned ca_pndrecvcnt;
|
||||
unsigned ca_nextSlowBucketId;
|
||||
unsigned ca_nextFastBucketId;
|
||||
unsigned ca_repeater_tries;
|
||||
unsigned ca_number_iiu_in_fc;
|
||||
unsigned short ca_server_port;
|
||||
unsigned short ca_repeater_port;
|
||||
char ca_sprintf_buf[256];
|
||||
@@ -468,11 +541,11 @@ struct ca_static{
|
||||
SEM_ID ca_event_lock; /* dont allow events to preempt */
|
||||
SEM_ID ca_putNotifyLock;
|
||||
ELLLIST ca_local_chidlist;
|
||||
ELLLIST ca_dbfree_ev_list;
|
||||
ELLLIST ca_lcl_buff_list;
|
||||
ELLLIST ca_putNotifyQue;
|
||||
ELLLIST ca_taskVarList;
|
||||
void *ca_evuser;
|
||||
void *ca_dbMonixFreeList;
|
||||
int ca_event_tid;
|
||||
int ca_tid;
|
||||
int recv_tid;
|
||||
@@ -487,11 +560,11 @@ struct ca_static{
|
||||
* one per outstanding op
|
||||
*/
|
||||
typedef struct{
|
||||
ELLNODE node;
|
||||
WRITEABLE_CA_SYNC_GID id;
|
||||
void *pValue;
|
||||
unsigned long magic;
|
||||
unsigned long seqNo;
|
||||
ELLNODE node;
|
||||
CA_SYNC_GID id;
|
||||
void *pValue;
|
||||
unsigned long magic;
|
||||
unsigned long seqNo;
|
||||
}CASGOP;
|
||||
|
||||
|
||||
@@ -500,7 +573,7 @@ typedef struct{
|
||||
*/
|
||||
typedef struct{
|
||||
ELLNODE node;
|
||||
WRITEABLE_CA_SYNC_GID id;
|
||||
CA_SYNC_GID id;
|
||||
unsigned long magic;
|
||||
unsigned long opPendCount;
|
||||
unsigned long seqNo;
|
||||
@@ -529,20 +602,21 @@ struct ca_static *ca_static;
|
||||
void cac_send_msg(void);
|
||||
void cac_mux_io(struct timeval *ptimeout);
|
||||
int repeater_installed(void);
|
||||
int search_msg(chid chix, int reply_type);
|
||||
int search_msg(ciu chix, int reply_type);
|
||||
int ca_request_event(evid monix);
|
||||
void ca_busy_message(struct ioc_in_use *piiu);
|
||||
void ca_ready_message(struct ioc_in_use *piiu);
|
||||
int ca_busy_message(struct ioc_in_use *piiu);
|
||||
int ca_ready_message(struct ioc_in_use *piiu);
|
||||
void noop_msg(struct ioc_in_use *piiu);
|
||||
int echo_request(struct ioc_in_use *piiu, ca_time *pCurrentTime);
|
||||
void issue_claim_channel(struct ioc_in_use *piiu, chid pchan);
|
||||
int issue_claim_channel(chid pchan);
|
||||
void issue_identify_client(struct ioc_in_use *piiu);
|
||||
void issue_client_host_name(struct ioc_in_use *piiu);
|
||||
int ca_defunct(void);
|
||||
int ca_printf(char *pformat, ...);
|
||||
void manage_conn(int silent);
|
||||
void manage_conn();
|
||||
void mark_server_available(const struct in_addr *pnet_addr);
|
||||
void flow_control(struct ioc_in_use *piiu);
|
||||
void flow_control_on(struct ioc_in_use *piiu);
|
||||
void flow_control_off(struct ioc_in_use *piiu);
|
||||
int broadcast_addr(struct in_addr *pcastaddr);
|
||||
void ca_repeater(void);
|
||||
void cac_recv_task(int tid);
|
||||
@@ -567,7 +641,7 @@ int alloc_ioc(
|
||||
);
|
||||
unsigned long cacRingBufferWrite(
|
||||
struct ca_buffer *pRing,
|
||||
void *pBuf,
|
||||
const void *pBuf,
|
||||
unsigned long nBytes);
|
||||
|
||||
unsigned long cacRingBufferRead(
|
||||
@@ -607,12 +681,11 @@ int ca_os_independent_init (void);
|
||||
void freeBeaconHash(struct ca_static *ca_temp);
|
||||
void removeBeaconInetAddr(const struct in_addr *pnet_addr);
|
||||
bhe *lookupBeaconInetAddr(const struct in_addr *pnet_addr);
|
||||
bhe *createBeaconHashEntry(const struct in_addr *pnet_addr);
|
||||
bhe *createBeaconHashEntry(const struct in_addr *pnet_addr, unsigned sawBeacon);
|
||||
void notify_ca_repeater(void);
|
||||
void cac_clean_iiu_list(void);
|
||||
|
||||
void ca_process_input_queue(void);
|
||||
void cac_flush_internal(void);
|
||||
void cac_block_for_io_completion(struct timeval *pTV);
|
||||
void cac_block_for_sg_completion(CASG *pcasg, struct timeval *pTV);
|
||||
void os_specific_sg_create(CASG *pcasg);
|
||||
@@ -622,17 +695,26 @@ int cac_os_depen_init(struct ca_static *pcas);
|
||||
void cac_os_depen_exit (struct ca_static *pcas);
|
||||
void ca_process_exit();
|
||||
void ca_spawn_repeater(void);
|
||||
typedef void CACVRTFUNC(void *pSrc, void *pDest, int hton, unsigned long count);
|
||||
void cac_gettimeval(struct timeval *pt);
|
||||
/* returns A - B in floating secs */
|
||||
ca_real cac_time_diff(ca_time *pTVA, ca_time *pTVB);
|
||||
/* returns A + B in integer secs & integer usec */
|
||||
ca_time cac_time_sum(ca_time *pTVA, ca_time *pTVB);
|
||||
void caIOBlockFree(evid pIOBlock);
|
||||
void caIOBlockFree(miu pIOBlock);
|
||||
void clearChannelResources(unsigned id);
|
||||
void caSetDefaultPrintfHandler (void);
|
||||
void cacDisconnectChannel(chid chix, enum channel_state state);
|
||||
void cacDisconnectChannel(ciu chix, enum channel_state state);
|
||||
int caSendMsgPending(void);
|
||||
void genLocalExcepWFL(long stat, char *ctx,
|
||||
char *pFile, unsigned line);
|
||||
#define genLocalExcep(STAT, PCTX) \
|
||||
genLocalExcepWFL (STAT, PCTX, __FILE__, __LINE__)
|
||||
void cac_reconnect_channel(ciu chan);
|
||||
void retryPendingClaims(IIU *piiu);
|
||||
void cacClrSearchCounters();
|
||||
void cacSetRetryInterval(unsigned retryNo);
|
||||
void addToChanList(ciu chan, IIU *piiu);
|
||||
void removeFromChanList(ciu chan);
|
||||
|
||||
/*
|
||||
* !!KLUDGE!!
|
||||
|
||||
185
src/ca/iocmsg.h
185
src/ca/iocmsg.h
@@ -1,185 +0,0 @@
|
||||
#ifndef __IOCMSG__
|
||||
/* $Id$ */
|
||||
/*
|
||||
* History
|
||||
* .01 01xx90 joh removed status field in favor of a independent m_cmmd-
|
||||
* saves space on every successful operation
|
||||
*
|
||||
* .02 041390 joh moved server ports to above IPPORT_USERRESERVED
|
||||
* see in.h
|
||||
*
|
||||
* .03 060391 joh Bumped protocol version to 4 to support changes for
|
||||
* SPARC alignment in db_access.h
|
||||
*
|
||||
* .04 071291 joh New command added - claim channel in use block
|
||||
*
|
||||
* .05 011294 joh New command added - write notify
|
||||
*
|
||||
* .06 020194 joh New command added for CA V4.1 - client name
|
||||
*
|
||||
* .07 041194 joh New command added for CA V4.2 - access rights
|
||||
*
|
||||
* .08 050594 joh New command added for CA V4.3 - echo request
|
||||
*
|
||||
* .09 050594 joh New command added for CA V4.3 - repeater fanout register
|
||||
*
|
||||
* .10 050594 joh New command added for CA V4.3 - wakeup the server
|
||||
* $Log$
|
||||
* Revision 1.23 1995/08/23 00:35:17 jhill
|
||||
* added log entries
|
||||
*
|
||||
*/
|
||||
|
||||
#define __IOCMSG__
|
||||
|
||||
HDRVERSIONID(iocmsgh, "@(#) $Id$ CA version 4.4")
|
||||
|
||||
/* TCP/UDP port number (bumped each protocol change) */
|
||||
#define CA_PROTOCOL_VERSION 4
|
||||
#define CA_MINOR_VERSION 6
|
||||
#define CA_UKN_MINOR_VERSION 0 /* unknown minor version */
|
||||
#if CA_PROTOCOL_VERSION == 4
|
||||
#define CA_V41(MAJOR,MINOR) ((MINOR)>=1)
|
||||
#define CA_V42(MAJOR,MINOR) ((MINOR)>=2)
|
||||
#define CA_V43(MAJOR,MINOR) ((MINOR)>=3)
|
||||
#define CA_V44(MAJOR,MINOR) ((MINOR)>=4)
|
||||
#define CA_V45(MAJOR,MINOR) ((MINOR)>=5)
|
||||
#define CA_V46(MAJOR,MINOR) ((MINOR)>=6)
|
||||
#elif CA_PROTOCOL_VERSION > 4
|
||||
#define CA_V41(MAJOR,MINOR) ( 1 )
|
||||
#define CA_V42(MAJOR,MINOR) ( 1 )
|
||||
#define CA_V43(MAJOR,MINOR) ( 1 )
|
||||
#define CA_V44(MAJOR,MINOR) ( 1 )
|
||||
#define CA_V45(MAJOR,MINOR) ( 1 )
|
||||
#define CA_V46(MAJOR,MINOR) ( 1 )
|
||||
#else
|
||||
#define CA_V41(MAJOR,MINOR) ( 0 )
|
||||
#define CA_V42(MAJOR,MINOR) ( 0 )
|
||||
#define CA_V43(MAJOR,MINOR) ( 0 )
|
||||
#define CA_V44(MAJOR,MINOR) ( 0 )
|
||||
#define CA_V45(MAJOR,MINOR) ( 0 )
|
||||
#define CA_V46(MAJOR,MINOR) ( 0 )
|
||||
#endif
|
||||
|
||||
/*
|
||||
* NOTE: These port numbers are only used if the CA repeater and
|
||||
* CA server port numbers cant be obtained from the EPICS
|
||||
* environment variables "EPICS_CA_REPEATER_PORT" and
|
||||
* "EPICS_CA_SERVER_PORT"
|
||||
*/
|
||||
#define CA_PORT_BASE IPPORT_USERRESERVED + 56U
|
||||
#define CA_SERVER_PORT (CA_PORT_BASE+CA_PROTOCOL_VERSION*2)
|
||||
#define CA_REPEATER_PORT (CA_PORT_BASE+CA_PROTOCOL_VERSION*2+1)
|
||||
|
||||
#define MAX_UDP 1024
|
||||
#define MAX_TCP (MAX_UDP*16) /* so waveforms fit */
|
||||
#define MAX_MSG_SIZE (MAX_TCP) /* the larger of tcp and udp max */
|
||||
|
||||
/*
|
||||
* architecture independent types
|
||||
*
|
||||
* (so far this works on all archs we have ported to)
|
||||
*/
|
||||
typedef unsigned short ca_uint16_t;
|
||||
typedef unsigned int ca_uint32_t;
|
||||
typedef float ca_float32_t;
|
||||
typedef ca_uint32_t caResId;
|
||||
|
||||
/* values for m_cmmd */
|
||||
#define IOC_NOOP 0 /* do nothing, but verify TCP */
|
||||
#define IOC_EVENT_ADD 1 /* add an event */
|
||||
#define IOC_EVENT_CANCEL 2 /* cancel an event */
|
||||
#define IOC_READ 3 /* read and return a channel value*/
|
||||
#define IOC_WRITE 4 /* write a channel value */
|
||||
#define IOC_SNAPSHOT 5 /* snapshot of the system */
|
||||
#define IOC_SEARCH 6 /* IOC channel search */
|
||||
#define IOC_BUILD 7 /* build - obsolete */
|
||||
#define IOC_EVENTS_OFF 8 /* flow control */
|
||||
#define IOC_EVENTS_ON 9 /* flow control */
|
||||
#define IOC_READ_SYNC 10 /* purge old reads */
|
||||
#define IOC_ERROR 11 /* an operation failed */
|
||||
#define IOC_CLEAR_CHANNEL 12 /* free chan resources */
|
||||
#define IOC_RSRV_IS_UP 13 /* CA server has joined the net */
|
||||
#define IOC_NOT_FOUND 14 /* channel not found */
|
||||
#define IOC_READ_NOTIFY 15 /* add a one shot event */
|
||||
#define IOC_READ_BUILD 16 /* read and build - obsolete */
|
||||
#define REPEATER_CONFIRM 17 /* registration confirmation */
|
||||
#define IOC_CLAIM_CIU 18 /* client claims resource in server */
|
||||
#define IOC_WRITE_NOTIFY 19 /* notify after write chan value */
|
||||
#define IOC_CLIENT_NAME 20 /* CA V4.1 identify client */
|
||||
#define IOC_HOST_NAME 21 /* CA V4.1 identify client */
|
||||
#define IOC_ACCESS_RIGHTS 22 /* CA V4.2 asynch access rights chg */
|
||||
#define IOC_ECHO 23 /* CA V4.3 connection verify */
|
||||
#define REPEATER_REGISTER 24 /* registr for repeater fan out */
|
||||
#define IOC_SIGNAL 25 /* knock the server out of select */
|
||||
#define IOC_CLAIM_CIU_FAILED 26 /* unable to create chan resource in server */
|
||||
|
||||
/*
|
||||
* for use with search and not_found (if search fails and
|
||||
* its not a broadcast tell the client to look elesewhere)
|
||||
*/
|
||||
#define DOREPLY 10
|
||||
#define DONTREPLY 5
|
||||
|
||||
/* size of object in bytes rounded up to nearest oct word */
|
||||
#define OCT_ROUND(A) ((((unsigned long)(A))+7)>>3)
|
||||
#define OCT_SIZEOF(A) (OCT_ROUND(sizeof(A)))
|
||||
|
||||
/* size of object in bytes rounded up to nearest long word */
|
||||
#define QUAD_ROUND(A) (((unsigned long)(A))+3)>>2)
|
||||
#define QUAD_SIZEOF(A) (QUAD_ROUND(sizeof(A)))
|
||||
|
||||
/* size of object in bytes rounded up to nearest short word */
|
||||
#define BI_ROUND(A) ((((unsigned long)(A))+1)>>1)
|
||||
#define BI_SIZEOF(A) (BI_ROUND(sizeof(A)))
|
||||
|
||||
/*
|
||||
* For communicating access rights to the clients
|
||||
*
|
||||
* (placed in m_available hdr field of IOC_ACCESS_RIGHTS cmmd
|
||||
*/
|
||||
#define CA_ACCESS_RIGHT_READ (1<<0)
|
||||
#define CA_ACCESS_RIGHT_WRITE (1<<1)
|
||||
|
||||
/*
|
||||
* All structures passed in the protocol must have individual
|
||||
* fields aligned on natural boundaries.
|
||||
*
|
||||
* NOTE: all structures declared in this file must have a
|
||||
* byte count which is evenly divisible by 8 matching
|
||||
* the largest atomic data type in db_access.h.
|
||||
*/
|
||||
#define CA_MESSAGE_ALIGN(A) (OCT_ROUND(A)<<3)
|
||||
|
||||
/*
|
||||
* the common part of each message sent/recv by the
|
||||
* CA server.
|
||||
*/
|
||||
typedef struct extmsg {
|
||||
ca_uint16_t m_cmmd; /* operation to be performed */
|
||||
ca_uint16_t m_postsize; /* size of message extension */
|
||||
ca_uint16_t m_type; /* operation data type */
|
||||
ca_uint16_t m_count; /* operation data count */
|
||||
ca_uint32_t m_cid; /* channel identifier */
|
||||
ca_uint32_t m_available; /* undefined message location for use
|
||||
* by client processes */
|
||||
}caHdr;
|
||||
|
||||
/*
|
||||
* for monitor (event) message extension
|
||||
*/
|
||||
struct mon_info{
|
||||
ca_float32_t m_lval; /* low delta */
|
||||
ca_float32_t m_hval; /* high delta */
|
||||
ca_float32_t m_toval; /* period btween samples */
|
||||
ca_uint16_t m_mask; /* event select mask */
|
||||
ca_uint16_t m_pad; /* extend to 32 bits */
|
||||
};
|
||||
|
||||
struct monops { /* monitor req opi to ioc */
|
||||
struct extmsg m_header;
|
||||
struct mon_info m_info;
|
||||
};
|
||||
|
||||
#endif /* __IOCMSG__ */
|
||||
|
||||
@@ -1,10 +1,18 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
* N E T _ C O N V E R T . H
|
||||
* MACROS for rapid conversion between HOST data formats and those used
|
||||
* by the IOCs (NETWORK).
|
||||
*
|
||||
* Author: J. Hill
|
||||
*
|
||||
* The conversion routines are used in both ca lib
|
||||
* and the IOC ca server (base/rsrv).
|
||||
* The latter, however, cannot include os_depen.h so
|
||||
* I extracted the conversion specific code from there
|
||||
* and put it in this "now stand alone" net_convert.h
|
||||
* 8-22-96 -kuk-
|
||||
*
|
||||
*
|
||||
* joh 09-13-90 force MIT sign to zero if exponent is zero
|
||||
* to prevent a reseved operand fault.
|
||||
@@ -16,16 +24,91 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <db_access.h>
|
||||
#ifndef _NET_CONVERT_H
|
||||
#define _NET_CONVERT_H
|
||||
|
||||
#include "db_access.h"
|
||||
|
||||
/*
|
||||
* Here are the definitions for architecture dependent byte ordering
|
||||
* and floating point format
|
||||
*/
|
||||
#if defined(VAX)
|
||||
# define CA_FLOAT_MIT
|
||||
# define CA_LITTLE_ENDIAN
|
||||
#elif defined(_X86_)
|
||||
# define CA_FLOAT_IEEE
|
||||
# define CA_LITTLE_ENDIAN
|
||||
#elif (defined(__ALPHA) && defined(VMS) || defined(__alpha)) && defined(VMS)
|
||||
# define CA_FLOAT_MIT
|
||||
# define CA_LITTLE_ENDIAN
|
||||
#elif (defined(__ALPHA) && defined(UNIX) || defined(__alpha)) && defined(UNIX)
|
||||
# define CA_FLOAT_IEEE
|
||||
# define CA_LITTLE_ENDIAN
|
||||
#else
|
||||
# define CA_FLOAT_IEEE
|
||||
# define CA_BIG_ENDIAN
|
||||
#endif
|
||||
|
||||
/*
|
||||
* some architecture sanity checks
|
||||
*/
|
||||
#if defined(CA_BIG_ENDIAN) && defined(CA_LITTLE_ENDIAN)
|
||||
#error defined(CA_BIG_ENDIAN) && defined(CA_LITTLE_ENDIAN)
|
||||
#endif
|
||||
#if !defined(CA_BIG_ENDIAN) && !defined(CA_LITTLE_ENDIAN)
|
||||
#error !defined(CA_BIG_ENDIAN) && !defined(CA_LITTLE_ENDIAN)
|
||||
#endif
|
||||
#if defined(CA_FLOAT_IEEE) && defined(CA_FLOAT_MIT)
|
||||
#error defined(CA_FLOAT_IEEE) && defined(CA_FLOAT_MIT)
|
||||
#endif
|
||||
#if !defined(CA_FLOAT_IEEE) && !defined(CA_FLOAT_MIT)
|
||||
#error !defined(CA_FLOAT_IEEE) && !defined(CA_FLOAT_MIT)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* CONVERSION_REQUIRED is set if either the byte order
|
||||
* or the floating point does not match
|
||||
*/
|
||||
#if !defined(CA_FLOAT_IEEE) || !defined(CA_BIG_ENDIAN)
|
||||
#define CONVERSION_REQUIRED
|
||||
#endif
|
||||
|
||||
/*
|
||||
* if hton is true then it is a host to network conversion
|
||||
* otherwise vise-versa
|
||||
*
|
||||
* net format: big endian and IEEE float
|
||||
*/
|
||||
|
||||
typedef void CACVRTFUNC(void *pSrc, void *pDest, int hton, unsigned long count);
|
||||
|
||||
#ifdef CONVERSION_REQUIRED
|
||||
/* cvrt is (array of) (pointer to) (function returning) int */
|
||||
extern CACVRTFUNC *cac_dbr_cvrt[LAST_BUFFER_TYPE+1];
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Macros ...
|
||||
*
|
||||
* This is also used in the ca server on pc486 archs,
|
||||
* where source and destination buffers are identical,
|
||||
* so we need a tmp variable in e.g. 'double' conversions.
|
||||
*/
|
||||
|
||||
#ifdef CA_LITTLE_ENDIAN
|
||||
# ifndef ntohs
|
||||
# define ntohs(SHORT)\
|
||||
( ((SHORT) & 0x00ff) << 8 | ((SHORT) & 0xff00) >> 8 )
|
||||
( (dbr_short_t)\
|
||||
(((SHORT) & (dbr_short_t) 0x00ff) << 8 |\
|
||||
((SHORT) & (dbr_short_t) 0xff00) >> 8) )
|
||||
# endif
|
||||
# ifndef htons
|
||||
# define htons(SHORT)\
|
||||
( ((SHORT) & 0x00ff) << 8 | ((SHORT) & 0xff00) >> 8 )
|
||||
( (dbr_short_t)\
|
||||
(((SHORT) & (dbr_short_t) 0x00ff) << 8 |\
|
||||
((SHORT) & (dbr_short_t) 0xff00) >> 8) )
|
||||
# endif
|
||||
#else
|
||||
# ifndef ntohs
|
||||
@@ -41,19 +124,19 @@
|
||||
# ifndef ntohl
|
||||
# define ntohl(LONG)\
|
||||
(\
|
||||
((LONG) & 0xff000000) >> 24 |\
|
||||
((LONG) & 0x000000ff) << 24 |\
|
||||
((LONG) & 0x0000ff00) << 8 |\
|
||||
((LONG) & 0x00ff0000) >> 8\
|
||||
((LONG) & (dbr_long_t) 0xff000000) >> 24 |\
|
||||
((LONG) & (dbr_long_t) 0x000000ff) << 24 |\
|
||||
((LONG) & (dbr_long_t) 0x0000ff00) << 8 |\
|
||||
((LONG) & (dbr_long_t) 0x00ff0000) >> 8\
|
||||
)
|
||||
# endif
|
||||
# ifndef htonl
|
||||
# define htonl(LONG)\
|
||||
(\
|
||||
((LONG) & 0x000000ff) << 24 |\
|
||||
((LONG) & 0xff000000) >> 24 |\
|
||||
((LONG) & 0x00ff0000) >> 8 |\
|
||||
((LONG) & 0x0000ff00) << 8\
|
||||
( (dbr_long_t) \
|
||||
(((LONG) & (dbr_long_t) 0x000000ff) << 24 |\
|
||||
((LONG) & (dbr_long_t) 0xff000000) >> 24 |\
|
||||
((LONG) & (dbr_long_t) 0x00ff0000) >> 8 |\
|
||||
((LONG) & (dbr_long_t) 0x0000ff00) << 8 )\
|
||||
)
|
||||
# endif
|
||||
# else
|
||||
@@ -79,12 +162,20 @@
|
||||
{*((dbr_long_t *)(HOST)) = ntohl(*((dbr_long_t *)(NET )));}
|
||||
# define dbr_htonf(HOST,NET) \
|
||||
{*((dbr_long_t *)(NET) ) = htonl(*((dbr_long_t *)(HOST)));}
|
||||
# define dbr_ntohd(NET,HOST) \
|
||||
{ ((dbr_long_t *)(HOST))[1] = ntohl(((dbr_long_t *)(NET))[0]) ; \
|
||||
((dbr_long_t *)(HOST))[0] = ntohl(((dbr_long_t *)(NET))[1]) ;}
|
||||
# define dbr_htond(HOST,NET) \
|
||||
{ ((dbr_long_t *)(NET))[1] = htonl(((dbr_long_t *)(HOST))[0]) ; \
|
||||
((dbr_long_t *)(NET))[0] = htonl(((dbr_long_t *)(HOST))[1]) ;}
|
||||
# define dbr_ntohd(NET,HOST) \
|
||||
{ \
|
||||
dbr_long_t cvrt_tmp; \
|
||||
cvrt_tmp = ntohl(((dbr_long_t *)(NET))[0]); \
|
||||
((dbr_long_t *)(HOST))[0] = ntohl(((dbr_long_t *)(NET))[1]); \
|
||||
((dbr_long_t *)(HOST))[1] = cvrt_tmp; \
|
||||
}
|
||||
# define dbr_htond(HOST,NET) \
|
||||
{ \
|
||||
dbr_long_t cvrt_tmp; \
|
||||
cvrt_tmp = htonl(((dbr_long_t *)(HOST))[0]); \
|
||||
((dbr_long_t *)(NET))[0] = htonl(((dbr_long_t *)(HOST))[1]); \
|
||||
((dbr_long_t *)(NET))[1] = cvrt_tmp; \
|
||||
}
|
||||
#else
|
||||
void dbr_htond(dbr_double_t *pHost, dbr_double_t *pNet);
|
||||
void dbr_ntohd(dbr_double_t *pNet, dbr_double_t *pHost);
|
||||
@@ -92,3 +183,4 @@
|
||||
void dbr_ntohf(dbr_float_t *pNet, dbr_float_t *pHost);
|
||||
#endif
|
||||
|
||||
#endif /* define _NET_CONVERT_H */
|
||||
|
||||
@@ -39,7 +39,7 @@ static char *sccsId = "@(#) $Id$";
|
||||
#include <string.h>
|
||||
|
||||
#ifdef WIN32
|
||||
# include <winsock.h>
|
||||
# include <windows.h>
|
||||
#else
|
||||
# include <sys/types.h>
|
||||
# include <sys/socket.h>
|
||||
@@ -48,7 +48,7 @@ static char *sccsId = "@(#) $Id$";
|
||||
# include <netdb.h>
|
||||
#endif
|
||||
|
||||
#include <epicsAssert.h>
|
||||
#include "epicsAssert.h"
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -35,52 +35,16 @@
|
||||
|
||||
static char *os_depenhSccsId = "$Id$";
|
||||
|
||||
/*
|
||||
* errno.h is ANSI however we
|
||||
* include it here because of differences
|
||||
* between error code sets provided by
|
||||
* each socket library
|
||||
*/
|
||||
#ifdef UNIX
|
||||
# include <unistd.h>
|
||||
# include <errno.h>
|
||||
# include <time.h>
|
||||
# include <sys/types.h>
|
||||
# include <sys/time.h>
|
||||
# include <sys/ioctl.h>
|
||||
# include <sys/param.h>
|
||||
# include <sys/socket.h>
|
||||
# include <netinet/in.h>
|
||||
# include <netinet/tcp.h>
|
||||
# include <net/if.h>
|
||||
# include <arpa/inet.h>
|
||||
# include <netdb.h>
|
||||
/*
|
||||
* normally these are included by ioctl.h
|
||||
*/
|
||||
# ifdef SOLARIS
|
||||
# include <sys/filio.h>
|
||||
# include <sys/sockio.h>
|
||||
# endif
|
||||
# define CA_OS_CONFIGURED
|
||||
#endif
|
||||
|
||||
#ifdef vxWorks
|
||||
# include <vxWorks.h>
|
||||
# include <errno.h>
|
||||
# include <sys/types.h>
|
||||
# include <sys/ioctl.h>
|
||||
# include <sys/socket.h>
|
||||
# include <netinet/in.h>
|
||||
# include <netinet/tcp.h>
|
||||
# include <net/if.h>
|
||||
|
||||
# include <systime.h>
|
||||
# include <ioLib.h>
|
||||
# include <tickLib.h>
|
||||
# include <taskHookLib.h>
|
||||
# include <selectLib.h>
|
||||
# include <sockLib.h>
|
||||
# include <errnoLib.h>
|
||||
# include <sysLib.h>
|
||||
# include <taskVarLib.h>
|
||||
@@ -90,55 +54,19 @@ static char *os_depenhSccsId = "$Id$";
|
||||
# include <dbgLib.h>
|
||||
# include <inetLib.h>
|
||||
# include <taskLib.h>
|
||||
# include <vxLib.h>
|
||||
|
||||
# include <task_params.h>
|
||||
# include <taskwd.h>
|
||||
# include <fast_lock.h>
|
||||
# include "task_params.h"
|
||||
# include "taskwd.h"
|
||||
|
||||
/*
|
||||
* logistical problems prevent including this file
|
||||
*/
|
||||
#if 0
|
||||
#define caClient
|
||||
#include <dbEvent.h>
|
||||
#endif
|
||||
# define CA_OS_CONFIGURED
|
||||
#endif
|
||||
|
||||
#ifdef VMS
|
||||
# include <sys/types.h>
|
||||
# include <sys/socket.h>
|
||||
# include <netinet/in.h>
|
||||
# include <netinet/tcp.h>
|
||||
#if !defined(UCX)
|
||||
# include <sys/time.h>
|
||||
# include <tcp/errno.h>
|
||||
#else
|
||||
# include <errno>
|
||||
#endif
|
||||
# include <ssdef>
|
||||
# include <stsdef>
|
||||
# include <iodef.h>
|
||||
# include <psldef.h>
|
||||
# include <prcdef.h>
|
||||
# include <descrip.h>
|
||||
# define MAXHOSTNAMELEN 75
|
||||
#ifdef UCX /* GeG 09-DEC-1992 */
|
||||
# include <sys/ucx$inetdef.h>
|
||||
# include <ucx.h>
|
||||
#else
|
||||
# include <net/if.h>
|
||||
# include <vms/inetiodef.h>
|
||||
# include <sys/ioctl.h>
|
||||
#endif
|
||||
# define CA_OS_CONFIGURED
|
||||
#endif /*VMS*/
|
||||
|
||||
#ifdef WIN32
|
||||
# include <errno.h>
|
||||
# include <time.h>
|
||||
# include <windows.h>
|
||||
# include <winsock.h>
|
||||
# define CA_OS_CONFIGURED
|
||||
#endif /*WIN32*/
|
||||
|
||||
@@ -146,87 +74,8 @@ static char *os_depenhSccsId = "$Id$";
|
||||
#error Please define one of vxWorks, UNIX, VMS, or WIN32
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Here are the definitions for architecture dependent byte ordering
|
||||
* and floating point format
|
||||
*/
|
||||
#if defined(VAX)
|
||||
# define CA_FLOAT_MIT
|
||||
# define CA_LITTLE_ENDIAN
|
||||
#elif defined(_X86_)
|
||||
# define CA_FLOAT_IEEE
|
||||
# define CA_LITTLE_ENDIAN
|
||||
#elif (defined(__ALPHA) && defined(VMS) || defined(__alpha)) && defined(VMS)
|
||||
# define CA_FLOAT_MIT
|
||||
# define CA_LITTLE_ENDIAN
|
||||
#elif (defined(__ALPHA) && defined(UNIX) || defined(__alpha)) && defined(UNIX)
|
||||
# define CA_FLOAT_IEEE
|
||||
# define CA_LITTLE_ENDIAN
|
||||
#else
|
||||
# define CA_FLOAT_IEEE
|
||||
# define CA_BIG_ENDIAN
|
||||
#endif
|
||||
|
||||
/*
|
||||
* some architecture sanity checks
|
||||
*/
|
||||
#if defined(CA_BIG_ENDIAN) && defined(CA_LITTLE_ENDIAN)
|
||||
#error defined(CA_BIG_ENDIAN) && defined(CA_LITTLE_ENDIAN)
|
||||
#endif
|
||||
#if !defined(CA_BIG_ENDIAN) && !defined(CA_LITTLE_ENDIAN)
|
||||
#error !defined(CA_BIG_ENDIAN) && !defined(CA_LITTLE_ENDIAN)
|
||||
#endif
|
||||
#if defined(CA_FLOAT_IEEE) && defined(CA_FLOAT_MIT)
|
||||
#error defined(CA_FLOAT_IEEE) && defined(CA_FLOAT_MIT)
|
||||
#endif
|
||||
#if !defined(CA_FLOAT_IEEE) && !defined(CA_FLOAT_MIT)
|
||||
#error !defined(CA_FLOAT_IEEE) && !defined(CA_FLOAT_MIT)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* CONVERSION_REQUIRED is set if either the byte order
|
||||
* or the floating point does not match
|
||||
*/
|
||||
#if !defined(CA_FLOAT_IEEE) || !defined(CA_BIG_ENDIAN)
|
||||
#define CONVERSION_REQUIRED
|
||||
#endif
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#endif
|
||||
|
||||
#ifndef OK
|
||||
#define OK 0
|
||||
#endif
|
||||
|
||||
#ifndef ERROR
|
||||
#define ERROR (-1)
|
||||
#endif
|
||||
|
||||
#ifndef NELEMENTS
|
||||
#define NELEMENTS(array) (sizeof(array)/sizeof((array)[0]))
|
||||
#endif
|
||||
|
||||
#ifndef LOCAL
|
||||
#define LOCAL static
|
||||
#endif
|
||||
|
||||
/*
|
||||
* BSD prototypes missing from SUNOS4, MULTINET and
|
||||
* perhaps other environments
|
||||
*/
|
||||
#include <epicsTypes.h>
|
||||
#include <bsdProto.h>
|
||||
|
||||
#if defined(vxWorks)
|
||||
# define POST_IO_EV semGive(io_done_sem)
|
||||
# define VXTASKIDNONE 0
|
||||
# define LOCK semTake(client_lock, WAIT_FOREVER);
|
||||
# define UNLOCK semGive(client_lock);
|
||||
@@ -238,79 +87,34 @@ static char *os_depenhSccsId = "$Id$";
|
||||
(((int)taskIdCurrent)==event_tid || ca_static->recv_tid == (int)taskIdCurrent)
|
||||
# define VXTHISTASKID taskIdSelf()
|
||||
# define abort() taskSuspend(VXTHISTASKID)
|
||||
# define socket_close(S) close(S)
|
||||
/* vxWorks still has a brain dead func proto for ioctl */
|
||||
# define socket_ioctl(A,B,C) ioctl(A,B,(int)C)
|
||||
# define MYERRNO (errnoGet()&0xffff)
|
||||
# define POST_IO_EV semGive(io_done_sem)
|
||||
typedef int SOCKET;
|
||||
# define INVALID_SOCKET (-1)
|
||||
#endif
|
||||
|
||||
#if defined(UNIX)
|
||||
# define POST_IO_EV
|
||||
# define LOCK
|
||||
# define UNLOCK
|
||||
# define LOCKEVENTS
|
||||
# define UNLOCKEVENTS
|
||||
# define EVENTLOCKTEST (post_msg_active)
|
||||
# define socket_close(S) close(S)
|
||||
# define socket_ioctl(A,B,C) ioctl(A,B,C)
|
||||
# define MYERRNO errno
|
||||
# define POST_IO_EV
|
||||
typedef int SOCKET;
|
||||
# define INVALID_SOCKET (-1)
|
||||
#endif
|
||||
|
||||
#if defined(VMS)
|
||||
# if defined(WINTCP) /* Wallangong */
|
||||
/* (the VAXC runtime lib has its own close */
|
||||
# define socket_close(S) netclose(S)
|
||||
# define socket_ioctl(A,B,C) ioctl(A,B,C)
|
||||
# endif
|
||||
# if defined(UCX) /* GeG 09-DEC-1992 */
|
||||
# define socket_close(S) close(S)
|
||||
# define socket_ioctl(A,B,C) ioctl(A,B,C)
|
||||
# endif
|
||||
# ifdef WINTCP
|
||||
extern int uerrno;
|
||||
# define MYERRNO uerrno
|
||||
# else
|
||||
# ifdef UCX
|
||||
# define MYERRNO errno
|
||||
# else
|
||||
# define MYERRNO socket_errno
|
||||
# endif
|
||||
# endif
|
||||
# define POST_IO_EV
|
||||
# define LOCK
|
||||
# define UNLOCK
|
||||
# define LOCKEVENTS
|
||||
# define UNLOCKEVENTS
|
||||
# define EVENTLOCKTEST (post_msg_active)
|
||||
typedef int SOCKET;
|
||||
# define INVALID_SOCKET (-1)
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
# define POST_IO_EV
|
||||
# define LOCK
|
||||
# define UNLOCK
|
||||
# define LOCKEVENTS
|
||||
# define UNLOCKEVENTS
|
||||
# define EVENTLOCKTEST (post_msg_active)
|
||||
# define MAXHOSTNAMELEN 75
|
||||
# define IPPORT_USERRESERVED 5000U
|
||||
# define EWOULDBLOCK WSAEWOULDBLOCK
|
||||
# define ENOBUFS WSAENOBUFS
|
||||
# define ECONNRESET WSAECONNRESET
|
||||
# define ETIMEDOUT WSAETIMEDOUT
|
||||
# define EADDRINUSE WSAEADDRINUSE
|
||||
# define ECONNREFUSED WSAECONNREFUSED
|
||||
# define socket_close(S) closesocket(S)
|
||||
# define socket_ioctl(A,B,C) ioctlsocket(A,B,C)
|
||||
# define MYERRNO WSAGetLastError()
|
||||
# define POST_IO_EV
|
||||
# define EVENTLOCKTEST (post_msg_active)
|
||||
#endif /*WIN32*/
|
||||
|
||||
|
||||
#endif
|
||||
#endif /* INCos_depenh */
|
||||
|
||||
|
||||
@@ -29,6 +29,12 @@
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* $Log$
|
||||
* Revision 1.20 1996/11/02 00:51:02 jhill
|
||||
* many pc port, const in API, and other changes
|
||||
*
|
||||
* Revision 1.19 1996/07/09 22:41:02 jhill
|
||||
* pass nill 2nd arg to gettimeofday()
|
||||
*
|
||||
* Revision 1.18 1996/06/20 21:19:29 jhill
|
||||
* fixed posix signal problem with "cc -Xc"
|
||||
*
|
||||
@@ -46,13 +52,9 @@
|
||||
|
||||
#include <unistd.h>
|
||||
#include <pwd.h>
|
||||
#include <sys/param.h>
|
||||
|
||||
#include "iocinf.h"
|
||||
|
||||
#define _POSIX_C_SOURCE 3 /* for solaris and "cc -Xc" */
|
||||
#include <signal.h>
|
||||
|
||||
|
||||
/*
|
||||
* cac_gettimeval
|
||||
@@ -121,37 +123,9 @@ int cac_add_task_variable(struct ca_static *ca_temp)
|
||||
int cac_os_depen_init(struct ca_static *pcas)
|
||||
{
|
||||
int status;
|
||||
struct sigaction sa;
|
||||
|
||||
ca_static = pcas;
|
||||
|
||||
/*
|
||||
* dont allow disconnect to terminate process
|
||||
* when running in UNIX environment
|
||||
*
|
||||
* allow error to be returned to sendto()
|
||||
* instead of handling disconnect at interrupt
|
||||
*/
|
||||
status = sigaction(SIGPIPE, NULL, &sa);
|
||||
if (status==0) {
|
||||
if (sa.sa_handler == SIG_DFL) {
|
||||
sa.sa_handler = SIG_IGN;
|
||||
status = sigaction(SIGPIPE, &sa, NULL);
|
||||
if (status) {
|
||||
ca_printf(
|
||||
"%s: Error from signal replace was \"%s\"\n",
|
||||
__FILE__,
|
||||
strerror(MYERRNO));
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
ca_printf(
|
||||
"%s: Error from signal query was \"%s\"\n",
|
||||
__FILE__,
|
||||
strerror(MYERRNO));
|
||||
}
|
||||
|
||||
status = ca_os_independent_init ();
|
||||
|
||||
return status;
|
||||
@@ -238,7 +212,7 @@ void ca_spawn_repeater()
|
||||
if(status<0){
|
||||
ca_printf("!!WARNING!!\n");
|
||||
ca_printf("The executable \"%s\" couldnt be located\n", pImageName);
|
||||
ca_printf("because of errno = \"%s\"\n", strerror(MYERRNO));
|
||||
ca_printf("because of errno = \"%s\"\n", strerror(errno));
|
||||
ca_printf("You may need to modify your PATH environment variable.\n");
|
||||
ca_printf("Creating CA repeater with fork() system call.\n");
|
||||
ca_printf("Repeater will inherit parents process name and resources.\n");
|
||||
|
||||
@@ -63,6 +63,15 @@
|
||||
* datagram socket (and watching for ECONNREFUSED)
|
||||
*
|
||||
* $Log$
|
||||
* Revision 1.38 1996/11/02 00:51:04 jhill
|
||||
* many pc port, const in API, and other changes
|
||||
*
|
||||
* Revision 1.37 1996/09/04 20:02:32 jhill
|
||||
* fixed gcc warning
|
||||
*
|
||||
* Revision 1.36 1996/07/12 00:40:48 jhill
|
||||
* fixed client disconnect problem under solaris
|
||||
*
|
||||
* Revision 1.32.6.1 1996/07/12 00:39:59 jhill
|
||||
* fixed client disconnect problem under solaris
|
||||
*
|
||||
@@ -115,13 +124,13 @@ LOCAL void fanOut(struct sockaddr_in *pFrom, const char *pMsg, unsigned msgSize)
|
||||
*/
|
||||
void ca_repeater()
|
||||
{
|
||||
int status;
|
||||
int size;
|
||||
SOCKET sock;
|
||||
struct sockaddr_in from;
|
||||
struct sockaddr_in local;
|
||||
int from_size = sizeof from;
|
||||
unsigned short port;
|
||||
int status;
|
||||
int size;
|
||||
SOCKET sock;
|
||||
struct sockaddr_in from;
|
||||
struct sockaddr_in local;
|
||||
int from_size = sizeof from;
|
||||
unsigned short port;
|
||||
|
||||
port = caFetchPortConfig(
|
||||
&EPICS_CA_REPEATER_PORT,
|
||||
@@ -134,12 +143,12 @@ void ca_repeater()
|
||||
/*
|
||||
* test for server was already started
|
||||
*/
|
||||
if (MYERRNO==EADDRINUSE) {
|
||||
if (SOCKERRNO==EADDRINUSE) {
|
||||
exit(0);
|
||||
}
|
||||
ca_printf("%s: Unable to create repeater socket because \"%s\"\n",
|
||||
__FILE__,
|
||||
strerror(MYERRNO));
|
||||
strerror(SOCKERRNO));
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@@ -171,12 +180,12 @@ void ca_repeater()
|
||||
* Avoid spurious ECONNREFUSED bug
|
||||
* in linux
|
||||
*/
|
||||
if (MYERRNO==ECONNREFUSED) {
|
||||
if (SOCKERRNO==ECONNREFUSED) {
|
||||
continue;
|
||||
}
|
||||
# endif
|
||||
ca_printf("CA Repeater: recv err %s\n",
|
||||
strerror(MYERRNO));
|
||||
strerror(SOCKERRNO));
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -186,7 +195,7 @@ void ca_repeater()
|
||||
* both zero length message and a registration message
|
||||
* will register a new client
|
||||
*/
|
||||
if(size >= sizeof(*pMsg)){
|
||||
if( ((size_t)size) >= sizeof(*pMsg)){
|
||||
if(ntohs(pMsg->m_cmmd) == REPEATER_REGISTER){
|
||||
register_new_client(&local, &from);
|
||||
|
||||
@@ -243,10 +252,10 @@ LOCAL void fanOut(struct sockaddr_in *pFrom, const char *pMsg, unsigned msgSize)
|
||||
#endif
|
||||
}
|
||||
if(status < 0){
|
||||
if (MYERRNO == ECONNREFUSED) {
|
||||
if (SOCKERRNO == ECONNREFUSED) {
|
||||
#ifdef DEBUG
|
||||
ca_printf("Deleted client %d\n",
|
||||
pclient->from.sin_port);
|
||||
ntohs( pclient->from.sin_port));
|
||||
#endif
|
||||
ellDelete(&theClients,
|
||||
&pclient->node);
|
||||
@@ -256,7 +265,7 @@ LOCAL void fanOut(struct sockaddr_in *pFrom, const char *pMsg, unsigned msgSize)
|
||||
else {
|
||||
ca_printf(
|
||||
"CA Repeater: fan out err was \"%s\"\n",
|
||||
strerror(MYERRNO));
|
||||
strerror(SOCKERRNO));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -279,10 +288,10 @@ LOCAL void verifyClients()
|
||||
ellAdd(&theClients, &pclient->node);
|
||||
|
||||
sock = makeSocket(ntohs(pclient->from.sin_port), FALSE);
|
||||
if (sock>=0) {
|
||||
if (sock!=INVALID_SOCKET) {
|
||||
#ifdef DEBUG
|
||||
ca_printf("Deleted client %d\n",
|
||||
pclient->from.sin_port);
|
||||
ntohs(pclient->from.sin_port));
|
||||
#endif
|
||||
ellDelete(&theClients, &pclient->node);
|
||||
socket_close(sock);
|
||||
@@ -290,9 +299,10 @@ LOCAL void verifyClients()
|
||||
free(pclient);
|
||||
}
|
||||
else {
|
||||
if (MYERRNO!=EADDRINUSE) {
|
||||
if (SOCKERRNO!=EADDRINUSE) {
|
||||
ca_printf(
|
||||
"CA Repeater: bind test err was \"%s\"\n", strerror(MYERRNO));
|
||||
"CA Repeater: bind test err was %d=\"%s\"\n",
|
||||
SOCKERRNO, strerror(SOCKERRNO));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -321,6 +331,16 @@ LOCAL SOCKET makeSocket(unsigned short port, int reuseAddr)
|
||||
* no need to bind if unconstrained
|
||||
*/
|
||||
if (port != PORT_ANY) {
|
||||
|
||||
memset((char *)&bd, 0, sizeof(bd));
|
||||
bd.sin_family = AF_INET;
|
||||
bd.sin_addr.s_addr = INADDR_ANY;
|
||||
bd.sin_port = htons(port);
|
||||
status = bind(sock, (struct sockaddr *)&bd, (int)sizeof(bd));
|
||||
if (status<0) {
|
||||
socket_close(sock);
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
if (reuseAddr) {
|
||||
status = setsockopt( sock,
|
||||
SOL_SOCKET,
|
||||
@@ -330,19 +350,9 @@ LOCAL SOCKET makeSocket(unsigned short port, int reuseAddr)
|
||||
if (status<0) {
|
||||
ca_printf(
|
||||
"%s: set socket option failed because \"%s\"\n",
|
||||
__FILE__, strerror(MYERRNO));
|
||||
__FILE__, strerror(SOCKERRNO));
|
||||
}
|
||||
}
|
||||
|
||||
memset((char *)&bd, 0, sizeof(bd));
|
||||
bd.sin_family = AF_INET;
|
||||
bd.sin_addr.s_addr = INADDR_ANY;
|
||||
bd.sin_port = htons(port);
|
||||
status = bind(sock, (struct sockaddr *)&bd, (int)sizeof(bd));
|
||||
if(status<0){
|
||||
socket_close(sock);
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
}
|
||||
|
||||
return sock;
|
||||
@@ -395,7 +405,7 @@ struct sockaddr_in *pFrom)
|
||||
free(pclient);
|
||||
ca_printf("%s: no client sock because \"%s\"\n",
|
||||
__FILE__,
|
||||
strerror(MYERRNO));
|
||||
strerror(SOCKERRNO));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -418,7 +428,7 @@ struct sockaddr_in *pFrom)
|
||||
#ifdef DEBUG
|
||||
ca_printf (
|
||||
"Added %d\n",
|
||||
pFrom->sin_port);
|
||||
ntohs(pFrom->sin_port));
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -433,7 +443,7 @@ struct sockaddr_in *pFrom)
|
||||
if (status >= 0) {
|
||||
assert(status == sizeof(confirm));
|
||||
}
|
||||
else if (MYERRNO == ECONNREFUSED){
|
||||
else if (SOCKERRNO == ECONNREFUSED){
|
||||
#ifdef DEBUG
|
||||
ca_printf("Deleted repeater client=%d sending ack\n",
|
||||
pFrom->sin_port);
|
||||
@@ -444,7 +454,7 @@ struct sockaddr_in *pFrom)
|
||||
}
|
||||
else {
|
||||
ca_printf("CA Repeater: confirm err was \"%s\"\n",
|
||||
strerror(MYERRNO));
|
||||
strerror(SOCKERRNO));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
308
src/ca/service.c
308
src/ca/service.c
@@ -73,12 +73,6 @@ static char *sccsId = "@(#) $Id$";
|
||||
#include "iocinf.h"
|
||||
#include "net_convert.h"
|
||||
|
||||
|
||||
LOCAL void reconnect_channel(
|
||||
IIU *piiu,
|
||||
chid chan
|
||||
);
|
||||
|
||||
LOCAL int cacMsg(
|
||||
struct ioc_in_use *piiu,
|
||||
const struct in_addr *pnet_addr
|
||||
@@ -177,17 +171,25 @@ unsigned long blockSize
|
||||
* make sure we have a large enough message body cache
|
||||
*/
|
||||
if (piiu->curMsg.m_postsize>piiu->curDataMax) {
|
||||
void *pCurData;
|
||||
size_t size;
|
||||
|
||||
/*
|
||||
* scalar DBR_STRING is sometimes clipped to the
|
||||
* actual string size so make sure this cache is
|
||||
* as large as one DBR_STRING so they will
|
||||
* not page fault if they read MAX_STRING_SIZE
|
||||
* bytes (instead of the actual string size).
|
||||
*/
|
||||
size = max(piiu->curMsg.m_postsize,MAX_STRING_SIZE);
|
||||
pCurData = (void *) calloc(1u, size);
|
||||
if(!pCurData){
|
||||
return ERROR;
|
||||
}
|
||||
if(piiu->pCurData){
|
||||
free(piiu->pCurData);
|
||||
}
|
||||
piiu->pCurData = (void *)
|
||||
malloc(piiu->curMsg.m_postsize);
|
||||
if(!piiu->pCurData){
|
||||
piiu->curDataMax = 0;
|
||||
piiu->curMsgBytes = 0;
|
||||
piiu->curDataBytes = 0;
|
||||
return ERROR;
|
||||
}
|
||||
piiu->pCurData = pCurData;
|
||||
piiu->curDataMax =
|
||||
piiu->curMsg.m_postsize;
|
||||
}
|
||||
@@ -241,7 +243,8 @@ struct ioc_in_use *piiu,
|
||||
const struct in_addr *pnet_addr
|
||||
)
|
||||
{
|
||||
evid monix;
|
||||
miu monix;
|
||||
ciu pChan;
|
||||
|
||||
switch (piiu->curMsg.m_cmmd) {
|
||||
|
||||
@@ -260,7 +263,7 @@ const struct in_addr *pnet_addr
|
||||
* run the user's event handler
|
||||
*/
|
||||
LOCK;
|
||||
monix = (evid) bucketLookupItemUnsignedId(
|
||||
monix = (miu) bucketLookupItemUnsignedId(
|
||||
pFastBucket,
|
||||
&piiu->curMsg.m_available);
|
||||
UNLOCK;
|
||||
@@ -274,7 +277,7 @@ const struct in_addr *pnet_addr
|
||||
* chid in the interim
|
||||
*/
|
||||
if (monix->usr_func) {
|
||||
args.usr = monix->usr_arg;
|
||||
args.usr = (void *) monix->usr_arg;
|
||||
args.chid = monix->chan;
|
||||
args.type = monix->type;
|
||||
args.count = monix->count;
|
||||
@@ -308,7 +311,7 @@ const struct in_addr *pnet_addr
|
||||
*/
|
||||
|
||||
LOCK;
|
||||
monix = (evid) bucketLookupItemUnsignedId(
|
||||
monix = (miu) bucketLookupItemUnsignedId(
|
||||
pFastBucket,
|
||||
&piiu->curMsg.m_available);
|
||||
UNLOCK;
|
||||
@@ -329,15 +332,20 @@ const struct in_addr *pnet_addr
|
||||
* format to host format
|
||||
*
|
||||
*/
|
||||
# ifdef CONVERSION_REQUIRED
|
||||
(*cac_dbr_cvrt[piiu->curMsg.m_type])(
|
||||
piiu->pCurData,
|
||||
piiu->pCurData,
|
||||
FALSE,
|
||||
piiu->curMsg.m_count);
|
||||
# endif
|
||||
# ifdef CONVERSION_REQUIRED
|
||||
if (piiu->curMsg.m_type<NELEMENTS(cac_dbr_cvrt)) {
|
||||
(*cac_dbr_cvrt[piiu->curMsg.m_type])(
|
||||
piiu->pCurData,
|
||||
piiu->pCurData,
|
||||
FALSE,
|
||||
piiu->curMsg.m_count);
|
||||
}
|
||||
else {
|
||||
piiu->curMsg.m_cid = htonl(ECA_BADTYPE);
|
||||
}
|
||||
# endif
|
||||
|
||||
args.usr = monix->usr_arg;
|
||||
args.usr = (void *) monix->usr_arg;
|
||||
args.chid = monix->chan;
|
||||
args.type = piiu->curMsg.m_type;
|
||||
args.count = piiu->curMsg.m_count;
|
||||
@@ -377,7 +385,7 @@ const struct in_addr *pnet_addr
|
||||
* run the user's event handler
|
||||
*/
|
||||
LOCK;
|
||||
monix = (evid) bucketLookupItemUnsignedId(
|
||||
monix = (miu) bucketLookupItemUnsignedId(
|
||||
pFastBucket,
|
||||
&piiu->curMsg.m_available);
|
||||
UNLOCK;
|
||||
@@ -392,7 +400,8 @@ const struct in_addr *pnet_addr
|
||||
*/
|
||||
if (!piiu->curMsg.m_postsize) {
|
||||
LOCK;
|
||||
ellDelete(&monix->chan->eventq, &monix->node);
|
||||
pChan = (ciu) monix->chan; /* discard const */
|
||||
ellDelete(&pChan->eventq, &monix->node);
|
||||
caIOBlockFree(monix);
|
||||
UNLOCK;
|
||||
|
||||
@@ -406,12 +415,17 @@ const struct in_addr *pnet_addr
|
||||
* convert the data buffer from net
|
||||
* format to host format
|
||||
*/
|
||||
# ifdef CONVERSION_REQUIRED
|
||||
(*cac_dbr_cvrt[piiu->curMsg.m_type])(
|
||||
piiu->pCurData,
|
||||
piiu->pCurData,
|
||||
FALSE,
|
||||
piiu->curMsg.m_count);
|
||||
# ifdef CONVERSION_REQUIRED
|
||||
if (piiu->curMsg.m_type<NELEMENTS(cac_dbr_cvrt)) {
|
||||
(*cac_dbr_cvrt[piiu->curMsg.m_type])(
|
||||
piiu->pCurData,
|
||||
piiu->pCurData,
|
||||
FALSE,
|
||||
piiu->curMsg.m_count);
|
||||
}
|
||||
else {
|
||||
piiu->curMsg.m_cid = htonl(ECA_BADTYPE);
|
||||
}
|
||||
# endif
|
||||
|
||||
/*
|
||||
@@ -421,7 +435,7 @@ const struct in_addr *pnet_addr
|
||||
* structure rather than the structure itself
|
||||
* early on.
|
||||
*/
|
||||
args.usr = monix->usr_arg;
|
||||
args.usr = (void *) monix->usr_arg;
|
||||
args.chid = monix->chan;
|
||||
args.type = piiu->curMsg.m_type;
|
||||
args.count = piiu->curMsg.m_count;
|
||||
@@ -450,13 +464,13 @@ const struct in_addr *pnet_addr
|
||||
}
|
||||
case CA_PROTO_READ:
|
||||
{
|
||||
evid pIOBlock;
|
||||
miu pIOBlock;
|
||||
|
||||
/*
|
||||
* verify the event id
|
||||
*/
|
||||
LOCK;
|
||||
pIOBlock = (evid) bucketLookupItemUnsignedId(
|
||||
pIOBlock = (miu) bucketLookupItemUnsignedId(
|
||||
pFastBucket,
|
||||
&piiu->curMsg.m_available);
|
||||
UNLOCK;
|
||||
@@ -473,33 +487,34 @@ const struct in_addr *pnet_addr
|
||||
* convert the data buffer from net
|
||||
* format to host format
|
||||
*/
|
||||
# ifdef CONVERSION_REQUIRED
|
||||
(*cac_dbr_cvrt[piiu->curMsg.m_type])(
|
||||
piiu->pCurData,
|
||||
pIOBlock->usr_arg,
|
||||
FALSE,
|
||||
piiu->curMsg.m_count);
|
||||
# else
|
||||
if (piiu->curMsg.m_type == DBR_STRING &&
|
||||
piiu->curMsg.m_count == 1u) {
|
||||
strcpy ((char *)pIOBlock->usr_arg,
|
||||
piiu->pCurData);
|
||||
}
|
||||
else {
|
||||
memcpy(
|
||||
(char *)pIOBlock->usr_arg,
|
||||
piiu->pCurData,
|
||||
dbr_size_n (
|
||||
piiu->curMsg.m_type,
|
||||
piiu->curMsg.m_count)
|
||||
);
|
||||
}
|
||||
# endif
|
||||
|
||||
/*
|
||||
* decrement the outstanding IO count
|
||||
*/
|
||||
CLRPENDRECV(TRUE);
|
||||
if (piiu->curMsg.m_type <= (unsigned) LAST_BUFFER_TYPE) {
|
||||
# ifdef CONVERSION_REQUIRED
|
||||
(*cac_dbr_cvrt[piiu->curMsg.m_type])(
|
||||
piiu->pCurData,
|
||||
(void *) pIOBlock->usr_arg,
|
||||
FALSE,
|
||||
piiu->curMsg.m_count);
|
||||
# else
|
||||
if (piiu->curMsg.m_type == DBR_STRING &&
|
||||
piiu->curMsg.m_count == 1u) {
|
||||
strcpy ((char *)pIOBlock->usr_arg,
|
||||
piiu->pCurData);
|
||||
}
|
||||
else {
|
||||
memcpy(
|
||||
(char *)pIOBlock->usr_arg,
|
||||
piiu->pCurData,
|
||||
dbr_size_n (
|
||||
piiu->curMsg.m_type,
|
||||
piiu->curMsg.m_count)
|
||||
);
|
||||
}
|
||||
# endif
|
||||
/*
|
||||
* decrement the outstanding IO count
|
||||
*/
|
||||
CLRPENDRECV;
|
||||
}
|
||||
}
|
||||
LOCK;
|
||||
ellDelete(&pend_read_list, &pIOBlock->node);
|
||||
@@ -520,7 +535,20 @@ const struct in_addr *pnet_addr
|
||||
{
|
||||
struct in_addr ina;
|
||||
|
||||
ina.s_addr = piiu->curMsg.m_available;
|
||||
/*
|
||||
* this allows a fan-out server to potentially
|
||||
* insert the true address of a server
|
||||
* (servers prior to 3.13 always set this
|
||||
* field to one of the ip addresses of the host)
|
||||
* (clients prior to 3.13 always expect that this
|
||||
* field is set to the server's IP address).
|
||||
*/
|
||||
if (piiu->curMsg.m_available != INADDR_ANY) {
|
||||
ina.s_addr = piiu->curMsg.m_available;
|
||||
}
|
||||
else {
|
||||
ina = *pnet_addr;
|
||||
}
|
||||
mark_server_available(&ina);
|
||||
}
|
||||
UNLOCK;
|
||||
@@ -543,10 +571,10 @@ const struct in_addr *pnet_addr
|
||||
case CA_PROTO_ERROR:
|
||||
{
|
||||
ELLLIST *pList = NULL;
|
||||
evid monix;
|
||||
miu monix;
|
||||
char nameBuf[64];
|
||||
char context[255];
|
||||
caHdr *req = piiu->pCurData;
|
||||
caHdr *req = piiu->pCurData;
|
||||
int op;
|
||||
struct exception_handler_args args;
|
||||
|
||||
@@ -579,27 +607,29 @@ const struct in_addr *pnet_addr
|
||||
*/
|
||||
monix = NULL;
|
||||
args.addr = NULL;
|
||||
args.pFile = NULL;
|
||||
args.lineNo = 0u;
|
||||
LOCK;
|
||||
switch (ntohs(req->m_cmmd)) {
|
||||
case CA_PROTO_READ_NOTIFY:
|
||||
monix = (evid) bucketLookupItemUnsignedId(
|
||||
monix = (miu) bucketLookupItemUnsignedId(
|
||||
pFastBucket,
|
||||
&req->m_available);
|
||||
pList = &pend_read_list;
|
||||
op = CA_OP_GET;
|
||||
break;
|
||||
case CA_PROTO_READ:
|
||||
monix = (evid) bucketLookupItemUnsignedId(
|
||||
monix = (miu) bucketLookupItemUnsignedId(
|
||||
pFastBucket,
|
||||
&req->m_available);
|
||||
if(monix){
|
||||
args.addr = monix->usr_arg;
|
||||
args.addr = (void *) monix->usr_arg;
|
||||
}
|
||||
pList = &pend_read_list;
|
||||
op = CA_OP_GET;
|
||||
break;
|
||||
case CA_PROTO_WRITE_NOTIFY:
|
||||
monix = (evid) bucketLookupItemUnsignedId(
|
||||
monix = (miu) bucketLookupItemUnsignedId(
|
||||
pFastBucket,
|
||||
&req->m_available);
|
||||
pList = &pend_write_list;
|
||||
@@ -612,16 +642,17 @@ const struct in_addr *pnet_addr
|
||||
op = CA_OP_SEARCH;
|
||||
break;
|
||||
case CA_PROTO_EVENT_ADD:
|
||||
monix = (evid) bucketLookupItemUnsignedId(
|
||||
monix = (miu) bucketLookupItemUnsignedId(
|
||||
pFastBucket,
|
||||
&req->m_available);
|
||||
op = CA_OP_ADD_EVENT;
|
||||
if (monix) {
|
||||
pList = &monix->chan->eventq;
|
||||
ciu pChan = (ciu) monix->chan;
|
||||
pList = &pChan->eventq;
|
||||
}
|
||||
break;
|
||||
case CA_PROTO_EVENT_CANCEL:
|
||||
monix = (evid) bucketLookupItemUnsignedId(
|
||||
monix = (miu) bucketLookupItemUnsignedId(
|
||||
pFastBucket,
|
||||
&req->m_available);
|
||||
op = CA_OP_CLEAR_EVENT;
|
||||
@@ -641,7 +672,7 @@ const struct in_addr *pnet_addr
|
||||
args.chid = bucketLookupItemUnsignedId
|
||||
(pSlowBucket, &piiu->curMsg.m_cid);
|
||||
UNLOCK;
|
||||
args.usr = ca_static->ca_exception_arg;
|
||||
args.usr = (void *) ca_static->ca_exception_arg;
|
||||
args.type = ntohs (req->m_type);
|
||||
args.count = ntohs (req->m_count);
|
||||
args.stat = ntohl (piiu->curMsg.m_available);
|
||||
@@ -656,10 +687,11 @@ const struct in_addr *pnet_addr
|
||||
case CA_PROTO_ACCESS_RIGHTS:
|
||||
{
|
||||
int ar;
|
||||
chid chan;
|
||||
ciu chan;
|
||||
|
||||
LOCK;
|
||||
chan = bucketLookupItemUnsignedId(pSlowBucket, &piiu->curMsg.m_cid);
|
||||
chan = (ciu) bucketLookupItemUnsignedId(
|
||||
pSlowBucket, &piiu->curMsg.m_cid);
|
||||
UNLOCK;
|
||||
if(!chan){
|
||||
/*
|
||||
@@ -684,10 +716,10 @@ const struct in_addr *pnet_addr
|
||||
}
|
||||
case CA_PROTO_CLAIM_CIU:
|
||||
{
|
||||
chid chan;
|
||||
ciu chan;
|
||||
|
||||
LOCK;
|
||||
chan = bucketLookupItemUnsignedId(
|
||||
chan = (ciu) bucketLookupItemUnsignedId(
|
||||
pSlowBucket, &piiu->curMsg.m_cid);
|
||||
UNLOCK;
|
||||
if(!chan){
|
||||
@@ -701,7 +733,7 @@ const struct in_addr *pnet_addr
|
||||
if (CA_V44(CA_PROTOCOL_VERSION,piiu->minor_version_number)) {
|
||||
chan->id.sid = piiu->curMsg.m_available;
|
||||
}
|
||||
reconnect_channel(piiu, chan);
|
||||
cac_reconnect_channel(chan);
|
||||
break;
|
||||
}
|
||||
case CA_PROTO_CLAIM_CIU_FAILED:
|
||||
@@ -723,10 +755,10 @@ const struct in_addr *pnet_addr
|
||||
*/
|
||||
LOCAL void verifyChanAndDisconnect(IIU *piiu, enum channel_state state)
|
||||
{
|
||||
chid chan;
|
||||
ciu chan;
|
||||
|
||||
LOCK;
|
||||
chan = bucketLookupItemUnsignedId(
|
||||
chan = (ciu) bucketLookupItemUnsignedId(
|
||||
pSlowBucket, &piiu->curMsg.m_cid);
|
||||
if (!chan) {
|
||||
/*
|
||||
@@ -756,23 +788,25 @@ IIU *piiu,
|
||||
const struct in_addr *pnet_addr
|
||||
)
|
||||
{
|
||||
int v42;
|
||||
unsigned short port;
|
||||
char rej[64];
|
||||
chid chan;
|
||||
ciu chan;
|
||||
int status;
|
||||
IIU *allocpiiu;
|
||||
IIU *chpiiu;
|
||||
unsigned short *pMinorVersion;
|
||||
unsigned minorVersion;
|
||||
|
||||
if (piiu!=piiuCast) {
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* ignore broadcast replies for deleted channels
|
||||
*
|
||||
* lock required around use of the sprintf buffer
|
||||
*/
|
||||
LOCK;
|
||||
chan = bucketLookupItemUnsignedId(
|
||||
chan = (ciu) bucketLookupItemUnsignedId(
|
||||
pSlowBucket,
|
||||
&piiu->curMsg.m_available);
|
||||
if(!chan){
|
||||
@@ -780,8 +814,7 @@ const struct in_addr *pnet_addr
|
||||
return;
|
||||
}
|
||||
|
||||
chpiiu = chan->piiu;
|
||||
if(!chpiiu){
|
||||
if(!chan->piiu){
|
||||
ca_printf("cast reply to local channel??\n");
|
||||
UNLOCK;
|
||||
return;
|
||||
@@ -798,22 +831,21 @@ const struct in_addr *pnet_addr
|
||||
/*
|
||||
* Ignore duplicate search replies
|
||||
*/
|
||||
if (chpiiu != piiuCast) {
|
||||
if (piiuCast != (IIU *) chan->piiu) {
|
||||
caAddrNode *pNode;
|
||||
IIU *tcpPIIU = (IIU *) chan->piiu;
|
||||
|
||||
pNode = (caAddrNode *) chpiiu->destAddr.node.next;
|
||||
pNode = (caAddrNode *) ellFirst(&tcpPIIU->destAddr);
|
||||
assert(pNode);
|
||||
if (pNode->destAddr.in.sin_addr.s_addr !=
|
||||
pnet_addr->s_addr) {
|
||||
|
||||
if (pNode->destAddr.in.sin_addr.s_addr != pnet_addr->s_addr) {
|
||||
caHostFromInetAddr(pnet_addr,rej,sizeof(rej));
|
||||
sprintf(
|
||||
sprintf_buf,
|
||||
"Channel: %s Accepted: %s Rejected: %s ",
|
||||
(char *)(chan + 1),
|
||||
chpiiu->host_name_str,
|
||||
tcpPIIU->host_name_str,
|
||||
rej);
|
||||
ca_signal(ECA_DBLCHNL, sprintf_buf);
|
||||
genLocalExcep (ECA_DBLCHNL, sprintf_buf);
|
||||
}
|
||||
UNLOCK;
|
||||
return;
|
||||
@@ -870,30 +902,38 @@ const struct in_addr *pnet_addr
|
||||
|
||||
allocpiiu->minor_version_number = minorVersion;
|
||||
|
||||
ellDelete (&chpiiu->chidlist, &chan->node);
|
||||
chan->piiu = allocpiiu;
|
||||
ellAdd (&allocpiiu->chidlist, &chan->node);
|
||||
ca_static->ca_search_responses++;
|
||||
|
||||
/*
|
||||
* If this is the first channel to be
|
||||
* added to this IIU then communicate
|
||||
* the client's name to the server.
|
||||
* (CA V4.1 or higher)
|
||||
*/
|
||||
if (ellCount(&allocpiiu->chidlist)==1) {
|
||||
if (ellCount(&allocpiiu->chidlist)==0) {
|
||||
issue_identify_client(allocpiiu);
|
||||
issue_client_host_name(allocpiiu);
|
||||
}
|
||||
|
||||
/*
|
||||
* claim the resource in the IOC
|
||||
* over TCP so problems with duplicate UDP port
|
||||
* after reboot go away
|
||||
*/
|
||||
chan->id.sid = piiu->curMsg.m_cid;
|
||||
issue_claim_channel(allocpiiu, chan);
|
||||
if (ca_static->ca_search_responses<ULONG_MAX) {
|
||||
ca_static->ca_search_responses++;
|
||||
}
|
||||
|
||||
/*
|
||||
* remove it from the broadcast IIU
|
||||
*/
|
||||
removeFromChanList(chan);
|
||||
|
||||
/*
|
||||
* chan->piiu must be correctly set prior to issuing the
|
||||
* claim request
|
||||
*
|
||||
* add to the beginning of the list until we
|
||||
* have sent the claim message (after which we
|
||||
* move it to the end of the list)
|
||||
*
|
||||
* claim pending flag is set here
|
||||
*/
|
||||
addToChanList(chan, allocpiiu);
|
||||
|
||||
/*
|
||||
* Assume that we have access once connected briefly
|
||||
* until the server is able to tell us the correct
|
||||
@@ -906,40 +946,54 @@ const struct in_addr *pnet_addr
|
||||
chan->ar.read_access = TRUE;
|
||||
chan->ar.write_access = TRUE;
|
||||
|
||||
UNLOCK;
|
||||
/*
|
||||
* Reset the delay to the next search request if we get
|
||||
* at least one response. This may result in an over
|
||||
* run of the UDP input queue of the server in some
|
||||
* cases (and therefore in redundant search requests)
|
||||
* but it does significantly reduce the connect delays
|
||||
* when 1000's of channels must be connected.
|
||||
*/
|
||||
ca_static->ca_conn_next_retry = ca_static->currentTime;
|
||||
|
||||
v42 = CA_V42(
|
||||
CA_PROTOCOL_VERSION,
|
||||
allocpiiu->minor_version_number);
|
||||
if (!v42) {
|
||||
reconnect_channel(piiu, chan);
|
||||
}
|
||||
/*
|
||||
* claim the resource in the IOC
|
||||
* over TCP so problems with duplicate UDP port
|
||||
* after reboot go away
|
||||
*
|
||||
* if we cant immediately get buffer space then we
|
||||
* attempt to flush once and then try again.
|
||||
* If this fails then we will wait for the
|
||||
* next search response.
|
||||
*/
|
||||
chan->id.sid = piiu->curMsg.m_cid;
|
||||
UNLOCK
|
||||
issue_claim_channel(chan);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* reconnect_channel()
|
||||
* cac_reconnect_channel()
|
||||
*
|
||||
* LOCK must _not_ be applied
|
||||
*/
|
||||
LOCAL void reconnect_channel(
|
||||
IIU *piiu,
|
||||
chid chan
|
||||
)
|
||||
void cac_reconnect_channel(ciu chan)
|
||||
{
|
||||
IIU *piiu = (IIU *) chan->piiu;
|
||||
evid pevent;
|
||||
enum channel_state prev_cs;
|
||||
int v41;
|
||||
|
||||
prev_cs = chan->state;
|
||||
if (prev_cs == cs_conn) {
|
||||
ca_printf("Ignored connect response to connected channel\n");
|
||||
ca_printf("CAC: Ignored conn resp to conn chan CID=%u SID=%u?\n",
|
||||
chan->cid, chan->id.sid);
|
||||
return;
|
||||
}
|
||||
|
||||
LOCK;
|
||||
|
||||
v41 = CA_V41(
|
||||
CA_PROTOCOL_VERSION,
|
||||
((IIU *)chan->piiu)->minor_version_number);
|
||||
v41 = CA_V41(CA_PROTOCOL_VERSION, piiu->minor_version_number);
|
||||
|
||||
/* Update rmt chid fields from caHdr fields */
|
||||
chan->type = piiu->curMsg.m_type;
|
||||
@@ -1004,8 +1058,10 @@ chid chan
|
||||
UNLOCKEVENTS;
|
||||
}
|
||||
else if(prev_cs==cs_never_conn){
|
||||
/* decrement the outstanding IO count */
|
||||
CLRPENDRECV(TRUE);
|
||||
/*
|
||||
* decrement the outstanding IO count
|
||||
*/
|
||||
CLRPENDRECV;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
120
src/ca/syncgrp.c
120
src/ca/syncgrp.c
@@ -29,6 +29,15 @@
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* $Log$
|
||||
* Revision 1.22 1996/11/22 19:08:02 jhill
|
||||
* added const to API
|
||||
*
|
||||
* Revision 1.21 1996/11/02 00:51:08 jhill
|
||||
* many pc port, const in API, and other changes
|
||||
*
|
||||
* Revision 1.20 1996/07/10 23:30:12 jhill
|
||||
* fixed GNU warnings
|
||||
*
|
||||
* Revision 1.19 1996/06/19 17:59:29 jhill
|
||||
* many 3.13 beta changes
|
||||
*
|
||||
@@ -49,6 +58,7 @@
|
||||
*/
|
||||
|
||||
#include "iocinf.h"
|
||||
#include "freeList.h"
|
||||
|
||||
LOCAL void io_complete(struct event_handler_args args);
|
||||
|
||||
@@ -61,8 +71,8 @@ void ca_sg_init(void)
|
||||
/*
|
||||
* init all sync group lists
|
||||
*/
|
||||
ellInit(&ca_static->activeCASG);
|
||||
ellInit(&ca_static->freeCASG);
|
||||
freeListInitPvt(&ca_static->ca_sgFreeListPVT,sizeof(CASG),32);
|
||||
freeListInitPvt(&ca_static->ca_sgopFreeListPVT,sizeof(CASGOP),256);
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -93,13 +103,13 @@ void ca_sg_shutdown(struct ca_static *ca_temp)
|
||||
/*
|
||||
* per sync group
|
||||
*/
|
||||
ellFree (&ca_temp->freeCASG);
|
||||
freeListCleanup(ca_temp->ca_sgFreeListPVT);
|
||||
|
||||
/*
|
||||
* per sync group op
|
||||
*/
|
||||
ellFree (&ca_temp->activeCASGOP);
|
||||
ellFree (&ca_temp->freeCASGOP);
|
||||
freeListCleanup(ca_temp->ca_sgopFreeListPVT);
|
||||
|
||||
UNLOCK;
|
||||
|
||||
@@ -126,15 +136,13 @@ int epicsShareAPI ca_sg_create(CA_SYNC_GID *pgid)
|
||||
* first look on a free list. If not there
|
||||
* allocate dynamic memory for it.
|
||||
*/
|
||||
LOCK;
|
||||
pcasg = (CASG *) ellGet(&ca_static->freeCASG);
|
||||
pcasg = (CASG *) freeListMalloc(ca_static->ca_sgFreeListPVT);
|
||||
if(!pcasg){
|
||||
pcasg = (CASG *) malloc(sizeof(*pcasg));
|
||||
if(!pcasg){
|
||||
return ECA_ALLOCMEM;
|
||||
}
|
||||
return ECA_ALLOCMEM;
|
||||
}
|
||||
|
||||
LOCK;
|
||||
|
||||
/*
|
||||
* setup initial values for all of the fields
|
||||
*
|
||||
@@ -164,7 +172,7 @@ int epicsShareAPI ca_sg_create(CA_SYNC_GID *pgid)
|
||||
/*
|
||||
* place it back on the free sync group list
|
||||
*/
|
||||
ellAdd (&ca_static->freeCASG, &pcasg->node);
|
||||
freeListFree(ca_static->ca_sgFreeListPVT, pcasg);
|
||||
UNLOCK;
|
||||
if (status == S_bucket_noMemory) {
|
||||
return ECA_ALLOCMEM;
|
||||
@@ -176,7 +184,7 @@ int epicsShareAPI ca_sg_create(CA_SYNC_GID *pgid)
|
||||
|
||||
UNLOCK;
|
||||
|
||||
*(WRITEABLE_CA_SYNC_GID *)pgid = pcasg->id;
|
||||
*pgid = pcasg->id;
|
||||
return ECA_NORMAL;
|
||||
}
|
||||
|
||||
@@ -184,7 +192,7 @@ int epicsShareAPI ca_sg_create(CA_SYNC_GID *pgid)
|
||||
/*
|
||||
* ca_sg_delete()
|
||||
*/
|
||||
int epicsShareAPI ca_sg_delete(CA_SYNC_GID gid)
|
||||
int epicsShareAPI ca_sg_delete(const CA_SYNC_GID gid)
|
||||
{
|
||||
int status;
|
||||
CASG *pcasg;
|
||||
@@ -211,10 +219,10 @@ int epicsShareAPI ca_sg_delete(CA_SYNC_GID gid)
|
||||
|
||||
pcasg->magic = 0;
|
||||
ellDelete(&ca_static->activeCASG, &pcasg->node);
|
||||
ellAdd(&ca_static->freeCASG, &pcasg->node);
|
||||
|
||||
UNLOCK;
|
||||
|
||||
freeListFree(ca_static->ca_sgFreeListPVT, pcasg);
|
||||
|
||||
return ECA_NORMAL;
|
||||
}
|
||||
|
||||
@@ -222,7 +230,7 @@ int epicsShareAPI ca_sg_delete(CA_SYNC_GID gid)
|
||||
/*
|
||||
* ca_sg_block()
|
||||
*/
|
||||
int epicsShareAPI ca_sg_block(CA_SYNC_GID gid, ca_real timeout)
|
||||
int epicsShareAPI ca_sg_block(const CA_SYNC_GID gid, ca_real timeout)
|
||||
{
|
||||
struct timeval beg_time;
|
||||
ca_real delay;
|
||||
@@ -318,7 +326,7 @@ int epicsShareAPI ca_sg_block(CA_SYNC_GID gid, ca_real timeout)
|
||||
/*
|
||||
* ca_sg_reset
|
||||
*/
|
||||
int epicsShareAPI ca_sg_reset(CA_SYNC_GID gid)
|
||||
int epicsShareAPI ca_sg_reset(const CA_SYNC_GID gid)
|
||||
{
|
||||
CASG *pcasg;
|
||||
|
||||
@@ -340,7 +348,7 @@ int epicsShareAPI ca_sg_reset(CA_SYNC_GID gid)
|
||||
/*
|
||||
* ca_sg_stat
|
||||
*/
|
||||
int epicsShareAPI ca_sg_stat(CA_SYNC_GID gid)
|
||||
int epicsShareAPI ca_sg_stat(const CA_SYNC_GID gid)
|
||||
{
|
||||
CASG *pcasg;
|
||||
CASGOP *pcasgop;
|
||||
@@ -376,7 +384,7 @@ int epicsShareAPI ca_sg_stat(CA_SYNC_GID gid)
|
||||
/*
|
||||
* ca_sg_test
|
||||
*/
|
||||
int epicsShareAPI ca_sg_test(CA_SYNC_GID gid)
|
||||
int epicsShareAPI ca_sg_test(const CA_SYNC_GID gid)
|
||||
{
|
||||
CASG *pcasg;
|
||||
|
||||
@@ -401,34 +409,31 @@ int epicsShareAPI ca_sg_test(CA_SYNC_GID gid)
|
||||
* ca_sg_array_put()
|
||||
*/
|
||||
int epicsShareAPI ca_sg_array_put(
|
||||
CA_SYNC_GID gid,
|
||||
chtype type,
|
||||
unsigned long count,
|
||||
chid chix,
|
||||
void *pvalue)
|
||||
const CA_SYNC_GID gid,
|
||||
chtype type,
|
||||
unsigned long count,
|
||||
chid chix,
|
||||
const void *pvalue)
|
||||
{
|
||||
int status;
|
||||
CASGOP *pcasgop;
|
||||
CASG *pcasg;
|
||||
|
||||
LOCK;
|
||||
pcasg = bucketLookupItemUnsignedId(pSlowBucket, &gid);
|
||||
if(!pcasg || pcasg->magic != CASG_MAGIC){
|
||||
UNLOCK;
|
||||
return ECA_BADSYNCGRP;
|
||||
}
|
||||
|
||||
/*
|
||||
* first look on a free list. If not there
|
||||
* allocate dynamic memory for it.
|
||||
*/
|
||||
pcasgop = (CASGOP *)ellGet(&ca_static->freeCASGOP);
|
||||
pcasgop = (CASGOP *) freeListMalloc(ca_static->ca_sgopFreeListPVT);
|
||||
if(!pcasgop){
|
||||
pcasgop = (CASGOP *)malloc(sizeof(*pcasgop));
|
||||
if(!pcasgop){
|
||||
UNLOCK;
|
||||
return ECA_ALLOCMEM;
|
||||
}
|
||||
return ECA_ALLOCMEM;
|
||||
}
|
||||
|
||||
LOCK;
|
||||
pcasg = bucketLookupItemUnsignedId(pSlowBucket, &gid);
|
||||
if(!pcasg || pcasg->magic != CASG_MAGIC){
|
||||
UNLOCK;
|
||||
freeListFree(ca_static->ca_sgopFreeListPVT, pcasgop);
|
||||
return ECA_BADSYNCGRP;
|
||||
}
|
||||
|
||||
memset((char *)pcasgop, 0,sizeof(*pcasgop));
|
||||
@@ -453,8 +458,8 @@ void *pvalue)
|
||||
assert(pcasg->opPendCount>=1u);
|
||||
pcasg->opPendCount--;
|
||||
ellDelete(&ca_static->activeCASGOP, &pcasgop->node);
|
||||
ellAdd(&ca_static->freeCASGOP, &pcasgop->node);
|
||||
UNLOCK;
|
||||
freeListFree(ca_static->ca_sgopFreeListPVT, pcasgop);
|
||||
}
|
||||
|
||||
|
||||
@@ -467,34 +472,31 @@ void *pvalue)
|
||||
* ca_sg_array_get()
|
||||
*/
|
||||
int epicsShareAPI ca_sg_array_get(
|
||||
CA_SYNC_GID gid,
|
||||
chtype type,
|
||||
unsigned long count,
|
||||
chid chix,
|
||||
void *pvalue)
|
||||
const CA_SYNC_GID gid,
|
||||
chtype type,
|
||||
unsigned long count,
|
||||
chid chix,
|
||||
void *pvalue)
|
||||
{
|
||||
int status;
|
||||
CASGOP *pcasgop;
|
||||
CASG *pcasg;
|
||||
|
||||
LOCK;
|
||||
pcasg = bucketLookupItemUnsignedId(pSlowBucket, &gid);
|
||||
if(!pcasg || pcasg->magic != CASG_MAGIC){
|
||||
UNLOCK;
|
||||
return ECA_BADSYNCGRP;
|
||||
}
|
||||
|
||||
/*
|
||||
* first look on a free list. If not there
|
||||
* allocate dynamic memory for it.
|
||||
*/
|
||||
pcasgop = (CASGOP *)ellGet(&ca_static->freeCASGOP);
|
||||
pcasgop = (CASGOP *) freeListMalloc(ca_static->ca_sgopFreeListPVT);
|
||||
if(!pcasgop){
|
||||
pcasgop = (CASGOP *) malloc(sizeof(*pcasgop));
|
||||
if(!pcasgop){
|
||||
UNLOCK;
|
||||
return ECA_ALLOCMEM;
|
||||
}
|
||||
return ECA_ALLOCMEM;
|
||||
}
|
||||
|
||||
LOCK;
|
||||
pcasg = bucketLookupItemUnsignedId(pSlowBucket, &gid);
|
||||
if(!pcasg || pcasg->magic != CASG_MAGIC){
|
||||
UNLOCK;
|
||||
freeListFree(ca_static->ca_sgopFreeListPVT, pcasgop);
|
||||
return ECA_BADSYNCGRP;
|
||||
}
|
||||
|
||||
memset((char *)pcasgop, 0,sizeof(*pcasgop));
|
||||
@@ -519,8 +521,8 @@ void *pvalue)
|
||||
assert(pcasg->opPendCount>=1u);
|
||||
pcasg->opPendCount--;
|
||||
ellDelete(&ca_static->activeCASGOP, &pcasgop->node);
|
||||
ellAdd(&ca_static->freeCASGOP, &pcasgop->node);
|
||||
UNLOCK;
|
||||
freeListFree(ca_static->ca_sgopFreeListPVT, pcasgop);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
@@ -541,7 +543,6 @@ LOCAL void io_complete(struct event_handler_args args)
|
||||
LOCK;
|
||||
ellDelete(&ca_static->activeCASGOP, &pcasgop->node);
|
||||
pcasgop->magic = 0;
|
||||
ellAdd(&ca_static->freeCASGOP, &pcasgop->node);
|
||||
|
||||
/*
|
||||
* ignore stale replies
|
||||
@@ -561,6 +562,7 @@ LOCAL void io_complete(struct event_handler_args args)
|
||||
pcasgop->id,
|
||||
ca_message(args.status));
|
||||
UNLOCK;
|
||||
freeListFree(ca_static->ca_sgopFreeListPVT, pcasgop);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -581,6 +583,8 @@ LOCAL void io_complete(struct event_handler_args args)
|
||||
|
||||
UNLOCK;
|
||||
|
||||
freeListFree(ca_static->ca_sgopFreeListPVT, pcasgop);
|
||||
|
||||
/*
|
||||
* Wake up any tasks pending
|
||||
*
|
||||
|
||||
@@ -32,6 +32,9 @@
|
||||
* cjm 20-Nov-95 Add code for gettimeofday
|
||||
*
|
||||
* $Log$
|
||||
* Revision 1.20 1996/07/02 23:04:07 jhill
|
||||
* took &tz out of gettimeofday()
|
||||
*
|
||||
* Revision 1.19 1995/12/19 19:35:24 jhill
|
||||
* -cjm 20-Nov-95 Add code for gettimeofday
|
||||
*
|
||||
@@ -47,20 +50,16 @@
|
||||
/*
|
||||
* VMS includes
|
||||
*/
|
||||
#include <stsdef.h>
|
||||
#include <ssdef.h>
|
||||
#include <stsdef.h>
|
||||
#include <iodef.h>
|
||||
#include <psldef.h>
|
||||
#include <prcdef.h>
|
||||
#include <jpidef.h>
|
||||
#include <descrip.h>
|
||||
|
||||
#include "iocinf.h"
|
||||
|
||||
#ifdef UCX
|
||||
#include "ucx.h"
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
#define CONNECTION_TIMER_ID 56
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* cac_gettimeval
|
||||
|
||||
@@ -29,6 +29,21 @@
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* $Log$
|
||||
* Revision 1.29 1997/04/23 17:05:10 jhill
|
||||
* pc port changes
|
||||
*
|
||||
* Revision 1.28 1997/04/10 19:26:19 jhill
|
||||
* asynch connect, faster connect, ...
|
||||
*
|
||||
* Revision 1.27 1996/11/02 00:51:10 jhill
|
||||
* many pc port, const in API, and other changes
|
||||
*
|
||||
* Revision 1.26 1996/09/16 16:39:20 jhill
|
||||
* local except => except handler
|
||||
*
|
||||
* Revision 1.25 1996/08/13 23:16:23 jhill
|
||||
* removed os specific code
|
||||
*
|
||||
* Revision 1.23 1996/08/05 19:18:56 jhill
|
||||
* better msg for lack of fp
|
||||
*
|
||||
@@ -47,9 +62,11 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <callback.h>
|
||||
#include "callback.h"
|
||||
#include "iocinf.h"
|
||||
#include "remLib.h"
|
||||
#include "dbEvent.h"
|
||||
#include "freeList.h"
|
||||
|
||||
LOCAL void ca_repeater_task();
|
||||
LOCAL void ca_task_exit_tcb(WIND_TCB *ptcb);
|
||||
@@ -58,6 +75,7 @@ LOCAL int cac_os_depen_exit_tid (struct ca_static *pcas, int tid);
|
||||
LOCAL int cac_add_task_variable (struct ca_static *ca_temp);
|
||||
LOCAL void deleteCallBack(CALLBACK *pcb);
|
||||
LOCAL void ca_check_for_fp();
|
||||
LOCAL int event_import(int tid);
|
||||
|
||||
/*
|
||||
* order of ops is important here
|
||||
@@ -350,11 +368,13 @@ int cac_os_depen_init(struct ca_static *pcas)
|
||||
int status;
|
||||
|
||||
ellInit(&pcas->ca_local_chidlist);
|
||||
ellInit(&pcas->ca_dbfree_ev_list);
|
||||
ellInit(&pcas->ca_lcl_buff_list);
|
||||
ellInit(&pcas->ca_taskVarList);
|
||||
ellInit(&pcas->ca_putNotifyQue);
|
||||
|
||||
freeListInitPvt(&pcas->ca_dbMonixFreeList,
|
||||
db_sizeof_event_block()+sizeof(struct pending_event),256);
|
||||
|
||||
pcas->ca_tid = taskIdSelf();
|
||||
pcas->ca_client_lock = semMCreate(SEM_DELETE_SAFE);
|
||||
assert(pcas->ca_client_lock);
|
||||
@@ -382,7 +402,7 @@ int cac_os_depen_init(struct ca_static *pcas)
|
||||
assert(evuser);
|
||||
|
||||
status = db_add_extra_labor_event(
|
||||
evuser,
|
||||
(struct event_user *)evuser,
|
||||
ca_extra_event_labor,
|
||||
pcas);
|
||||
assert(status==0);
|
||||
@@ -392,9 +412,9 @@ int cac_os_depen_init(struct ca_static *pcas)
|
||||
taskName(VXTHISTASKID),
|
||||
sizeof(name) - strlen(name) - 1);
|
||||
status = db_start_events(
|
||||
evuser,
|
||||
(struct event_user *)evuser,
|
||||
name,
|
||||
ca_import,
|
||||
event_import,
|
||||
taskIdSelf(),
|
||||
-1); /* higher priority */
|
||||
assert(status == OK);
|
||||
@@ -418,8 +438,8 @@ void cac_os_depen_exit (struct ca_static *pcas)
|
||||
LOCAL int cac_os_depen_exit_tid (struct ca_static *pcas, int tid)
|
||||
{
|
||||
int status;
|
||||
chid chix;
|
||||
evid monix;
|
||||
ciu chix;
|
||||
miu monix;
|
||||
TVIU *ptviu;
|
||||
CALLBACK *pcb;
|
||||
|
||||
@@ -446,7 +466,7 @@ LOCAL int cac_os_depen_exit_tid (struct ca_static *pcas, int tid)
|
||||
status = taskSuspend (pcas->recv_tid);
|
||||
if (status<0) {
|
||||
ca_printf ("taskSuspend() error = %s\n",
|
||||
strerror (MYERRNO) );
|
||||
strerror (errno) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -456,18 +476,18 @@ LOCAL int cac_os_depen_exit_tid (struct ca_static *pcas, int tid)
|
||||
* (and put call backs)
|
||||
*
|
||||
*/
|
||||
chix = (chid) & pcas->ca_local_chidlist.node;
|
||||
while (chix = (chid) chix->node.next) {
|
||||
while (monix = (evid) ellGet(&chix->eventq)) {
|
||||
chix = (ciu) & pcas->ca_local_chidlist.node;
|
||||
while ( (chix = (ciu) chix->node.next) ) {
|
||||
while ( (monix = (miu) ellGet(&chix->eventq)) ) {
|
||||
/*
|
||||
* temp release lock so that the event task
|
||||
* can finish
|
||||
*/
|
||||
UNLOCK;
|
||||
status = db_cancel_event(monix + 1);
|
||||
status = db_cancel_event((struct event_block *)(monix+1));
|
||||
LOCK;
|
||||
assert(status == OK);
|
||||
free(monix);
|
||||
freeListFree (ca_static->ca_dbMonixFreeList, monix);
|
||||
}
|
||||
if (chix->ppn) {
|
||||
CACLIENTPUTNOTIFY *ppn;
|
||||
@@ -495,7 +515,7 @@ LOCAL int cac_os_depen_exit_tid (struct ca_static *pcas, int tid)
|
||||
*
|
||||
* db_close_events() does not require a CA context.
|
||||
*/
|
||||
while (ptviu = (TVIU *)ellGet(&pcas->ca_taskVarList)) {
|
||||
while ( (ptviu = (TVIU *)ellGet(&pcas->ca_taskVarList)) ) {
|
||||
# ifdef DEBUG
|
||||
ca_printf("CAC: removing task var %x\n", ptviu->tid);
|
||||
# endif
|
||||
@@ -536,8 +556,7 @@ LOCAL int cac_os_depen_exit_tid (struct ca_static *pcas, int tid)
|
||||
* remove local chid blocks, paddr blocks, waiting ev blocks
|
||||
*/
|
||||
ellFree(&pcas->ca_local_chidlist);
|
||||
ellFree(&pcas->ca_dbfree_ev_list);
|
||||
|
||||
freeListCleanup(pcas->ca_dbMonixFreeList);
|
||||
|
||||
/*
|
||||
* remove semaphores here so that ca_process_exit()
|
||||
@@ -621,6 +640,22 @@ unsigned size)
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* event_import()
|
||||
*/
|
||||
LOCAL int event_import(int tid)
|
||||
{
|
||||
int status;
|
||||
|
||||
status = ca_import(tid);
|
||||
if (status==ECA_NORMAL) {
|
||||
return OK;
|
||||
}
|
||||
else {
|
||||
return ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* CA_IMPORT()
|
||||
@@ -739,7 +774,7 @@ LOCAL void ca_check_for_fp()
|
||||
|
||||
assert(taskOptionsGet(taskIdSelf(), &options) == OK);
|
||||
if (!(options & VX_FP_TASK)) {
|
||||
ca_signal(ECA_NEEDSFP, taskName(taskIdSelf()));
|
||||
genLocalExcep (ECA_NEEDSFP, taskName(taskIdSelf()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -770,7 +805,7 @@ void ca_spawn_repeater()
|
||||
0,
|
||||
0,
|
||||
0);
|
||||
if (status < 0){
|
||||
if (status==ERROR){
|
||||
SEVCHK(ECA_NOREPEATER, NULL);
|
||||
}
|
||||
}
|
||||
@@ -888,14 +923,32 @@ void cac_recv_task(int tid)
|
||||
cac_clean_iiu_list();
|
||||
|
||||
/*
|
||||
* first check for pending recv's with a
|
||||
* zero time out so that
|
||||
* 1) flow control works correctly (and)
|
||||
* 2) we queue up sends resulting from recvs properly
|
||||
*/
|
||||
while (TRUE) {
|
||||
LD_CA_TIME (0.0, &timeout);
|
||||
count = cac_select_io(&timeout, CA_DO_RECVS);
|
||||
if (count<=0) {
|
||||
break;
|
||||
}
|
||||
ca_process_input_queue();
|
||||
}
|
||||
|
||||
/*
|
||||
* flush out all pending io prior to blocking
|
||||
*
|
||||
* NOTE: this must be longer than one vxWorks
|
||||
* tick or we will infinite loop
|
||||
*/
|
||||
timeout.tv_usec = (4*USEC_PER_SEC)/sysClkRateGet();
|
||||
timeout.tv_usec = (4/*ticks*/ * USEC_PER_SEC)/sysClkRateGet();
|
||||
timeout.tv_sec = 0;
|
||||
count = cac_select_io(&timeout, CA_DO_RECVS);
|
||||
count = cac_select_io(&timeout,
|
||||
CA_DO_RECVS|CA_DO_SENDS);
|
||||
ca_process_input_queue();
|
||||
manage_conn(TRUE);
|
||||
manage_conn();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,14 +32,29 @@
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* $Log$
|
||||
* Revision 1.20 1995/12/19 19:36:20 jhill
|
||||
* function prototype changes
|
||||
* Revision 1.26 1997/04/11 20:36:00 jhill
|
||||
* kay's perl branch
|
||||
*
|
||||
* Revision 1.25 1997/04/10 19:26:20 jhill
|
||||
* asynch connect, faster connect, ...
|
||||
*
|
||||
* Revision 1.24 1997/01/09 22:14:26 jhill
|
||||
* installed changes on hostBuild branch
|
||||
*
|
||||
* Revision 1.23.2.1 1996/11/25 16:29:18 jhill
|
||||
* stuct=>struct and added debug msg
|
||||
*
|
||||
* Revision 1.23 1996/11/02 00:51:12 jhill
|
||||
* many pc port, const in API, and other changes
|
||||
*
|
||||
* Revision 1.22 1996/09/16 16:40:13 jhill
|
||||
* make EPICS version be the console title
|
||||
*
|
||||
* Revision 1.21 1996/08/05 19:20:29 jhill
|
||||
* removed incorrect ver number
|
||||
*
|
||||
* Revision 1.19 1995/11/29 19:15:42 jhill
|
||||
* added $Log$
|
||||
* Revision 1.20 1995/12/19 19:36:20 jhill
|
||||
* function prototype changes
|
||||
* to the header
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -50,6 +65,8 @@
|
||||
#include <process.h>
|
||||
#include <mmsystem.h>
|
||||
|
||||
#include "epicsVersion.h"
|
||||
|
||||
#include "iocinf.h"
|
||||
|
||||
#ifndef WIN32
|
||||
@@ -136,16 +153,6 @@ int cac_os_depen_init(struct ca_static *pcas)
|
||||
|
||||
ca_static = pcas;
|
||||
|
||||
/*
|
||||
* dont allow disconnect to terminate process
|
||||
* when running in UNIX enviroment
|
||||
*
|
||||
* allow error to be returned to sendto()
|
||||
* instead of handling disconnect at interrupt
|
||||
*/
|
||||
|
||||
/* signal(SIGPIPE,SIG_IGN); */
|
||||
|
||||
/* DllMain does most OS dependent init & cleanup */
|
||||
|
||||
status = ca_os_independent_init ();
|
||||
@@ -256,7 +263,7 @@ int local_addr (SOCKET s, struct sockaddr_in *plcladdr)
|
||||
|
||||
plcladdr->sin_family = AF_INET;
|
||||
plcladdr->sin_port = 0;
|
||||
plcladdr->sin_addr.s_addr = ntohl (loopBackAddress);
|
||||
plcladdr->sin_addr.s_addr = htonl (loopBackAddress);
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -264,24 +271,27 @@ int local_addr (SOCKET s, struct sockaddr_in *plcladdr)
|
||||
/*
|
||||
* caDiscoverInterfaces()
|
||||
*
|
||||
* This routine is provided with the address of an ELLLIST a socket
|
||||
* and a destination port number. When the routine returns there
|
||||
* will be one additional inet address (a caAddrNode) in the list
|
||||
* for each inet interface found that is up and isnt a loop back
|
||||
* interface. If the interface supports broadcast then I add its
|
||||
* broadcast address to the list. If the interface is a point to
|
||||
* point link then I add the destination address of the point to
|
||||
* point link to the list. In either case I set the port number
|
||||
* in the address node to the port supplied in the argument
|
||||
* list.
|
||||
* This routine is provided with the address of an ELLLIST, a socket
|
||||
* a destination port number, and a match address. When the
|
||||
* routine returns there will be one additional inet address
|
||||
* (a caAddrNode) in the list for each inet interface found that
|
||||
* is up and isnt a loop back interface (match addr is INADDR_ANY)
|
||||
* or it matches the specified interface (match addr isnt INADDR_ANY).
|
||||
* If the interface supports broadcast then I add its broadcast
|
||||
* address to the list. If the interface is a point to
|
||||
* point link then I add the destination address of the point to
|
||||
* point link to the list. In either case I set the port number
|
||||
* in the address node to the port supplied in the argument
|
||||
* list.
|
||||
*
|
||||
* LOCK should be applied here for (pList)
|
||||
* (this is also called from the server)
|
||||
*/
|
||||
void caDiscoverInterfaces(ELLLIST *pList, SOCKET socket, int port)
|
||||
void caDiscoverInterfaces(ELLLIST *pList, SOCKET socket, int port,
|
||||
struct in_addr matchAddr)
|
||||
{
|
||||
struct in_addr bcast_addr;
|
||||
caAddrNode *pNode;
|
||||
caAddrNode *pNode;
|
||||
|
||||
pNode = (caAddrNode *) calloc(1,sizeof(*pNode));
|
||||
if(!pNode){
|
||||
@@ -316,7 +326,7 @@ broadcast_addr( struct in_addr *pcastaddr )
|
||||
gethostname(lhostname,sizeof(lhostname));
|
||||
phostent = gethostbyname(lhostname);
|
||||
if (!phostent) {
|
||||
return MYERRNO;
|
||||
return SOCKERRNO;
|
||||
}
|
||||
|
||||
if (status = get_subnet_mask(netmask))
|
||||
@@ -456,12 +466,14 @@ static int RegKeyData (CHAR *RegPath, HANDLE hKeyRoot, LPSTR lpzValueName,
|
||||
|
||||
}
|
||||
|
||||
#define NO_PROCESS_MSG
|
||||
|
||||
BOOL epicsShareAPI DllMain(HANDLE hModule, DWORD dwReason, LPVOID lpReserved)
|
||||
{
|
||||
int status;
|
||||
WSADATA WsaData;
|
||||
TIMECAPS tc;
|
||||
UINT wTimerRes;
|
||||
static UINT wTimerRes;
|
||||
|
||||
switch (dwReason) {
|
||||
|
||||
@@ -469,12 +481,16 @@ BOOL epicsShareAPI DllMain(HANDLE hModule, DWORD dwReason, LPVOID lpReserved)
|
||||
|
||||
#if _DEBUG /* for gui applications, setup console for error messages */
|
||||
if (AllocConsole()) {
|
||||
SetConsoleTitle("Channel Access Status");
|
||||
SetConsoleTitle(BASE_VERSION_STRING);
|
||||
freopen( "CONOUT$", "a", stderr );
|
||||
}
|
||||
#ifndef NO_PROCESS_MSG
|
||||
fprintf(stderr, "Process attached to ca.dll\n");
|
||||
#endif /* init. winsock */
|
||||
if ((status = WSAStartup(MAKEWORD(1,1), &WsaData)) != 0) {
|
||||
#endif
|
||||
#endif
|
||||
/* init. winsock */
|
||||
if ((status = WSAStartup(MAKEWORD(2,0), &WsaData)) != 0) {
|
||||
WSACleanup();
|
||||
fprintf(stderr,"Cant init winsock \n");
|
||||
return FALSE;
|
||||
}
|
||||
@@ -503,13 +519,17 @@ BOOL epicsShareAPI DllMain(HANDLE hModule, DWORD dwReason, LPVOID lpReserved)
|
||||
|
||||
case DLL_THREAD_ATTACH:
|
||||
#if _DEBUG
|
||||
#ifndef NO_PROCESS_MSG
|
||||
fprintf(stderr, "Thread attached to ca.dll\n");
|
||||
#endif
|
||||
#endif
|
||||
break;
|
||||
|
||||
case DLL_THREAD_DETACH:
|
||||
#if _DEBUG
|
||||
#ifndef NO_PROCESS_MSG
|
||||
fprintf(stderr, "Thread detached from ca.dll\n");
|
||||
#endif
|
||||
#endif
|
||||
break;
|
||||
|
||||
@@ -523,4 +543,3 @@ return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,24 +6,28 @@ README file for the EPICS Channel Access Server
|
||||
Author Jeff Hill johill@lanl.gov
|
||||
|
||||
$Log$
|
||||
Revision 1.1.1.1 1996/06/20 00:28:06 jhill
|
||||
ca server installation
|
||||
|
||||
|
||||
Directory Structure
|
||||
-------------------
|
||||
o example - example server tool
|
||||
o generic - generic server lib source code
|
||||
o os - os dependnet server lib source code
|
||||
o io - io dependnet server lib source code
|
||||
o build - server lib object code
|
||||
o example - example server tool
|
||||
o generic - generic server lib source code
|
||||
o os - os dependnet server lib source code
|
||||
o io - io dependnet server lib source code
|
||||
o build/singleThread - server lib object code for single threaded use
|
||||
o build/multiThread - server lib object code for multi threaded use
|
||||
|
||||
Internal Source Code Naming Conventions
|
||||
---------------------------------------
|
||||
o API class X will almost always have associated internal (usually
|
||||
private base) class named XI
|
||||
o for class X there will be
|
||||
o X.h - the class declaration (and simple inlines)
|
||||
o XIL.h - complex inline functions (that will not
|
||||
compile with until the compiler has seen
|
||||
o for class X there will
|
||||
o sometimes be X.h - the class declaration (and simple inlines)
|
||||
o sometimes be XIL.h - complex inline functions (that will not
|
||||
compile unless the compiler has seen
|
||||
the declarations of other classes)
|
||||
o X.cc - all other source code for the class
|
||||
o be X.cc - all other source code for the class
|
||||
|
||||
|
||||
|
||||
195
src/cas/RELEASE_NOTES
Normal file
195
src/cas/RELEASE_NOTES
Normal file
@@ -0,0 +1,195 @@
|
||||
|
||||
|
||||
|
||||
Changes between epics 3.13 Beta 4 and 3.13 Beta 5
|
||||
|
||||
**** API Change ****
|
||||
o The canonical PV name is returned from caServer::pvExistTest()
|
||||
in the supplied buffer and not in a gdd data descriptor. See
|
||||
"casdef.h".
|
||||
old API:
|
||||
//
|
||||
// pvExistTest()
|
||||
//
|
||||
// The server tool is encouraged to accept multiple PV name
|
||||
// aliases for the same PV here. However, a unique canonical name
|
||||
// must be selected for each PV.
|
||||
//
|
||||
// returns S_casApp_success and fills in canonicalPVName
|
||||
// if the PV is in this server tool
|
||||
//
|
||||
// returns S_casApp_pvNotFound if the PV does not exist in
|
||||
// the server tool
|
||||
//
|
||||
// The server tool returns the unique canonical name for
|
||||
// the pv into the gdd. A gdd is used here because this
|
||||
// operation is allowed to complete asynchronously.
|
||||
//
|
||||
virtual caStatus pvExistTest (const casCtx &ctx, const char *pPVName,
|
||||
gdd &canonicalPVName) = 0;
|
||||
new API:
|
||||
//
|
||||
// pvExistTest()
|
||||
//
|
||||
// The server tool is encouraged to accept multiple PV name
|
||||
// aliases for the same PV here. However, one unique canonical name
|
||||
// must be selected by the server tool and returned to the
|
||||
// server lib for each PV. The server will use this canonical
|
||||
// name to prevent internal duplication of data structures for
|
||||
// process variables that have multiple aliases.
|
||||
//
|
||||
// o returns S_casApp_success and a valid canonical name string
|
||||
// when the PV is in this server tool
|
||||
//
|
||||
// o returns S_casApp_pvNotFound if the PV does not exist in
|
||||
// the server tool
|
||||
//
|
||||
// Examples:
|
||||
// caServerXXX::pvExistTest(const casCtx &ctx, const char *pPVName)
|
||||
// {
|
||||
// return pvExistReturn(S_casApp_success, pPVName); // common
|
||||
// return pvExistReturn(S_casApp_pvNotFound); // no PV by that name
|
||||
//
|
||||
// char pName[9] = "myPVName";
|
||||
// return pvExistReturn(S_casApp_success, pName); // also common
|
||||
// return pvExistReturn(S_casApp_asyncCompletion); // not now
|
||||
// }
|
||||
//
|
||||
virtual pvExistReturn pvExistTest (const casCtx &ctx,
|
||||
const char *pPVName)=0;
|
||||
|
||||
**** API Change ****
|
||||
o The server tool must now use one of class casAsyncReadIO, casAsyncWriteIO, or
|
||||
casAsyncPVExistIO in place of casAsyncIO. See "casdef.h".
|
||||
|
||||
**** API Change ****
|
||||
o Virtual function prototype change:
|
||||
Before: "aitEnum casPV::bestExternalType()"
|
||||
After: "aitEnum casPV::bestExternalType() const"
|
||||
|
||||
**** API Change ****
|
||||
o The following virtual functions were added to casPV:
|
||||
//
|
||||
// Returns the maximum bounding box for all present and
|
||||
// future data stored within the PV.
|
||||
//
|
||||
// The routine "dimension()" returns the maximum
|
||||
// number of dimensions in the hypercube (0=scaler,
|
||||
// 1=array, 2=plane, 3=cube ...}.
|
||||
//
|
||||
// The routine "maxBound(dimension)" returns the
|
||||
// maximum length of a particular dimension of the
|
||||
// hypercube as follows:
|
||||
//
|
||||
// dim equal to 0 1 3 ...
|
||||
// -------------------------------------------
|
||||
// hypercube
|
||||
// type
|
||||
// ---------
|
||||
//
|
||||
// array array
|
||||
// length
|
||||
//
|
||||
// plane x y
|
||||
//
|
||||
// cube x y z
|
||||
//
|
||||
// .
|
||||
// .
|
||||
// .
|
||||
//
|
||||
// The default (base) "dimension()" returns zero (scaler).
|
||||
// The default (base) "maxBound()" returns scaler bounds
|
||||
// for all dimensions.
|
||||
//
|
||||
// Clients will see that the PV's data is scaler if
|
||||
// these routines are not supplied in the derived class.
|
||||
//
|
||||
// If the "dimension" argument to maxBounds() is set to
|
||||
// zero then the bound on the first dimension is being
|
||||
// fetched. If the "dimension" argument to maxBound() is
|
||||
// set to one then the bound on the second dimension
|
||||
// are being fetched...
|
||||
//
|
||||
virtual unsigned maxDimension() const; // return zero if scaler
|
||||
virtual aitIndex maxBound (unsigned dimension) const;
|
||||
|
||||
The defaults in base class casPV implement identical behavior
|
||||
to the past if these routines are not supplied by the derived
|
||||
class.
|
||||
|
||||
Changes between epics 3.13 Beta 6 and 3.13 Beta ????
|
||||
|
||||
**** API Change ****
|
||||
|
||||
o The member function "casChannel::postEvent()" has been replaced by
|
||||
"casChannel::postAccessRightsEvent()". An access rights state change
|
||||
event is now posted to the client each time that
|
||||
"casChannel::postAccessRightsEvent()" is called.
|
||||
|
||||
o The virtual functions "casChannel::interestRegister()"
|
||||
and "casChannel::interestDelete()" have been eliminated.
|
||||
|
||||
o The constructor "caServer::caServer()" no-longer has an argument specifying
|
||||
the maximum PV name length. It also no longer has an argument specifying
|
||||
the maximum simultaneous IO operations. THIS IS LIKELY TO BREAK YOUR CODE
|
||||
BECAUSE THE FIRST TWO ARGUMENTS WERE REMOVED AND THERE ARE DEFAULT ARGUMENTS.
|
||||
This change was made because we would like to remove all limits on
|
||||
the PV name length (real or perceived). We also felt that if a server
|
||||
tool wishes to postpone an asynchronious IO operation then it
|
||||
should return S_casApp_postponeAsyncIO from caServer::pvExistTest() and
|
||||
caServer::createPV() (instead of relying on the server to keep track of
|
||||
the number of simultaneous asynchronous IO operations). This provides a
|
||||
less complex and more flexible API.
|
||||
|
||||
o The member function "casPV::casPV(caServer &cas)" replaces the member
|
||||
function "casPV::casPV(const casCtx &ctx, const char * const pPVName)".
|
||||
|
||||
o The virtual member function
|
||||
"caServer::createPV(const casCtx &ctx, const char *pPVName)"
|
||||
has been replaced by the virtual member function
|
||||
"pvCreateReturn createPV (const casCtx &ctx, const char *pPVAliasName)"
|
||||
This change was made in order to allow asynchronous completion of a
|
||||
PV create operation.
|
||||
|
||||
o The data type (class) pvExistReturn has been changed to an enum -
|
||||
"enum pvExistReturn {pverExistsHere, pverDoesNotExistHere,
|
||||
pverAsyncCompletion, pverNoMemoryForAsyncOP}"
|
||||
This impacts the virtual member function
|
||||
"pvExistTest (const casCtx &ctx, const char *pPVAliasName)"
|
||||
|
||||
o The server tool is now required to supply the virtual function
|
||||
"casPV::getName()" so that the server is able to identify the process
|
||||
variable when diagnostics are printed.
|
||||
|
||||
o The virtual function casPV::maxSimultAsyncOps() has been eliminated
|
||||
in favor of allowing the server tool to return S_casApp_postponeAsyncIO
|
||||
from casPV::read() or casPV::write() when there are too many simultaneous
|
||||
asynchronous IO operations and the server tool would like to postpone
|
||||
the current (and future) request(s) until one of the outstanding asynchronous
|
||||
IO operations (read or write) completes.
|
||||
|
||||
o All "show()" virtual member functions in the interface classes
|
||||
have had the "const" attribute added.
|
||||
|
||||
**** Semantic Change ****
|
||||
|
||||
o IMPORTANT: It is now the responsibility of the server tool to detect attempts
|
||||
by the server lib to create a 2nd PV with the same canonical name as an
|
||||
existing PV and avoid this by returning a pointer to the first PV created.
|
||||
Likewise, if there are several aliases for one canonical PV name then it is
|
||||
the responsibility of the server tool to return "pvExistsHere" from
|
||||
"caServerDerived::pvExistTest()" for each of the aliases. Likewise, if there
|
||||
are several aliases for one canonical PV name then it is the responsibility
|
||||
of the server tool to return a single PV with the canonical name from
|
||||
"caServerDerived::createPV()" (even if createPV() is called multiple times
|
||||
each with a different alias name). This change was made to simplify the API
|
||||
and to eliminate redundant data structures and labor occurring within the server
|
||||
tool and the server library.
|
||||
|
||||
o PV creation is now allowed to complete asynchronously
|
||||
|
||||
o It is now the responsibility of the server tool to limit the
|
||||
number of simultaneous asynchronous IO operations allowed (by returning
|
||||
S_casApp_postponeAsyncIO).
|
||||
|
||||
8
src/cas/build/multiThread/Makefile
Normal file
8
src/cas/build/multiThread/Makefile
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
TOP=../../../..
|
||||
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
include $(TOP)/config/RULES_ARCHS
|
||||
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
|
||||
TOP = ../../..
|
||||
CAS = ../../..
|
||||
SRC = $(CAS)/generic
|
||||
IOSRC = $(CAS)/io/bsdSocket
|
||||
OSSRC = $(CAS)/os/posix
|
||||
VPATH = $(SRC) $(IOSRC) $(OSSRC)
|
||||
|
||||
include Target.include
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
USR_INCLUDES = -I$(CAS)/../ca -I$(OSSRC) -I$(IOSRC) -I$(CAS)/gdd
|
||||
USR_LDLIBS = -lcas -lm
|
||||
USR_LDFLAGS = -L.
|
||||
|
||||
DEPLIBS_BASE = $(EPICS_BASE_LIB)
|
||||
|
||||
#CPLUSPLUS = G++
|
||||
|
||||
SRCS.cc += $(SRC)/caServer.cc
|
||||
SRCS.cc += $(SRC)/casClient.cc
|
||||
SRCS.cc += $(SRC)/casDGClient.cc
|
||||
SRCS.cc += $(SRC)/casStreamClient.cc
|
||||
SRCS.cc += $(SRC)/casPV.cc
|
||||
SRCS.cc += $(SRC)/casPVI.cc
|
||||
SRCS.cc += $(SRC)/casChannel.cc
|
||||
SRCS.cc += $(SRC)/casChannelI.cc
|
||||
SRCS.cc += $(SRC)/casClientMon.cc
|
||||
SRCS.cc += $(SRC)/casMsgIO.cc
|
||||
SRCS.cc += $(SRC)/casAsyncIO.cc
|
||||
SRCS.cc += $(SRC)/casAsyncIOI.cc
|
||||
SRCS.cc += $(SRC)/casEventSys.cc
|
||||
SRCS.cc += $(SRC)/outBuf.cc
|
||||
SRCS.cc += $(SRC)/inBuf.cc
|
||||
SRCS.cc += $(SRC)/casMapDBR.cc
|
||||
|
||||
SRCS.cc += $(OSSRC)/casDGOS.cc
|
||||
SRCS.cc += $(OSSRC)/casServerOS.cc
|
||||
SRCS.cc += $(OSSRC)/casStreamOS.cc
|
||||
|
||||
SRCS.cc += $(IOSRC)/casDGIO.cc
|
||||
SRCS.cc += $(IOSRC)/casStreamIO.cc
|
||||
SRCS.cc += $(IOSRC)/caServerIO.cc
|
||||
|
||||
LIBOBJS += caServer.o
|
||||
LIBOBJS += casClient.o
|
||||
LIBOBJS += casDGClient.o
|
||||
LIBOBJS += casStreamClient.o
|
||||
LIBOBJS += casPV.o
|
||||
LIBOBJS += casPVI.o
|
||||
LIBOBJS += casChannel.o
|
||||
LIBOBJS += casChannelI.o
|
||||
LIBOBJS += casClientMon.o
|
||||
LIBOBJS += casMsgIO.o
|
||||
LIBOBJS += casAsyncIO.o
|
||||
LIBOBJS += casAsyncIOI.o
|
||||
LIBOBJS += casEventSys.o
|
||||
LIBOBJS += outBuf.o
|
||||
LIBOBJS += inBuf.o
|
||||
LIBOBJS += casMapDBR.o
|
||||
|
||||
LIBOBJS += casDGOS.o
|
||||
LIBOBJS += casServerOS.o
|
||||
LIBOBJS += casStreamOS.o
|
||||
|
||||
LIBOBJS += casDGIO.o
|
||||
LIBOBJS += casStreamIO.o
|
||||
LIBOBJS += caServerIO.o
|
||||
|
||||
LIBNAME = libcas.a
|
||||
|
||||
include $(TOP)/config/RULES.Unix
|
||||
|
||||
obj: $(LIBOBJS)
|
||||
|
||||
clean::
|
||||
@$(RM) -rf Templates.DB
|
||||
|
||||
95
src/cas/build/multiThread/Makefile.Vx
Normal file
95
src/cas/build/multiThread/Makefile.Vx
Normal file
@@ -0,0 +1,95 @@
|
||||
|
||||
#HERE := $(shell pwd)
|
||||
HERE = .
|
||||
CAS = $(HERE)/../../..
|
||||
TOP = $(CAS)/../..
|
||||
SRC = $(CAS)/generic
|
||||
CA = $(CAS)/../ca
|
||||
IOSRC = $(CAS)/io/bsdSocket
|
||||
OSSRC = $(CAS)/os/vxWorks
|
||||
VPATH = $(SRC) $(SRC)/mt $(IOSRC) $(OSSRC)
|
||||
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
CXXCMPLR = STRICT
|
||||
|
||||
USR_INCLUDES = -I$(SRC) -I$(OSSRC) -I$(IOSRC) -I$(CA)\
|
||||
-I$(TOP)/src/include/os/vxWorks
|
||||
|
||||
DEPLIBS_BASE = $(EPICS_BASE_LIB)
|
||||
|
||||
SRCS.cc += caServer.cc
|
||||
SRCS.cc += caServerI.cc
|
||||
SRCS.cc += casCoreClient.cc
|
||||
SRCS.cc += casClient.cc
|
||||
SRCS.cc += casDGClient.cc
|
||||
SRCS.cc += casStrmClient.cc
|
||||
SRCS.cc += casPV.cc
|
||||
SRCS.cc += casPVI.cc
|
||||
SRCS.cc += casChannel.cc
|
||||
SRCS.cc += casChannelI.cc
|
||||
SRCS.cc += casClientMon.cc
|
||||
SRCS.cc += casChanDelEv.cc
|
||||
SRCS.cc += casMsgIO.cc
|
||||
SRCS.cc += casAsyncIO.cc
|
||||
SRCS.cc += casAsyncIOI.cc
|
||||
SRCS.cc += casEventSys.cc
|
||||
SRCS.cc += casMonitor.cc
|
||||
SRCS.cc += casMonEvent.cc
|
||||
SRCS.cc += outBuf.cc
|
||||
SRCS.cc += inBuf.cc
|
||||
SRCS.cc += casEventMask.cc
|
||||
SRCS.cc += ioBlocked.cc
|
||||
|
||||
SRCS.cc += caServerOS.cc
|
||||
SRCS.cc += casDGOS.cc
|
||||
SRCS.cc += casStreamOS.cc
|
||||
|
||||
SRCS.cc += caServerIO.cc
|
||||
SRCS.cc += casDGIO.cc
|
||||
SRCS.cc += casStreamIO.cc
|
||||
SRCS.c += sigPipeIgnore.c
|
||||
|
||||
LIBOBJS += caServer.o
|
||||
LIBOBJS += caServerI.o
|
||||
LIBOBJS += casCoreClient.o
|
||||
LIBOBJS += casClient.o
|
||||
LIBOBJS += casDGClient.o
|
||||
LIBOBJS += casStrmClient.o
|
||||
LIBOBJS += casPV.o
|
||||
LIBOBJS += casPVI.o
|
||||
LIBOBJS += casChannel.o
|
||||
LIBOBJS += casChannelI.o
|
||||
LIBOBJS += casClientMon.o
|
||||
LIBOBJS += casChanDelEv.o
|
||||
LIBOBJS += casMsgIO.o
|
||||
LIBOBJS += casAsyncIO.o
|
||||
LIBOBJS += casAsyncIOI.o
|
||||
LIBOBJS += casEventSys.o
|
||||
LIBOBJS += casMonitor.o
|
||||
LIBOBJS += casMonEvent.o
|
||||
LIBOBJS += outBuf.o
|
||||
LIBOBJS += inBuf.o
|
||||
LIBOBJS += casEventMask.o
|
||||
LIBOBJS += ioBlocked.o
|
||||
|
||||
LIBOBJS += caServerOS.o
|
||||
LIBOBJS += casDGOS.o
|
||||
LIBOBJS += casStreamOS.o
|
||||
|
||||
LIBOBJS += caServerIO.o
|
||||
LIBOBJS += casDGIO.o
|
||||
LIBOBJS += casStreamIO.o
|
||||
LIBOBJS += sigPipeIgnore.o
|
||||
|
||||
LIBNAME = libcas.o
|
||||
|
||||
include $(TOP)/config/RULES.Vx
|
||||
|
||||
obj: $(LIBOBJS)
|
||||
|
||||
test.o:
|
||||
|
||||
clean::
|
||||
@$(RM) -rf Templates.DB
|
||||
|
||||
69
src/cas/build/singleThread/Makefile.Host
Normal file
69
src/cas/build/singleThread/Makefile.Host
Normal file
@@ -0,0 +1,69 @@
|
||||
CAS := ../../..
|
||||
TOP := $(CAS)/../..
|
||||
SRC := $(CAS)/generic
|
||||
CA := $(CAS)/../ca
|
||||
IOSRC := $(CAS)/io/bsdSocket
|
||||
STSRC := $(SRC)/st
|
||||
USER_VPATH := $(SRC) $(STSRC) $(IOSRC)
|
||||
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
CXXCMPLR = STRICT
|
||||
|
||||
# sometimes it's good to have different C/C++ flags, not now:
|
||||
USR_CFLAGS = -I$(SRC) -I$(IOSRC) -I$(STSRC) -I$(CA)
|
||||
USR_CXXFLAGS = $(USR_CFLAGS)
|
||||
|
||||
LIBSRCS += caServer.cc
|
||||
LIBSRCS += caServerI.cc
|
||||
LIBSRCS += casCoreClient.cc
|
||||
LIBSRCS += casClient.cc
|
||||
LIBSRCS += casDGClient.cc
|
||||
LIBSRCS += casStrmClient.cc
|
||||
LIBSRCS += casPV.cc
|
||||
LIBSRCS += casPVI.cc
|
||||
LIBSRCS += casChannel.cc
|
||||
LIBSRCS += casChannelI.cc
|
||||
LIBSRCS += casPVListChan.cc
|
||||
LIBSRCS += casClientMon.cc
|
||||
LIBSRCS += casChanDelEv.cc
|
||||
LIBSRCS += casMsgIO.cc
|
||||
LIBSRCS += casAsyncIO.cc
|
||||
LIBSRCS += casAsyncIOI.cc
|
||||
LIBSRCS += casAsyncXXIO.cc
|
||||
LIBSRCS += casAsyncRdIOI.cc
|
||||
LIBSRCS += casAsyncWtIOI.cc
|
||||
LIBSRCS += casAsyncExIOI.cc
|
||||
LIBSRCS += casAsyncPVCIOI.cc
|
||||
LIBSRCS += casEventSys.cc
|
||||
LIBSRCS += casMonitor.cc
|
||||
LIBSRCS += casMonEvent.cc
|
||||
LIBSRCS += casOpaqueAddr.cc
|
||||
LIBSRCS += inBuf.o
|
||||
LIBSRCS += outBuf.cc
|
||||
LIBSRCS += dgInBuf.o
|
||||
LIBSRCS += dgOutBuf.cc
|
||||
LIBSRCS += casCtx.o
|
||||
LIBSRCS += casEventMask.cc
|
||||
LIBSRCS += ioBlocked.cc
|
||||
LIBSRCS += templInst.cc
|
||||
|
||||
LIBSRCS += caServerOS.cc
|
||||
LIBSRCS += casIntfOS.cc
|
||||
LIBSRCS += casDGIntfOS.cc
|
||||
LIBSRCS += casDGOS.cc
|
||||
LIBSRCS += casStreamOS.cc
|
||||
|
||||
LIBSRCS += caServerIO.cc
|
||||
LIBSRCS += casIntfIO.cc
|
||||
LIBSRCS += casDGIntfIO.cc
|
||||
LIBSRCS += casDGIO.cc
|
||||
LIBSRCS += casStreamIO.cc
|
||||
|
||||
LIBRARY := cas
|
||||
|
||||
include $(TOP)/config/RULES.Host
|
||||
|
||||
clean::
|
||||
@$(RM) -rf Templates.DB
|
||||
|
||||
@@ -1,88 +0,0 @@
|
||||
|
||||
CAS = ../../..
|
||||
TOP = $(CAS)/../..
|
||||
SRC = $(CAS)/generic
|
||||
CA = $(CAS)/../ca
|
||||
IOSRC = $(CAS)/io/bsdSocket
|
||||
OSSRC = $(CAS)/os/posix
|
||||
VPATH = $(SRC) $(IOSRC) $(OSSRC)
|
||||
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
CXXCMPLR = STRICT
|
||||
|
||||
USR_INCLUDES = -I$(SRC) -I$(OSSRC) -I$(IOSRC) -I$(CA)
|
||||
|
||||
DEPLIBS_BASE = $(EPICS_BASE_LIB)
|
||||
|
||||
SRCS.cc += $(SRC)/caServer.cc
|
||||
SRCS.cc += $(SRC)/caServerI.cc
|
||||
SRCS.cc += $(SRC)/casCoreClient.cc
|
||||
SRCS.cc += $(SRC)/casClient.cc
|
||||
SRCS.cc += $(SRC)/casDGClient.cc
|
||||
SRCS.cc += $(SRC)/casStrmClient.cc
|
||||
SRCS.cc += $(SRC)/casPV.cc
|
||||
SRCS.cc += $(SRC)/casPVI.cc
|
||||
SRCS.cc += $(SRC)/casChannel.cc
|
||||
SRCS.cc += $(SRC)/casChannelI.cc
|
||||
SRCS.cc += $(SRC)/casClientMon.cc
|
||||
SRCS.cc += $(SRC)/casChanDelEv.cc
|
||||
SRCS.cc += $(SRC)/casMsgIO.cc
|
||||
SRCS.cc += $(SRC)/casAsyncIO.cc
|
||||
SRCS.cc += $(SRC)/casAsyncIOI.cc
|
||||
SRCS.cc += $(SRC)/casEventSys.cc
|
||||
SRCS.cc += $(SRC)/casMonitor.cc
|
||||
SRCS.cc += $(SRC)/casMonEvent.cc
|
||||
SRCS.cc += $(SRC)/outBuf.cc
|
||||
SRCS.cc += $(SRC)/inBuf.cc
|
||||
SRCS.cc += $(SRC)/casEventMask.cc
|
||||
|
||||
SRCS.cc += $(OSSRC)/caServerOS.cc
|
||||
SRCS.cc += $(OSSRC)/casDGOS.cc
|
||||
SRCS.cc += $(OSSRC)/casStreamOS.cc
|
||||
|
||||
SRCS.cc += $(IOSRC)/caServerIO.cc
|
||||
SRCS.cc += $(IOSRC)/casDGIO.cc
|
||||
SRCS.cc += $(IOSRC)/casStreamIO.cc
|
||||
SRCS.c += $(IOSRC)/sigPipeIgnore.c
|
||||
|
||||
LIBOBJS += caServer.o
|
||||
LIBOBJS += caServerI.o
|
||||
LIBOBJS += casCoreClient.o
|
||||
LIBOBJS += casClient.o
|
||||
LIBOBJS += casDGClient.o
|
||||
LIBOBJS += casStrmClient.o
|
||||
LIBOBJS += casPV.o
|
||||
LIBOBJS += casPVI.o
|
||||
LIBOBJS += casChannel.o
|
||||
LIBOBJS += casChannelI.o
|
||||
LIBOBJS += casClientMon.o
|
||||
LIBOBJS += casChanDelEv.o
|
||||
LIBOBJS += casMsgIO.o
|
||||
LIBOBJS += casAsyncIO.o
|
||||
LIBOBJS += casAsyncIOI.o
|
||||
LIBOBJS += casEventSys.o
|
||||
LIBOBJS += casMonitor.o
|
||||
LIBOBJS += casMonEvent.o
|
||||
LIBOBJS += outBuf.o
|
||||
LIBOBJS += inBuf.o
|
||||
LIBOBJS += casEventMask.o
|
||||
|
||||
LIBOBJS += caServerOS.o
|
||||
LIBOBJS += casDGOS.o
|
||||
LIBOBJS += casStreamOS.o
|
||||
|
||||
LIBOBJS += caServerIO.o
|
||||
LIBOBJS += casDGIO.o
|
||||
LIBOBJS += casStreamIO.o
|
||||
LIBOBJS += sigPipeIgnore.o
|
||||
|
||||
LIBNAME = libcas.a
|
||||
|
||||
include $(TOP)/config/RULES.Unix
|
||||
|
||||
obj: $(LIBOBJS)
|
||||
|
||||
clean::
|
||||
@$(RM) -rf Templates.DB
|
||||
|
||||
@@ -3,5 +3,8 @@ TOP=../../..
|
||||
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
include $(TOP)/config/RULES_ARCHS
|
||||
DIRS = simple
|
||||
|
||||
include $(TOP)/config/RULES_DIRS
|
||||
|
||||
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
|
||||
CAS = ../../
|
||||
TOP = $(CAS)/../..
|
||||
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
CXXCMPLR = STRICT
|
||||
|
||||
USR_INCLUDES =
|
||||
USR_LDLIBS = -lcas -lca -lCom -lgdd
|
||||
|
||||
USR_LDFLAGS =
|
||||
|
||||
DEPLIBS_BASE = $(EPICS_BASE_LIB)
|
||||
DEPLIBSWOCAS = $(DEPLIBS_BASE)/libca.a $(DEPLIBS_BASE)/libCom.a \
|
||||
$(DEPLIBS_BASE)/libgdd.a
|
||||
DEPLIBS = $(DEPLIBS_BASE)/libcas.a $(DEPLIBSWOCAS)
|
||||
|
||||
SRCS.cc += ../exServer.cc
|
||||
SRCS.cc += ../exPV.cc
|
||||
SRCS.cc += ../exSyncPV.cc
|
||||
SRCS.cc += ../exAsyncPV.cc
|
||||
SRCS.cc += ../exChannel.cc
|
||||
|
||||
OBJS += exServer.o
|
||||
OBJS += exPV.o
|
||||
OBJS += exSyncPV.o
|
||||
OBJS += exAsyncPV.o
|
||||
OBJS += exChannel.o
|
||||
|
||||
PROD += excas
|
||||
|
||||
BUILDDIR = $(CAS)/build/singleThread/O.sun4/
|
||||
|
||||
GLOMBOBJ += $(BUILDDIR)caServer.o
|
||||
GLOMBOBJ += $(BUILDDIR)caServerI.o
|
||||
GLOMBOBJ += $(BUILDDIR)casCoreClient.o
|
||||
GLOMBOBJ += $(BUILDDIR)casClient.o
|
||||
GLOMBOBJ += $(BUILDDIR)casDGClient.o
|
||||
GLOMBOBJ += $(BUILDDIR)casStrmClient.o
|
||||
GLOMBOBJ += $(BUILDDIR)casPV.o
|
||||
GLOMBOBJ += $(BUILDDIR)casPVI.o
|
||||
GLOMBOBJ += $(BUILDDIR)casChannel.o
|
||||
GLOMBOBJ += $(BUILDDIR)casChannelI.o
|
||||
GLOMBOBJ += $(BUILDDIR)casClientMon.o
|
||||
GLOMBOBJ += $(BUILDDIR)casChanDelEv.o
|
||||
GLOMBOBJ += $(BUILDDIR)casMsgIO.o
|
||||
GLOMBOBJ += $(BUILDDIR)casAsyncIO.o
|
||||
GLOMBOBJ += $(BUILDDIR)casAsyncIOI.o
|
||||
GLOMBOBJ += $(BUILDDIR)casEventSys.o
|
||||
GLOMBOBJ += $(BUILDDIR)casMonitor.o
|
||||
GLOMBOBJ += $(BUILDDIR)casMonEvent.o
|
||||
GLOMBOBJ += $(BUILDDIR)outBuf.o
|
||||
GLOMBOBJ += $(BUILDDIR)inBuf.o
|
||||
GLOMBOBJ += $(BUILDDIR)casEventMask.o
|
||||
|
||||
GLOMBOBJ += $(BUILDDIR)caServerOS.o
|
||||
GLOMBOBJ += $(BUILDDIR)casDGOS.o
|
||||
GLOMBOBJ += $(BUILDDIR)casStreamOS.o
|
||||
|
||||
GLOMBOBJ += $(BUILDDIR)caServerIO.o
|
||||
GLOMBOBJ += $(BUILDDIR)casDGIO.o
|
||||
GLOMBOBJ += $(BUILDDIR)casStreamIO.o
|
||||
GLOMBOBJ += $(BUILDDIR)sigPipeIgnore.o
|
||||
|
||||
include $(TOP)/config/RULES.Unix
|
||||
|
||||
excas: $(OBJS) $(DEPLIBS)
|
||||
$(LINK.cc) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS)
|
||||
|
||||
#
|
||||
# fast link (without library build)
|
||||
#
|
||||
#PURIFY = /remote/lear_local/pure/purify-3.0a-sunos4/purify
|
||||
nolib: $(OBJS) $(GLOMBOBJ) $(DEPLIBSWOCAS)
|
||||
$(PURIFY) $(LINK.cc) -o $@ $(OBJS) $(GLOMBOBJ) $(DEPLIBSWOCAS)
|
||||
|
||||
clean::
|
||||
@$(RM) excas
|
||||
@$(RM) nolib
|
||||
@$(RM) -rf Templates.DB
|
||||
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user