aboutsummaryrefslogtreecommitdiff
path: root/src/mac/Makefile
blob: c91c8d82883cb2cdad43e0c86d8c144572b7583b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
##############################################################################################################
###			Important global constants
##############################################################################################################

root-folder											= ::
mitsupportlib-root-folder							= {root-folder}:::MITSupportLib:
mitkerberoslib-root-folder							= {root-folder}:
makefile-name										= {root-folder}mac:Makefile

library-output-folder								= {root-folder}bin:

library-platform-68K					= .68K
library-platform-PPC					= .PPC

library-kind-debug						= .debug
library-kind-final						=

##############################################################################################################
###			Top-level targets -- abstract targets for convenient grouping
##############################################################################################################

#	Everything
all Ä unset-echo glue all-debug all-final

#	Debugging versions
all-debug Ä unset-echo ppc-debug 68k-debug headers

#	Final versions
all-final Ä unset-echo ppc-final 68k-final headers

#	Clasic 68K glue
glue Ä unset-echo glue-gss glue-krb5

unset-echo Ä
	If ({MacdevScriptDebug})
		Set Echo 1
	Else
		Unset Echo
	End

##############################################################################################################
###			More global constants
##############################################################################################################

krb5-globals-root-folder							= {root-folder}"mac:libraries:Kerberos v5 Globals:¶"

gss-library-output-folder							= {root-folder}:GSSLib:Binaries:
krb5-library-output-folder							= {root-folder}:Kerberos5Lib:Binaries:
krb5-globals-library-output-folder					= {root-folder}:Kerberos5GlobalsLib:Binaries:
krb5-globals-data-library-output-folder				= {krb5-globals-library-output-folder}
profile-library-output-folder						= {root-folder}:KerberosProfileLib:Binaries:
comerr-library-output-folder						= {root-folder}:ComErrLib:Binaries:

gss-library-name									= GSSLib
krb5-library-name									= Kerberos5Lib
krb5-globals-library-name							= Krb5GlobalsLib
krb5-globals-data-library-name						= Krb5GlobalsDataLib
profile-library-name								= KrbProfileLib
comerr-library-name									= ComErrLib

gss-library-export									= {root-folder}mac:GSSLibrary.exp
krb5-library-export									= {root-folder}mac:K5Library.exp
krb5-globals-library-export							= {krb5-globals-root-folder}Krb5Globals.exp
krb5-globals-data-library-export					= {krb5-globals-root-folder}Krb5GlobalsData.exp
profile-library-export								= {root-folder}util:profile:profile.exp
comerr-library-export								= {root-folder}util:et:et.exp

gss-library-fragment-name							= "GSSLibrary"
krb5-library-fragment-name							= "MIT Kerberos¥Kerberos5Lib"
krb5-globals-library-fragment-name					= "MIT Kerberos¥Kerberos5GlobalsLib"
krb5-globals-data-library-fragment-name				= "MIT Kerberos¥Kerberos5GlobalsDataLib"
profile-library-fragment-name						= "MIT Kerberos¥KerberosProfileLib"
comerr-library-fragment-name						= "MIT Kerberos¥ComErrLib"

gss-library-main									="¶"
krb5-library-main									="¶"
krb5-globals-library-main							="¶"
krb5-globals-data-library-main						="¶"
profile-library-main								="¶"
comerr-library-main									="¶"

gss-library-init									= __initializeGSS
krb5-library-init									= __initializeK5
krb5-globals-library-init							= __initialize_Kerberos5GlobalsLib
krb5-globals-data-library-init						= __initialize
profile-library-init								= InitializeProfileLib
comerr-library-init									= __initialize
	
gss-library-term 									= __terminateGSS
krb5-library-term									= __terminateK5
krb5-globals-library-term							= __terminate_Kerberos5GlobalsLib
krb5-globals-data-library-term						= __terminate
profile-library-term								= TerminateProfileLib
comerr-library-term									= __terminate

gss-library-current-version							= 1
gss-library-definition-version						= 0
gss-library-implementation-version					= 1

krb5-library-current-version						= 2
krb5-library-definition-version						= 2
krb5-library-implementation-version					= 2

krb5-globals-library-current-version				= 0
krb5-globals-library-definition-version				= 0
krb5-globals-library-implementation-version			= 0

krb5-globals-data-library-current-version			= 0
krb5-globals-data-library-definition-version		= 0
krb5-globals-data-library-implementation-version	= 0

profile-library-current-version						= 0
profile-library-definition-version					= 0
profile-library-implementation-version				= 0

comerr-library-current-version						= 0
comerr-library-definition-version					= 0
comerr-library-implementation-version				= 0

##############################################################################################################
###			Generation of file lists
##############################################################################################################

list-generation-script-working-folder = "{root-folder}mac:"
list-generation-script-folder = "{root-folder}mac:"
list-generation-script = "{list-generation-script-folder}macfile_gen.pl"
list-generation-script-root = ".."

all-files-list									= {root-folder}"All files.list"
all-sources-list								= {root-folder}"All sources.list"
all-folders-list								= {root-folder}"All folders.list"
include-folders-list							= {root-folder}"Include folders.list"

gss-sources-list								= {root-folder}"GSS sources.list"
krb5-sources-list								= {root-folder}"Krb5 sources.list"
profile-sources-list							= {root-folder}"Profile sources.list"

gss-objects-ppc-debug-list						= {root-folder}"GSS objects PPC debug.list"
gss-objects-68k-debug-list						= {root-folder}"GSS objects 68K debug.list"
gss-objects-ppc-final-list						= {root-folder}"GSS objects PPC final.list"
gss-objects-68k-final-list						= {root-folder}"GSS objects 68K final.list"

krb5-objects-ppc-debug-list						= {root-folder}"Krb5 objects PPC debug.list"
krb5-objects-68k-debug-list						= {root-folder}"Krb5 objects 68K debug.list"
krb5-objects-ppc-final-list						= {root-folder}"Krb5 objects PPC final.list"
krb5-objects-68k-final-list						= {root-folder}"Krb5 objects 68K final.list"

profile-objects-ppc-debug-list					= {root-folder}"Profile objects PPC debug.list"
profile-objects-68k-debug-list					= {root-folder}"Profile objects 68K debug.list"
profile-objects-ppc-final-list					= {root-folder}"Profile objects PPC final.list"
profile-objects-68k-final-list					= {root-folder}"Profile objects 68K final.list"

comerr-objects-ppc-debug-list					= {root-folder}"ComErr objects PPC debug.list"
comerr-objects-68k-debug-list					= {root-folder}"ComErr objects 68K debug.list"
comerr-objects-ppc-final-list					= {root-folder}"ComErr objects PPC final.list"
comerr-objects-68k-final-list					= {root-folder}"ComErr objects 68K final.list"

all-lists ={all-files-list}{all-sources-list}{all-folders-list}{include-folders-list}{gss-sources-list}{krb5-sources-list}{gss-objects-ppc-debug-list}{gss-objects-68k-debug-list}{gss-objects-ppc-final-list}{gss-objects-68k-final-list}{krb5-objects-ppc-debug-list}{krb5-objects-68k-debug-list}{krb5-objects-ppc-final-list}{krb5-objects-68k-final-list}{profile-objects-ppc-debug-list}{profile-objects-68k-debug-list}{profile-objects-ppc-final-list}{profile-objects-68k-final-list}{comerr-objects-ppc-debug-list}{comerr-objects-68k-debug-list}{comerr-objects-ppc-final-list}{comerr-objects-68k-final-list}

file-lists Ä {all-lists}

# Note that even though the list generation script tries to have a mechanism allowing you to run it
# in different directories, it actually doesn't work too well because it wants a UNIX-style relative
# path to root Makefile.in. This is why we run it with -x to specify the root.

{all-files-list} Ä {list-generation-script} {makefile-name}
	perl -x"{list-generation-script-working-folder}" {list-generation-script} all-files {list-generation-script-root}> {Targ}

{all-sources-list} Ä {all-files-list} {list-generation-script} {makefile-name}
	perl -x"{list-generation-script-working-folder}" {list-generation-script} all-sources {list-generation-script-root}< {all-files-list} > {Targ}

{all-folders-list} Ä {all-files-list} {list-generation-script} {makefile-name}
	perl -x"{list-generation-script-working-folder}" {list-generation-script} all-folders {list-generation-script-root}< {all-files-list} > {Targ}

{include-folders-list} Ä {all-files-list} {list-generation-script} {makefile-name}
	perl -x"{list-generation-script-working-folder}" {list-generation-script} include-folders {list-generation-script-root}< {all-files-list} > {Targ}

{gss-sources-list} Ä {all-files-list} {list-generation-script} {makefile-name}
	perl -x"{list-generation-script-working-folder}" {list-generation-script} gss-sources {list-generation-script-root}< {all-files-list} > {Targ}

{krb5-sources-list} Ä {all-files-list} {list-generation-script} {makefile-name}
	perl -x"{list-generation-script-working-folder}" {list-generation-script} krb5-sources {list-generation-script-root}< {all-files-list} > {Targ}

{gss-objects-ppc-debug-list} Ä {all-files-list} {list-generation-script} {makefile-name}
	perl -x"{list-generation-script-working-folder}" {list-generation-script} gss-objects-ppc-debug {list-generation-script-root}< {all-files-list} > {Targ}

{gss-objects-68k-debug-list} Ä {all-files-list} {list-generation-script} {makefile-name}
	perl -x"{list-generation-script-working-folder}" {list-generation-script} gss-objects-68k-debug {list-generation-script-root}< {all-files-list} > {Targ}

{gss-objects-ppc-final-list} Ä {all-files-list} {list-generation-script} {makefile-name}
	perl -x"{list-generation-script-working-folder}" {list-generation-script} gss-objects-ppc-final {list-generation-script-root}< {all-files-list} > {Targ}

{gss-objects-68k-final-list} Ä {all-files-list} {list-generation-script} {makefile-name}
	perl -x"{list-generation-script-working-folder}" {list-generation-script} gss-objects-68k-final {list-generation-script-root}< {all-files-list} > {Targ}

{krb5-objects-ppc-debug-list} Ä {all-files-list} {list-generation-script} {makefile-name}
	perl -x"{list-generation-script-working-folder}" {list-generation-script} krb5-objects-ppc-debug {list-generation-script-root}< {all-files-list} > {Targ}

{krb5-objects-68k-debug-list} Ä {all-files-list} {list-generation-script} {makefile-name}
	perl -x"{list-generation-script-working-folder}" {list-generation-script} krb5-objects-68k-debug {list-generation-script-root}< {all-files-list} > {Targ}

{krb5-objects-ppc-final-list} Ä {all-files-list} {list-generation-script} {makefile-name}
	perl -x"{list-generation-script-working-folder}" {list-generation-script} krb5-objects-ppc-final {list-generation-script-root}< {all-files-list} > {Targ}

{krb5-objects-68k-final-list} Ä {all-files-list} {list-generation-script} {makefile-name}
	perl -x"{list-generation-script-working-folder}" {list-generation-script} krb5-objects-68k-final {list-generation-script-root}< {all-files-list} > {Targ}

{profile-objects-ppc-debug-list} Ä {all-files-list} {list-generation-script} {makefile-name}
	perl -x"{list-generation-script-working-folder}" {list-generation-script} profile-objects-ppc-debug {list-generation-script-root}< {all-files-list} > {Targ}

{profile-objects-68k-debug-list} Ä {all-files-list} {list-generation-script} {makefile-name}
	perl -x"{list-generation-script-working-folder}" {list-generation-script} profile-objects-68k-debug {list-generation-script-root}< {all-files-list} > {Targ}

{profile-objects-ppc-final-list} Ä {all-files-list} {list-generation-script} {makefile-name}
	perl -x"{list-generation-script-working-folder}" {list-generation-script} profile-objects-ppc-final {list-generation-script-root}< {all-files-list} > {Targ}

{profile-objects-68k-final-list} Ä {all-files-list} {list-generation-script} {makefile-name}
	perl -x"{list-generation-script-working-folder}" {list-generation-script} profile-objects-68k-final {list-generation-script-root}< {all-files-list} > {Targ}

{comerr-objects-ppc-debug-list} Ä {all-files-list} {list-generation-script} {makefile-name}
	perl -x"{list-generation-script-working-folder}" {list-generation-script} comerr-objects-ppc-debug {list-generation-script-root}< {all-files-list} > {Targ}

{comerr-objects-68k-debug-list} Ä {all-files-list} {list-generation-script} {makefile-name}
	perl -x"{list-generation-script-working-folder}" {list-generation-script} comerr-objects-68k-debug {list-generation-script-root}< {all-files-list} > {Targ}

{comerr-objects-ppc-final-list} Ä {all-files-list} {list-generation-script} {makefile-name}
	perl -x"{list-generation-script-working-folder}" {list-generation-script} comerr-objects-ppc-final {list-generation-script-root}< {all-files-list} > {Targ}

{comerr-objects-68k-final-list} Ä {all-files-list} {list-generation-script} {makefile-name}
	perl -x"{list-generation-script-working-folder}" {list-generation-script} comerr-objects-68k-final {list-generation-script-root}< {all-files-list} > {Targ}

##############################################################################################################
###			Autogenerated files
##############################################################################################################

autogeneration-h-script = {root-folder}util:et:et_h.perl
autogeneration-c-script = {root-folder}util:et:et_c.perl

autogenerated-files ={root-folder}include:asn1_err.h ¶
	{root-folder}include:kdb5_err.h ¶
	{root-folder}include:krb5_err.h ¶
	{root-folder}include:kv5m_err.h ¶
	{root-folder}include:adm_err.h ¶
	{root-folder}lib:gssapi:generic:gssapi_err_generic.h ¶
	{root-folder}lib:gssapi:krb5:gssapi_err_krb5.h ¶
	{root-folder}util:profile:prof_err.c ¶
	{root-folder}lib:krb5:error_tables:asn1_err.c ¶
	{root-folder}lib:krb5:error_tables:kdb5_err.c ¶
	{root-folder}lib:krb5:error_tables:krb5_err.c ¶
	{root-folder}lib:krb5:error_tables:kv5m_err.c ¶
	{root-folder}lib:krb5:error_tables:adm_err.c ¶
	{root-folder}lib:gssapi:generic:gssapi_err_generic.c ¶
	{root-folder}lib:gssapi:krb5:gssapi_err_krb5.c ¶
	{root-folder}util:profile:prof_err.h ¶
	{root-folder}include:krb5.h ¶
	{root-folder}util:profile:profile.h ¶
	{root-folder}include:profile.h ¶
	{root-folder}include:krb5:osconf.h ¶
	{root-folder}lib:gssapi:generic:gssapi.h ¶
	{root-folder}include:autoconf.h

###			error table headers

{root-folder}include:asn1_err.h Ä {root-folder}lib:krb5:error_tables:asn1_err.et {makefile-name} {autogeneration-h-script}
	perl {autogeneration-h-script} outfile="{root-folder}include:asn1_err.h" < "{root-folder}lib:krb5:error_tables:asn1_err.et"

{root-folder}include:kdb5_err.h Ä {root-folder}lib:krb5:error_tables:kdb5_err.et {makefile-name} {autogeneration-h-script}
	perl {autogeneration-h-script} outfile="{root-folder}include:kdb5_err.h" < "{root-folder}lib:krb5:error_tables:kdb5_err.et"

{root-folder}include:krb5_err.h Ä {root-folder}lib:krb5:error_tables:krb5_err.et {makefile-name} {autogeneration-h-script}
	perl {autogeneration-h-script} outfile="{root-folder}include:krb5_err.h" < "{root-folder}lib:krb5:error_tables:krb5_err.et"

{root-folder}include:kv5m_err.h Ä {root-folder}lib:krb5:error_tables:kv5m_err.et {makefile-name} {autogeneration-h-script}
	perl {autogeneration-h-script} outfile="{root-folder}include:kv5m_err.h" < "{root-folder}lib:krb5:error_tables:kv5m_err.et"

{root-folder}include:adm_err.h Ä {root-folder}lib:krb5:error_tables:adm_err.et {makefile-name} {autogeneration-h-script}
	perl {autogeneration-h-script} outfile="{root-folder}include:adm_err.h" < "{root-folder}lib:krb5:error_tables:adm_err.et"
	
{root-folder}lib:gssapi:generic:gssapi_err_generic.h Ä {root-folder}lib:gssapi:generic:gssapi_err_generic.et {makefile-name} {autogeneration-h-script}
	perl {autogeneration-h-script} outfile="{root-folder}lib:gssapi:generic:gssapi_err_generic.h" < "{root-folder}lib:gssapi:generic:gssapi_err_generic.et"
	
{root-folder}lib:gssapi:krb5:gssapi_err_krb5.h Ä {root-folder}lib:gssapi:krb5:gssapi_err_krb5.et {makefile-name} {autogeneration-h-script}
	perl {autogeneration-h-script} outfile="{root-folder}lib:gssapi:krb5:gssapi_err_krb5.h" < "{root-folder}lib:gssapi:krb5:gssapi_err_krb5.et"

{root-folder}util:profile:prof_err.h Ä {root-folder}util:profile:prof_err.et {makefile-name} {autogeneration-h-script}
	perl {autogeneration-h-script} outfile="{root-folder}util:profile:prof_err.h" < "{root-folder}util:profile:prof_err.et"

###			error table sources

{root-folder}lib:krb5:error_tables:asn1_err.c Ä {root-folder}lib:krb5:error_tables:asn1_err.et {makefile-name} {autogeneration-c-script}
	perl {autogeneration-c-script} outfile="{root-folder}lib:krb5:error_tables:asn1_err.c" < "{root-folder}lib:krb5:error_tables:asn1_err.et"

{root-folder}lib:krb5:error_tables:kdb5_err.c Ä {root-folder}lib:krb5:error_tables:kdb5_err.et {makefile-name} {autogeneration-c-script}
	perl {autogeneration-c-script} outfile="{root-folder}lib:krb5:error_tables:kdb5_err.c" < "{root-folder}lib:krb5:error_tables:kdb5_err.et"

{root-folder}lib:krb5:error_tables:krb5_err.c Ä {root-folder}lib:krb5:error_tables:krb5_err.et {makefile-name} {autogeneration-c-script}
	perl {autogeneration-c-script} outfile="{root-folder}lib:krb5:error_tables:krb5_err.c" < "{root-folder}lib:krb5:error_tables:krb5_err.et"

{root-folder}lib:krb5:error_tables:kv5m_err.c Ä {root-folder}lib:krb5:error_tables:kv5m_err.et {makefile-name} {autogeneration-c-script}
	perl {autogeneration-c-script} outfile="{root-folder}lib:krb5:error_tables:kv5m_err.c" < "{root-folder}lib:krb5:error_tables:kv5m_err.et"

{root-folder}lib:krb5:error_tables:adm_err.c Ä {root-folder}lib:krb5:error_tables:adm_err.et {makefile-name} {autogeneration-c-script}
	perl {autogeneration-c-script} outfile="{root-folder}lib:krb5:error_tables:adm_err.c" < "{root-folder}lib:krb5:error_tables:adm_err.et"

{root-folder}lib:gssapi:generic:gssapi_err_generic.c Ä {root-folder}lib:gssapi:generic:gssapi_err_generic.et {makefile-name} {autogeneration-c-script}
	perl {autogeneration-c-script} outfile="{root-folder}lib:gssapi:generic:gssapi_err_generic.c" < "{root-folder}lib:gssapi:generic:gssapi_err_generic.et"

{root-folder}lib:gssapi:krb5:gssapi_err_krb5.c Ä {root-folder}lib:gssapi:krb5:gssapi_err_krb5.et {makefile-name} {autogeneration-c-script}
	perl {autogeneration-c-script} outfile="{root-folder}lib:gssapi:krb5:gssapi_err_krb5.c" < "{root-folder}lib:gssapi:krb5:gssapi_err_krb5.et"

{root-folder}util:profile:prof_err.c Ä {root-folder}util:profile:prof_err.et {makefile-name} {autogeneration-c-script}
	perl {autogeneration-c-script} outfile="{root-folder}util:profile:prof_err.c" < "{root-folder}util:profile:prof_err.et"

###			other autogenerated files

{root-folder}include:krb5.h Ä {root-folder}include:krb5.hin {root-folder}include:krb5_err.h ¶
	{root-folder}include:kdb5_err.h {root-folder}include:kv5m_err.h {root-folder}include:asn1_err.h
	Catenate {root-folder}include:krb5.hin {root-folder}include:krb5_err.h {root-folder}include:kdb5_err.h ¶
	{root-folder}include:kv5m_err.h {root-folder}include:asn1_err.h > {root-folder}include:krb5.h
	
{root-folder}util:profile:profile.h Ä {root-folder}util:profile:profile.hin {root-folder}util:profile:prof_err.h
	Catenate {root-folder}util:profile:profile.hin {root-folder}util:profile:prof_err.h > {root-folder}util:profile:profile.h
	
{root-folder}include:profile.h Ä {root-folder}util:profile:profile.h
	Duplicate -y {root-folder}util:profile:profile.h {root-folder}include:profile.h
	SetFile -a l "{Targ}"

{root-folder}include:krb5:osconf.h Ä {root-folder}include:krb5:stock:osconf.h
	Duplicate -y {root-folder}include:krb5:stock:osconf.h {root-folder}include:krb5:osconf.h
	SetFile -a l "{Targ}"

{root-folder}lib:gssapi:generic:gssapi.h Ä {root-folder}lib:gssapi:generic:gssapi.hin
	Duplicate -y {root-folder}lib:gssapi:generic:gssapi.hin {root-folder}lib:gssapi:generic:gssapi.h
	SetFile -a l "{Targ}"
	
{root-folder}include:autoconf.h Ä {root-folder}mac:libraries:autoconf.h
	Duplicate -y {root-folder}mac:libraries:autoconf.h {root-folder}include:autoconf.h
	SetFile -a l "{Targ}"

##############################################################################################################
###			High-level abstract targets -- this is where we decide on options
##############################################################################################################
###	We need to generate the following Make variables to pass to the Makefile:
###		For GSS library
###			gss-library-output-folder						-- destination of GSS library output
###			gss-library-name								-- name of the GSS library
###			gss-library-export								-- name of gss GSS library export file
###			gss-library-libraries							-- list of libraries GSS library links against
###			gss-library-objects								-- list of object files GSS library links
###			gss-library-fragment-name						-- name of GSS library fragment
###			gss-library-main								-- name of GSS library main entry point
###			gss-library-init								-- name of GSS library initialization routine
###			gss-library-term								-- name of GSS library termination routine
###			gss-library-linker-options						-- all other GSS library linker options
###		For Krb5 library
###			krb5-library-output-folder						-- destination of Krb5 library output
###			krb5-library-name								-- name of the Krb5 library
###			krb5-library-export								-- name of gss Krb5 library export file
###			krb5-library-libraries							-- list of libraries Krb5 library links against
###			krb5-library-objects							-- list of object files Krb5 library links
###			krb5-library-fragment-name						-- name of Krb5 library fragment
###			krb5-library-main								-- name of Krb5 library main entry point
###			krb5-library-init								-- name of Krb5 library initialization routine
###			krb5-library-term								-- name of Krb5 library termination routine
###			krb5-library-linker-options						-- all other Krb5 library linker options
###		For Krb5 globals library
###			krb5-globals-library-output-folder				-- destination of Krb5 globals library output
###			krb5-globals-library-name						-- name of the Krb5 globals library
###			krb5-globals-library-export						-- name of gss Krb5 globals library export file
###			krb5-globals-library-libraries					-- list of libraries Krb5 globals library links against
###			krb5-globals-library-objects					-- list of object files Krb5 globals library links
###			krb5-globals-library-fragment-name				-- name of Krb5 globals library fragment
###			krb5-globals-library-main						-- name of Krb5 globals library main entry point
###			krb5-globals-library-init						-- name of Krb5 globals library initialization routine
###			krb5-globals-library-term						-- name of Krb5 globals library termination routine
###			krb5-globals-library-linker-options				-- all other Krb5 globals library linker options
###		For profile library
###			profile-library-output-folder					-- destination of profile library output
###			profile-library-name							-- name of the profile library
###			profile-library-export							-- name of gss profile library export file
###			profile-library-libraries						-- list of libraries profile library links against
###			profile-library-objects							-- list of object files profile library links
###			profile-library-fragment-name					-- name of profile library fragment
###			profile-library-main							-- name of profile library main entry point
###			profile-library-init							-- name of profile library initialization routine
###			profile-library-term							-- name of profile library termination routine
###			profile-library-linker-options					-- all other profile library linker options
###		For comerr library
###			comerr-library-output-folder					-- destination of comerr library output
###			comerr-library-name								-- name of the comerr library
###			comerr-library-export							-- name of gss comerr library export file
###			comerr-library-libraries						-- list of libraries comerr library links against
###			comerr-library-objects							-- list of object files comerr library links
###			comerr-library-fragment-name					-- name of comerr library fragment
###			comerr-library-main								-- name of comerr library main entry point
###			comerr-library-init								-- name of comerr library initialization routine
###			comerr-library-term								-- name of comerr library termination routine
###			comerr-library-linker-options					-- all other comerr library linker options
###		General
###			library-linker									-- linker to use
###			autogenerated-files								-- list of autogenerated files
###			library-platform								-- platform name (68K or PPC)
###			library-kind									-- library kind (".debug" or "")
###			object-suffix									-- object file suffix (.ppcf.o, .ppcd.o, .68kf.o, .68kd.o)
###			object-suffix-data								-- object file suffix fdor data libraries (.ppc.o, .68k.o)


### The following variables are platform- or kind-specific, but constant

clib-ppc-debug						= {mitsupportlib-root-folder}CLib:Binaries:CLib.PPC.debug
clib-68k-debug						= {mitsupportlib-root-folder}CLib:Binaries:CLib.68K.debug
clib-ppc-final						= {mitsupportlib-root-folder}CLib:Binaries:CLib.PPC
clib-68k-final						= {mitsupportlib-root-folder}CLib:Binaries:CLib.68K

runtimelib-ppc-debug				= {mitsupportlib-root-folder}RuntimeLib:Binaries:RuntimeLib.PPC.debug
runtimelib-68k-debug				= {mitsupportlib-root-folder}RuntimeLib:Binaries:RuntimeLib.68K.debug
runtimelib-ppc-final				= {mitsupportlib-root-folder}RuntimeLib:Binaries:RuntimeLib.PPC
runtimelib-68k-final				= {mitsupportlib-root-folder}RuntimeLib:Binaries:RuntimeLib.68K

standard-libraries-ppc-debug			="{clib-ppc-debug}""{runtimelib-ppc-debug}" ¶
	¶"{MWPPCLibraries}MSL ShLibRuntime.Lib¶" ¶
	¶"{SharedLibraries}InterfaceLib¶" ¶
	¶"{SharedLibraries}MathLib¶"
standard-libraries-68k-debug			="{clib-68k-debug}""{runtimelib-68k-debug}" ¶
	¶"{MW68KLibraries}MSL ShLibRuntimeCFM68K.Lib¶" ¶
	¶"{SharedLibraries}InterfaceLib¶" ¶
	¶"{MW68KLibraries}MathLibCFM68K (4i_8d).Lib¶"
standard-libraries-ppc-final			="{clib-ppc-final}""{runtimelib-ppc-final}" ¶
	¶"{MWPPCLibraries}MSL ShLibRuntime.Lib¶" ¶
	¶"{SharedLibraries}InterfaceLib¶" ¶
	¶"{SharedLibraries}MathLib¶"
standard-libraries-68k-final			="{clib-68k-final}""{runtimelib-68k-final}" ¶
	¶"{MW68KLibraries}MSL ShLibRuntimeCFM68K.Lib¶" ¶
	¶"{SharedLibraries}InterfaceLib¶" ¶
	¶"{MW68KLibraries}MathLibCFM68K (4i_8d).Lib¶"

ccachelib-ppc-debug						= {mitkerberoslib-root-folder}CCacheLib:Binaries:CCacheLib.PPC.debug
ccachelib-68k-debug						= {mitkerberoslib-root-folder}CCacheLib:Binaries:CCacheLib.68K.debug
ccachelib-ppc-final						= {mitkerberoslib-root-folder}CCacheLib:Binaries:CCacheLib.PPC
ccachelib-68k-final						= {mitkerberoslib-root-folder}CCacheLib:Binaries:CCacheLib.68K

socketslib-ppc-debug					= {mitsupportlib-root-folder}SocketsLib:Binaries:SocketsLib.PPC.debug
socketslib-68k-debug					= {mitsupportlib-root-folder}SocketsLib:Binaries:SocketsLib.68K.debug
socketslib-ppc-final					= {mitsupportlib-root-folder}SocketsLib:Binaries:SocketsLib.PPC
socketslib-68k-final					= {mitsupportlib-root-folder}SocketsLib:Binaries:SocketsLib.68K

errorlib-ppc-debug						= {mitsupportlib-root-folder}ErrorLib:Binaries:ErrorLib.PPC.debug
errorlib-68k-debug						= {mitsupportlib-root-folder}ErrorLib:Binaries:ErrorLib.68K.debug
errorlib-ppc-final						= {mitsupportlib-root-folder}ErrorLib:Binaries:ErrorLib.PPC
errorlib-68k-final						= {mitsupportlib-root-folder}ErrorLib:Binaries:ErrorLib.68K

object-suffix-ppc-debug					= .ppcd.o
object-suffix-68k-debug					= .68kd.o
object-suffix-ppc-final					= .ppcf.o
object-suffix-68k-final					= .68kf.o
object-suffix-ppc-data					= .ppc.o
object-suffix-68k-data					= .68k.o

gss-library-libraries-ppc-debug ={standard-libraries-ppc-debug}{krb5-library-output-folder}{krb5-library-name}{library-platform-ppc}{library-kind-debug}{profile-library-output-folder}{profile-library-name}{library-platform-ppc}{library-kind-debug}{comerr-library-output-folder}{comerr-library-name}{library-platform-ppc}{library-kind-debug}
gss-library-libraries-68k-debug ={standard-libraries-68k-debug}{krb5-library-output-folder}{krb5-library-name}{library-platform-68k}{library-kind-debug}{profile-library-output-folder}{profile-library-name}{library-platform-68k}{library-kind-debug}{comerr-library-output-folder}{comerr-library-name}{library-platform-68k}{library-kind-debug}
gss-library-libraries-ppc-final ={standard-libraries-ppc-final}{krb5-library-output-folder}{krb5-library-name}{library-platform-ppc}{library-kind-final}{profile-library-output-folder}{profile-library-name}{library-platform-ppc}{library-kind-final}{comerr-library-output-folder}{comerr-library-name}{library-platform-ppc}{library-kind-final}
gss-library-libraries-68k-final ={standard-libraries-68k-final}{krb5-library-output-folder}{krb5-library-name}{library-platform-68k}{library-kind-final}{profile-library-output-folder}{profile-library-name}{library-platform-68k}{library-kind-final}{comerr-library-output-folder}{comerr-library-name}{library-platform-68k}{library-kind-final}

krb5-library-libraries-ppc-debug ={standard-libraries-ppc-debug}{ccachelib-ppc-debug}{socketslib-ppc-debug}{errorlib-ppc-debug}{krb5-globals-library-output-folder}{krb5-globals-library-name}{library-platform-ppc}{library-kind-debug}{profile-library-output-folder}{profile-library-name}{library-platform-ppc}{library-kind-debug}{comerr-library-output-folder}{comerr-library-name}{library-platform-ppc}{library-kind-debug} ¶
	¶"{PPCLibraries}PPCMath64Lib.o¶" ¶
	¶"{SharedLibraries}DriverServicesLib¶"
krb5-library-libraries-68k-debug ={standard-libraries-68k-debug}{ccachelib-68k-debug}{socketslib-68k-debug}{errorlib-68k-debug}{krb5-globals-library-output-folder}{krb5-globals-library-name}{library-platform-68k}{library-kind-debug}{profile-library-output-folder}{profile-library-name}{library-platform-68k}{library-kind-debug}{comerr-library-output-folder}{comerr-library-name}{library-platform-68k}{library-kind-debug}
krb5-library-libraries-ppc-final ={standard-libraries-ppc-final}{ccachelib-ppc-final}{socketslib-ppc-final}{errorlib-ppc-final}{krb5-globals-library-output-folder}{krb5-globals-library-name}{library-platform-ppc}{library-kind-final}{profile-library-output-folder}{profile-library-name}{library-platform-ppc}{library-kind-final}{comerr-library-output-folder}{comerr-library-name}{library-platform-ppc}{library-kind-final} ¶
	¶"{PPCLibraries}PPCMath64Lib.o¶" ¶
	¶"{SharedLibraries}DriverServicesLib¶"
krb5-library-libraries-68k-final ={standard-libraries-68k-final}{ccachelib-68k-final}{socketslib-68k-final}{errorlib-68k-final}{krb5-globals-library-output-folder}{krb5-globals-library-name}{library-platform-68k}{library-kind-final}{profile-library-output-folder}{profile-library-name}{library-platform-68k}{library-kind-final}{comerr-library-output-folder}{comerr-library-name}{library-platform-68k}{library-kind-final}

krb5-globals-library-libraries-ppc-debug ={standard-libraries-ppc-debug}{ccachelib-ppc-debug}{krb5-globals-data-library-output-folder}{krb5-globals-data-library-name}{library-platform-ppc}
krb5-globals-library-libraries-68k-debug ={standard-libraries-68k-debug}{ccachelib-68k-debug}{krb5-globals-data-library-output-folder}{krb5-globals-data-library-name}{library-platform-68k}
krb5-globals-library-libraries-ppc-final ={standard-libraries-ppc-final}{ccachelib-ppc-final}{krb5-globals-data-library-output-folder}{krb5-globals-data-library-name}{library-platform-ppc}
krb5-globals-library-libraries-68k-final ={standard-libraries-68k-final}{ccachelib-68k-final}{krb5-globals-data-library-output-folder}{krb5-globals-data-library-name}{library-platform-68k}
	
krb5-globals-data-library-libraries-ppc ="{MWPPCLibraries}MSL RuntimePPC.Lib¶"
krb5-globals-data-library-libraries-68k ="{MW68KLibraries}MSL MWCFM68KRuntime.Lib¶"

profile-library-libraries-ppc-debug ={standard-libraries-ppc-debug}{comerr-library-output-folder}{comerr-library-name}{library-platform-ppc}{library-kind-debug}
profile-library-libraries-68k-debug ={standard-libraries-68k-debug}{comerr-library-output-folder}{comerr-library-name}{library-platform-68k}{library-kind-debug}
profile-library-libraries-ppc-final ={standard-libraries-ppc-final}{comerr-library-output-folder}{comerr-library-name}{library-platform-ppc}{library-kind-final}
profile-library-libraries-68k-final ={standard-libraries-68k-final}{comerr-library-output-folder}{comerr-library-name}{library-platform-68k}{library-kind-final}

comerr-library-libraries-ppc-debug ={standard-libraries-ppc-debug}
comerr-library-libraries-68k-debug ={standard-libraries-68k-debug}
comerr-library-libraries-ppc-final ={standard-libraries-ppc-final}
comerr-library-libraries-68k-final ={standard-libraries-68k-final}

### Construct linker options. 

common-linker-options = -sharedlibrary
common-linker-options-debug = {common-linker-options} -sym on
common-linker-options-final = {common-linker-options} -sym off

gss-library-common-linker-options =-cv {gss-library-current-version}-dv {gss-library-definition-version}-uv {gss-library-implementation-version}

gss-library-linker-options-ppc-debug = {common-linker-options-debug} {gss-library-common-linker-options}
gss-library-linker-options-68k-debug = {common-linker-options-debug} {gss-library-common-linker-options}
gss-library-linker-options-ppc-final = {common-linker-options-final} {gss-library-common-linker-options}
gss-library-linker-options-68k-final = {common-linker-options-final} {gss-library-common-linker-options}

krb5-library-common-linker-options =-cv {krb5-library-current-version}-dv {krb5-library-definition-version}-uv {krb5-library-implementation-version}

krb5-library-linker-options-ppc-debug = {common-linker-options-debug} {krb5-library-common-linker-options}
krb5-library-linker-options-68k-debug = {common-linker-options-debug} {krb5-library-common-linker-options}
krb5-library-linker-options-ppc-final = {common-linker-options-final} {krb5-library-common-linker-options}
krb5-library-linker-options-68k-final = {common-linker-options-final} {krb5-library-common-linker-options}

krb5-globals-library-common-linker-options =-cv {krb5-globals-library-current-version}-dv {krb5-globals-library-definition-version}-uv {krb5-globals-library-implementation-version}

krb5-globals-library-linker-options-ppc-debug = {common-linker-options-debug} {krb5-globals-library-common-linker-options}
krb5-globals-library-linker-options-68k-debug = {common-linker-options-debug} {krb5-globals-library-common-linker-options}
krb5-globals-library-linker-options-ppc-final = {common-linker-options-final} {krb5-globals-library-common-linker-options}
krb5-globals-library-linker-options-68k-final = {common-linker-options-final} {krb5-globals-library-common-linker-options}

krb5-globals-data-library-common-linker-options =-cv {krb5-globals-data-library-current-version}-dv {krb5-globals-data-library-definition-version}-uv {krb5-globals-data-library-implementation-version}-sharedata

krb5-globals-data-library-linker-options-ppc = {common-linker-options-debug} {krb5-globals-data-library-common-linker-options}
krb5-globals-data-library-linker-options-68k = {common-linker-options-debug} {krb5-globals-data-library-common-linker-options}

profile-library-common-linker-options =-cv {profile-library-current-version}-dv {profile-library-definition-version}-uv {profile-library-implementation-version}

profile-library-linker-options-ppc-debug = {common-linker-options-debug} {profile-library-common-linker-options}
profile-library-linker-options-68k-debug = {common-linker-options-debug} {profile-library-common-linker-options}
profile-library-linker-options-ppc-final = {common-linker-options-final} {profile-library-common-linker-options}
profile-library-linker-options-68k-final = {common-linker-options-final} {profile-library-common-linker-options}

comerr-library-common-linker-options =-cv {comerr-library-current-version}-dv {comerr-library-definition-version}-uv {comerr-library-implementation-version}

comerr-library-linker-options-ppc-debug = {common-linker-options-debug} {comerr-library-common-linker-options}
comerr-library-linker-options-68k-debug = {common-linker-options-debug} {comerr-library-common-linker-options}
comerr-library-linker-options-ppc-final = {common-linker-options-final} {comerr-library-common-linker-options}
comerr-library-linker-options-68k-final = {common-linker-options-final} {comerr-library-common-linker-options}

gss-library-objects-ppc-debug = `catenate {gss-objects-ppc-debug-list} | StreamEdit -d -set prefix="{root-folder}" -e "/¥:(Å)¨2/ Print prefix¨2"`{root-folder}mac:GSS.CFM{object-suffix-ppc-debug}
gss-library-objects-68k-debug = `catenate {gss-objects-68k-debug-list} | StreamEdit -d -set prefix="{root-folder}" -e "/¥:(Å)¨2/ Print prefix¨2"`{root-folder}mac:GSS.CFM{object-suffix-68k-debug}
gss-library-objects-ppc-final = `catenate {gss-objects-ppc-final-list} | StreamEdit -d -set prefix="{root-folder}" -e "/¥:(Å)¨2/ Print prefix¨2"`{root-folder}mac:GSS.CFM{object-suffix-ppc-final}
gss-library-objects-68k-final = `catenate {gss-objects-68k-final-list} | StreamEdit -d -set prefix="{root-folder}" -e "/¥:(Å)¨2/ Print prefix¨2"`{root-folder}mac:GSS.CFM{object-suffix-68k-final}

krb5-library-objects-ppc-debug = `catenate {krb5-objects-ppc-debug-list} | StreamEdit -d -set prefix="{root-folder}" -e "/¥:(Å)¨2/ Print prefix¨2"`{root-folder}mac:K5.CFM{object-suffix-ppc-debug}
krb5-library-objects-68k-debug = `catenate {krb5-objects-68k-debug-list} | StreamEdit -d -set prefix="{root-folder}" -e "/¥:(Å)¨2/ Print prefix¨2"`{root-folder}mac:K5.CFM{object-suffix-68k-debug}
krb5-library-objects-ppc-final = `catenate {krb5-objects-ppc-final-list} | StreamEdit -d -set prefix="{root-folder}" -e "/¥:(Å)¨2/ Print prefix¨2"`{root-folder}mac:K5.CFM{object-suffix-ppc-final}
krb5-library-objects-68k-final = `catenate {krb5-objects-68k-final-list} | StreamEdit -d -set prefix="{root-folder}" -e "/¥:(Å)¨2/ Print prefix¨2"`{root-folder}mac:K5.CFM{object-suffix-68k-final}

krb5-globals-library-objects-ppc-debug ={krb5-globals-root-folder}Krb5Globals{object-suffix-ppc-debug}{krb5-globals-root-folder}Krb5Globals.CFM{object-suffix-ppc-debug}
krb5-globals-library-objects-68k-debug ={krb5-globals-root-folder}Krb5Globals{object-suffix-68k-debug}{krb5-globals-root-folder}Krb5Globals.CFM{object-suffix-68k-debug}
krb5-globals-library-objects-ppc-final ={krb5-globals-root-folder}Krb5Globals{object-suffix-ppc-final}{krb5-globals-root-folder}Krb5Globals.CFM{object-suffix-ppc-final}
krb5-globals-library-objects-68k-final ={krb5-globals-root-folder}Krb5Globals{object-suffix-68k-final}{krb5-globals-root-folder}Krb5Globals.CFM{object-suffix-68k-final}

krb5-globals-data-library-objects-ppc = {krb5-globals-root-folder}Krb5GlobalsData{object-suffix-ppc-data}
krb5-globals-data-library-objects-68k = {krb5-globals-root-folder}Krb5GlobalsData{object-suffix-68k-data}

profile-library-objects-ppc-debug = `catenate {profile-objects-ppc-debug-list} | StreamEdit -d -set prefix="{root-folder}" -e "/¥:(Å)¨2/ Print prefix¨2"`{root-folder}mac:ProfileLib.CFM{object-suffix-ppc-debug}
profile-library-objects-68k-debug = `catenate {profile-objects-68k-debug-list} | StreamEdit -d -set prefix="{root-folder}" -e "/¥:(Å)¨2/ Print prefix¨2"`{root-folder}mac:ProfileLib.CFM{object-suffix-68k-debug}
profile-library-objects-ppc-final = `catenate {profile-objects-ppc-final-list} | StreamEdit -d -set prefix="{root-folder}" -e "/¥:(Å)¨2/ Print prefix¨2"`{root-folder}mac:ProfileLib.CFM{object-suffix-ppc-final}
profile-library-objects-68k-final = `catenate {profile-objects-68k-final-list} | StreamEdit -d -set prefix="{root-folder}" -e "/¥:(Å)¨2/ Print prefix¨2"`{root-folder}mac:ProfileLib.CFM{object-suffix-68k-final}

comerr-library-objects-ppc-debug = `catenate {comerr-objects-ppc-debug-list} | StreamEdit -d -set prefix="{root-folder}" -e "/¥:(Å)¨2/ Print prefix¨2"`
comerr-library-objects-68k-debug = `catenate {comerr-objects-68k-debug-list} | StreamEdit -d -set prefix="{root-folder}" -e "/¥:(Å)¨2/ Print prefix¨2"`
comerr-library-objects-ppc-final = `catenate {comerr-objects-ppc-final-list} | StreamEdit -d -set prefix="{root-folder}" -e "/¥:(Å)¨2/ Print prefix¨2"`
comerr-library-objects-68k-final = `catenate {comerr-objects-68k-final-list} | StreamEdit -d -set prefix="{root-folder}" -e "/¥:(Å)¨2/ Print prefix¨2"`

library-linker-ppc						= MWLinkPPC
library-linker-68K						= MWLink68K

### Construct compiler options.

common-compiler-options =-enum int -opt all -strings pool -mapcr ¶
        -mpw_pointers -warnings off -fatext -nosyspath -maxerrors 1000-align mac68k -opt off -toc_data on -fp_contract on ¶
		-model farData

# Don't put the prefix file in these options because they are used to precompile the prefix file
ppc-compiler-options = -tb on
68k-compiler-options = -model cfmflat 
debug-compiler-options = -sym on
final-compiler-options = -sym off

mitsupportlib-include-paths =-i {mitsupportlib-root-folder}SocketsLib:Headers:-i {mitsupportlib-root-folder}ErrorLib:Headers:-i {mitsupportlib-root-folder}UtilitiesLib:Headers:

include-paths = `catenate {include-folders-list} | StreamEdit -d -set prefix="{root-folder}mac:" -e "/-i (Å)¨1/ Print '-i 'prefix¨1"`-i {mitkerberoslib-root-folder}CCacheLib:Headers:-i {krb5-globals-root-folder}{mitsupportlib-include-paths}
		
compiler-options-ppc-debug = {include-paths} {common-compiler-options} {ppc-compiler-options}{debug-compiler-options} -prefix {precompiled-headers-ppc}
compiler-options-68k-debug = {include-paths} {common-compiler-options} {68k-compiler-options}{debug-compiler-options} -prefix {precompiled-headers-68k}
compiler-options-ppc-final = {include-paths} {common-compiler-options} {ppc-compiler-options}{final-compiler-options} -prefix {precompiled-headers-ppc}
compiler-options-68k-final = {include-paths} {common-compiler-options} {68k-compiler-options}{final-compiler-options} -prefix {precompiled-headers-68k}

compiler-ppc							= MWCPPC
compiler-68k							= MWC68K

### Precompiled headers

precompiled-headers-folder = {root-folder}mac:libraries:

precompiled-headers-ppc = {precompiled-headers-folder}KerberosHeaders.PPC
precompiled-headers-68k = {precompiled-headers-folder}KerberosHeaders.68K

precompiled-headers-source = {precompiled-headers-folder}KerberosHeaders.pch

{precompiled-headers-ppc} Ä {precompiled-headers-source} {precompiled-headers-folder}KerberosHeaders.h
	{compiler-ppc} {precompiled-headers-source} {common-compiler-options} {ppc-compiler-options}-precompile {Targ} -i {precompiled-headers-folder} {mitsupportlib-include-paths}

{precompiled-headers-68k} Ä {precompiled-headers-source} {precompiled-headers-folder}KerberosHeaders.h
	{compiler-68k} {precompiled-headers-source} {common-compiler-options} {68k-compiler-options}-precompile {Targ} -i {precompiled-headers-folder} {mitsupportlib-include-paths}

make-options-common =-f {makefile-name}-d root-folder="{root-folder}"-d autogenerated-files="{autogenerated-files}"-d gss-library-output-folder="{gss-library-output-folder}"-d gss-library-name="{gss-library-name}"-d gss-library-export="{gss-library-export}"-d gss-library-fragment-name={gss-library-fragment-name}-d gss-library-main="{gss-library-main}"-d gss-library-init="{gss-library-init}"-d gss-library-term="{gss-library-term}"-d krb5-library-output-folder="{krb5-library-output-folder}"-d krb5-library-name="{krb5-library-name}"-d krb5-library-export="{krb5-library-export}"-d krb5-library-fragment-name={krb5-library-fragment-name}-d krb5-library-main="{krb5-library-main}"-d krb5-library-init="{krb5-library-init}"-d krb5-library-term="{krb5-library-term}"-d krb5-globals-library-output-folder="{krb5-globals-library-output-folder}"-d krb5-globals-library-name="{krb5-globals-library-name}"-d krb5-globals-library-export="{krb5-globals-library-export}"-d krb5-globals-library-fragment-name={krb5-globals-library-fragment-name}-d krb5-globals-library-main="{krb5-globals-library-main}"-d krb5-globals-library-init="{krb5-globals-library-init}"-d krb5-globals-data-library-term="{krb5-globals-data-library-term}"-d krb5-globals-data-library-output-folder="{krb5-globals-data-library-output-folder}"-d krb5-globals-data-library-name="{krb5-globals-data-library-name}"-d krb5-globals-data-library-export="{krb5-globals-data-library-export}"-d krb5-globals-data-library-fragment-name={krb5-globals-data-library-fragment-name}-d krb5-globals-data-library-main="{krb5-globals-data-library-main}"-d krb5-globals-data-library-init="{krb5-globals-data-library-init}"-d krb5-globals-data-library-term="{krb5-globals-data-library-term}"-d profile-library-output-folder="{profile-library-output-folder}"-d profile-library-name="{profile-library-name}"-d profile-library-export="{profile-library-export}"-d profile-library-fragment-name={profile-library-fragment-name}-d profile-library-main="{profile-library-main}"-d profile-library-init="{profile-library-init}"-d profile-library-term="{profile-library-term}"-d comerr-library-output-folder="{comerr-library-output-folder}"-d comerr-library-name="{comerr-library-name}"-d comerr-library-export="{comerr-library-export}"-d comerr-library-fragment-name={comerr-library-fragment-name}-d comerr-library-main="{comerr-library-main}"-d comerr-library-init="{comerr-library-init}"-d comerr-library-term="{comerr-library-term}"

make-options-ppc-debug =-d library-linker="{library-linker-ppc}"-d library-platform="{library-platform-ppc}"-d library-kind="{library-kind-debug}"-d gss-library-libraries="{gss-library-libraries-ppc-debug}"-d gss-library-objects="{gss-library-objects-ppc-debug}"-d gss-library-linker-options="{gss-library-linker-options-ppc-debug}"-d krb5-library-libraries="{krb5-library-libraries-ppc-debug}"-d krb5-library-objects="{krb5-library-objects-ppc-debug}"-d krb5-library-linker-options="{krb5-library-linker-options-ppc-debug}"-d krb5-globals-library-libraries="{krb5-globals-library-libraries-ppc-debug}"-d krb5-globals-library-objects="{krb5-globals-library-objects-ppc-debug}"-d krb5-globals-library-linker-options="{krb5-globals-library-linker-options-ppc-debug}"-d krb5-globals-data-library-libraries="{krb5-globals-data-library-libraries-ppc}"-d krb5-globals-data-library-objects="{krb5-globals-data-library-objects-ppc}"-d krb5-globals-data-library-linker-options="{krb5-globals-data-library-linker-options-ppc}"-d profile-library-libraries="{profile-library-libraries-ppc-debug}"-d profile-library-objects="{profile-library-objects-ppc-debug}"-d profile-library-linker-options="{profile-library-linker-options-ppc-debug}"-d comerr-library-libraries="{comerr-library-libraries-ppc-debug}"-d comerr-library-objects="{comerr-library-objects-ppc-debug}"-d comerr-library-linker-options="{comerr-library-linker-options-ppc-debug}"-d object-suffix="{object-suffix-ppc-debug}"-d object-suffix-data="{object-suffix-ppc-data}"-d compiler-options="{compiler-options-ppc-debug}"-d compiler="{compiler-ppc}"-d precompiled-headers="{precompiled-headers-ppc}"
	
make-options-68k-debug =-d library-linker="{library-linker-68k}"-d library-platform="{library-platform-68k}"-d library-kind="{library-kind-debug}"-d gss-library-libraries="{gss-library-libraries-68k-debug}"-d gss-library-objects="{gss-library-objects-68k-debug}"-d gss-library-linker-options="{gss-library-linker-options-68k-debug}"-d krb5-library-libraries="{krb5-library-libraries-68k-debug}"-d krb5-library-objects="{krb5-library-objects-68k-debug}"-d krb5-library-linker-options="{krb5-library-linker-options-68k-debug}"-d krb5-globals-library-libraries="{krb5-globals-library-libraries-68k-debug}"-d krb5-globals-library-objects="{krb5-globals-library-objects-68k-debug}"-d krb5-globals-library-linker-options="{krb5-globals-library-linker-options-68k-debug}"-d krb5-globals-data-library-libraries="{krb5-globals-data-library-libraries-68k}"-d krb5-globals-data-library-objects="{krb5-globals-data-library-objects-68k}"-d krb5-globals-data-library-linker-options="{krb5-globals-data-library-linker-options-68k}"-d profile-library-libraries="{profile-library-libraries-68k-debug}"-d profile-library-objects="{profile-library-objects-68k-debug}"-d profile-library-linker-options="{profile-library-linker-options-68k-debug}"-d comerr-library-libraries="{comerr-library-libraries-68k-debug}"-d comerr-library-objects="{comerr-library-objects-68k-debug}"-d comerr-library-linker-options="{comerr-library-linker-options-68k-debug}"-d object-suffix="{object-suffix-68k-debug}"-d object-suffix-data="{object-suffix-68k-data}"-d compiler-options="{compiler-options-68k-debug}"-d compiler="{compiler-68k}"-d precompiled-headers="{precompiled-headers-68k}"

	
make-options-ppc-final =-d library-linker="{library-linker-ppc}"-d library-platform="{library-platform-ppc}"-d library-kind="{library-kind-final}"-d gss-library-libraries="{gss-library-libraries-ppc-final}"-d gss-library-objects="{gss-library-objects-ppc-final}"-d gss-library-linker-options="{gss-library-linker-options-ppc-final}"-d krb5-library-libraries="{krb5-library-libraries-ppc-final}"-d krb5-library-objects="{krb5-library-objects-ppc-final}"-d krb5-library-linker-options="{krb5-library-linker-options-ppc-final}"-d krb5-globals-library-libraries="{krb5-globals-library-libraries-ppc-final}"-d krb5-globals-library-objects="{krb5-globals-library-objects-ppc-final}"-d krb5-globals-library-linker-options="{krb5-globals-library-linker-options-ppc-final}"-d krb5-globals-data-library-libraries="{krb5-globals-data-library-libraries-ppc}"-d krb5-globals-data-library-objects="{krb5-globals-data-library-objects-ppc}"-d krb5-globals-data-library-linker-options="{krb5-globals-data-library-linker-options-ppc}"-d profile-library-libraries="{profile-library-libraries-ppc-final}"-d profile-library-objects="{profile-library-objects-ppc-final}"-d profile-library-linker-options="{profile-library-linker-options-ppc-final}"-d comerr-library-libraries="{comerr-library-libraries-ppc-final}"-d comerr-library-objects="{comerr-library-objects-ppc-final}"-d comerr-library-linker-options="{comerr-library-linker-options-ppc-final}"-d object-suffix="{object-suffix-ppc-final}"-d object-suffix-data="{object-suffix-ppc-data}"-d compiler-options="{compiler-options-ppc-final}"-d compiler="{compiler-ppc}"-d precompiled-headers="{precompiled-headers-ppc}"
	
make-options-68k-final =-d library-linker="{library-linker-68k}"-d library-platform="{library-platform-68k}"-d library-kind="{library-kind-final}"-d gss-library-libraries="{gss-library-libraries-68k-final}"-d gss-library-objects="{gss-library-objects-68k-final}"-d gss-library-linker-options="{gss-library-linker-options-68k-final}"-d krb5-library-libraries="{krb5-library-libraries-68k-final}"-d krb5-library-objects="{krb5-library-objects-68k-final}"-d krb5-library-linker-options="{krb5-library-linker-options-68k-final}"-d krb5-globals-library-libraries="{krb5-globals-library-libraries-68k-final}"-d krb5-globals-library-objects="{krb5-globals-library-objects-68k-final}"-d krb5-globals-library-linker-options="{krb5-globals-library-linker-options-68k-final}"-d krb5-globals-data-library-libraries="{krb5-globals-data-library-libraries-68k}"-d krb5-globals-data-library-objects="{krb5-globals-data-library-objects-68k}"-d krb5-globals-data-library-linker-options="{krb5-globals-data-library-linker-options-68k}"-d profile-library-libraries="{profile-library-libraries-68k-final}"-d profile-library-objects="{profile-library-objects-68k-final}"-d profile-library-linker-options="{profile-library-linker-options-68k-final}"-d comerr-library-libraries="{comerr-library-libraries-68k-final}"-d comerr-library-objects="{comerr-library-objects-68k-final}"-d comerr-library-linker-options="{comerr-library-linker-options-68k-final}"-d object-suffix="{object-suffix-68k-final}"-d object-suffix-data="{object-suffix-68k-data}"-d compiler-options="{compiler-options-68k-final}"-d compiler="{compiler-68k}"-d precompiled-headers="{precompiled-headers-68k}"

make-output = "{TempFolder}GSS/Kerberos Makefile script"
submakefile-target = gss-library

ppc-debug Ä {makefile-name} {gss-objects-ppc-debug-list} {krb5-objects-ppc-debug-list}{profile-objects-ppc-debug-list} {comerr-objects-ppc-debug-list} {include-folders-list}
	Make {make-options-common} {make-options-ppc-debug} {submakefile-target} > {make-output}
	{make-output}
	
68k-debug Ä {makefile-name} {gss-objects-68k-debug-list} {krb5-objects-68k-debug-list}{profile-objects-68k-debug-list} {comerr-objects-68k-debug-list} {include-folders-list}
	Make {make-options-common} {make-options-68k-debug} {submakefile-target} > {make-output}
	{make-output}
	
ppc-final Ä {makefile-name} {gss-objects-ppc-final-list} {krb5-objects-ppc-final-list}{profile-objects-ppc-final-list} {comerr-objects-ppc-final-list} {include-folders-list}
	Make {make-options-common} {make-options-ppc-final} {submakefile-target} > {make-output}
	{make-output}
	
68k-final Ä {makefile-name} {gss-objects-68k-final-list} {krb5-objects-68k-final-list}{profile-objects-68k-final-list} {comerr-objects-68k-final-list} {include-folders-list}
	Make {make-options-common} {make-options-68k-final} {submakefile-target} > {make-output}
	{make-output}
	

##############################################################################################################
###			Variable targets -- these depend on which target we select in the above make invocations
##############################################################################################################
###	We want the following to be defined in order for these targets to work:
###		For GSS library
###			gss-library-output-folder						-- destination of GSS library output
###			gss-library-name								-- name of the GSS library
###			gss-library-export								-- name of gss GSS library export file
###			gss-library-libraries							-- list of libraries GSS library links against
###			gss-library-objects								-- list of object files GSS library links
###			gss-library-fragment-name						-- name of GSS library fragment
###			gss-library-main								-- name of GSS library main entry point
###			gss-library-init								-- name of GSS library initialization routine
###			gss-library-term								-- name of GSS library termination routine
###			gss-library-linker-options						-- all other GSS library linker options
###		For Krb5 library
###			krb5-library-output-folder						-- destination of Krb5 library output
###			krb5-library-name								-- name of the Krb5 library
###			krb5-library-export								-- name of Krb5 library export file
###			krb5-library-libraries							-- list of libraries Krb5 library links against
###			krb5-library-objects							-- list of object files Krb5 library links
###			krb5-library-fragment-name						-- name of Krb5 library fragment
###			krb5-library-main								-- name of Krb5 library main entry point
###			krb5-library-init								-- name of Krb5 library initialization routine
###			krb5-library-term								-- name of Krb5 library termination routine
###			krb5-library-linker-options						-- all other Krb5 library linker options
###		For Krb5 globals library
###			krb5-globals-library-output-folder				-- destination of Krb5 globals library output
###			krb5-globals-library-name						-- name of the Krb5 globals library
###			krb5-globals-library-export						-- name of gss Krb5 globals library export file
###			krb5-globals-library-libraries					-- list of libraries Krb5 globals library links against
###			krb5-globals-library-objects					-- list of object files Krb5 globals library links
###			krb5-globals-library-fragment-name				-- name of Krb5 globals library fragment
###			krb5-globals-library-main						-- name of Krb5 globals library main entry point
###			krb5-globals-library-init						-- name of Krb5 globals library initialization routine
###			krb5-globals-library-term						-- name of Krb5 globals library termination routine
###			krb5-globals-library-linker-options				-- all other Krb5 globals library linker options
###		For Krb5 globals data library
###			krb5-globals-data-library-output-folder			-- destination of Krb5 globals library output
###			krb5-globals-data-library-name					-- name of the Krb5 globals library
###			krb5-globals-data-library-export				-- name of gss Krb5 globals library export file
###			krb5-globals-data-library-libraries				-- list of libraries Krb5 globals library links against
###			krb5-globals-data-library-objects				-- list of object files Krb5 globals library links
###			krb5-globals-data-library-fragment-name			-- name of Krb5 globals library fragment
###			krb5-globals-data-library-main					-- name of Krb5 globals library main entry point
###			krb5-globals-data-library-init					-- name of Krb5 globals library initialization routine
###			krb5-globals-data-library-term					-- name of Krb5 globals library termination routine
###			krb5-globals-data-library-linker-options		-- all other Krb5 globals library linker options
###		For profile library
###			profile-library-output-folder					-- destination of profile library output
###			profile-library-name							-- name of the profile library
###			profile-library-export							-- name of profile library export file
###			profile-library-libraries						-- list of libraries profile library links against
###			profile-library-objects							-- list of object files profile library links
###			profile-library-fragment-name					-- name of profile library fragment
###			profile-library-main							-- name of profile library main entry point
###			profile-library-init							-- name of profile library initialization routine
###			profile-library-term							-- name of profile library termination routine
###			profile-library-linker-options					-- all other profile library linker options
###		For comerr library
###			comerr-library-output-folder					-- destination of comerr library output
###			comerr-library-name								-- name of the comerr library
###			comerr-library-export							-- name of comerr library export file
###			comerr-library-libraries						-- list of libraries comerr library links against
###			comerr-library-objects							-- list of object files comerr library links
###			comerr-library-fragment-name					-- name of comerr library fragment
###			comerr-library-main								-- name of comerr library main entry point
###			comerr-library-init								-- name of comerr library initialization routine
###			comerr-library-term								-- name of comerr library termination routine
###			comerr-library-linker-options					-- all other comerr library linker options
###		General
###			library-linker									-- linker to use
###			autogenerated-files								-- list of autogenerated files
###			library-platform								-- platform name (68K or PPC)
###			library-kind									-- library kind (".debug" or "")


### script to create a folder if it does not exist
create-folder = {root-folder}mac:create-folder.mpw


### defaults, will be set to something better by the make commands above
library-linker =
library-platform =
library-kind =
gss-library-libraries =
gss-library-objects =
gss-library-linker-options =
krb5-library-libraries =
krb5-library-objects =
krb5-library-linker-options =
krb5-globals-library-libraries =
krb5-globals-library-objects =
krb5-globals-library-linker-options =
krb5-globals-data-library-libraries =
krb5-globals-data-library-objects =
krb5-globals-data-library-linker-options =
precompiled-headers =
object-suffix = .ignore.me
object-suffix-data = .ignore.me.too
profile-library-libraries =
profile-library-objects =
profile-library-linker-options =
comerr-library-libraries =
comerr-library-objects =
comerr-library-linker-options =

###	Generate various major components of build commands from the above variables
gss-library-output-files ={gss-library-output-folder}{gss-library-name}{library-platform}{library-kind}
gss-library-dependencies ={autogenerated-files} {gss-library-export} {gss-library-libraries} {gss-library-objects}
gss-library-build-command ={library-linker}-name "{gss-library-fragment-name}{library-kind}"-main {gss-library-main}-init {gss-library-init}-term {gss-library-term}-@export {gss-library-export}-map {gss-library-output-folder}{gss-library-name}{library-platform}{library-kind}.MAP ¶
	-o {gss-library-output-folder}{gss-library-name}{library-platform}{library-kind}{gss-library-linker-options}{gss-library-objects} {gss-library-libraries}
	
krb5-library-output-files ={krb5-library-output-folder}{krb5-library-name}{library-platform}{library-kind}
krb5-library-dependencies ={autogenerated-files} {krb5-library-export} {krb5-library-libraries} {krb5-library-objects}
krb5-library-build-command ={library-linker}-name "{krb5-library-fragment-name}{library-kind}"-main {krb5-library-main}-init {krb5-library-init}-term {krb5-library-term}-@export {krb5-library-export}-map {krb5-library-output-folder}{krb5-library-name}{library-platform}{library-kind}.MAP ¶
	-o {krb5-library-output-folder}{krb5-library-name}{library-platform}{library-kind}{krb5-library-linker-options}{krb5-library-objects} {krb5-library-libraries}

krb5-globals-library-output-files ={krb5-globals-library-output-folder}{krb5-globals-library-name}{library-platform}{library-kind}
krb5-globals-library-dependencies ={autogenerated-files} {krb5-globals-library-export} {krb5-globals-library-libraries} {krb5-globals-library-objects}
krb5-globals-library-build-command ={library-linker}-name "{krb5-globals-library-fragment-name}{library-kind}"-main {krb5-globals-library-main}-init {krb5-globals-library-init}-term {krb5-globals-library-term}-@export {krb5-globals-library-export}-map {krb5-globals-library-output-folder}{krb5-globals-library-name}{library-platform}{library-kind}.MAP ¶
	-o {krb5-globals-library-output-folder}{krb5-globals-library-name}{library-platform}{library-kind}{krb5-globals-library-linker-options}{krb5-globals-library-objects} {krb5-globals-library-libraries}

krb5-globals-data-library-output-files ={krb5-globals-data-library-output-folder}{krb5-globals-data-library-name}{library-platform}
krb5-globals-data-library-dependencies ={autogenerated-files} {krb5-globals-data-library-export} {krb5-globals-data-library-libraries} {krb5-globals-data-library-objects}
krb5-globals-data-library-build-command ={library-linker}-name "{krb5-globals-data-library-fragment-name}"-main {krb5-globals-data-library-main}-init {krb5-globals-data-library-init}-term {krb5-globals-data-library-term}-@export {krb5-globals-data-library-export}-map {krb5-globals-data-library-output-folder}{krb5-globals-data-library-name}{library-platform}.MAP ¶
	-o {krb5-globals-data-library-output-folder}{krb5-globals-data-library-name}{library-platform}{krb5-globals-data-library-linker-options}{krb5-globals-data-library-objects} {krb5-globals-data-library-libraries}

profile-library-output-files ={profile-library-output-folder}{profile-library-name}{library-platform}{library-kind}
profile-library-dependencies ={autogenerated-files} {profile-library-export} {profile-library-libraries} {profile-library-objects}
profile-library-build-command ={library-linker}-name "{profile-library-fragment-name}{library-kind}"-main {profile-library-main}-init {profile-library-init}-term {profile-library-term}-@export {profile-library-export}-map {profile-library-output-folder}{profile-library-name}{library-platform}{library-kind}.MAP ¶
	-o {profile-library-output-folder}{profile-library-name}{library-platform}{library-kind}{profile-library-linker-options}{profile-library-objects} {profile-library-libraries}

comerr-library-output-files ={comerr-library-output-folder}{comerr-library-name}{library-platform}{library-kind}
comerr-library-dependencies ={autogenerated-files} {comerr-library-export} {comerr-library-libraries} {comerr-library-objects}
comerr-library-build-command ={library-linker}-name "{comerr-library-fragment-name}{library-kind}"-main {comerr-library-main}-init {comerr-library-init}-term {comerr-library-term}-@export {comerr-library-export}-map {comerr-library-output-folder}{comerr-library-name}{library-platform}{library-kind}.MAP ¶
	-o {comerr-library-output-folder}{comerr-library-name}{library-platform}{library-kind}{comerr-library-linker-options}{comerr-library-objects} {comerr-library-libraries}

###	Build commands

gss-library Ä {gss-library-output-files}
krb5-library Ä {krb5-library-output-files}
krb5-globals-library Ä {krb5-globals-library-output-files}
krb5-globals-data-library Ä {krb5-globals-data-library-output-files}
profile-library Ä {profile-library-output-files}
comerr-library Ä {comerr-library-output-files}

{gss-library-output-files} ÄÄ {gss-library-dependencies} {makefile-name}
	{create-folder} {gss-library-output-folder}
	{gss-library-build-command}
	
{krb5-library-output-files} ÄÄ {krb5-library-dependencies} {makefile-name}
	{create-folder} {krb5-library-output-folder}
	{krb5-library-build-command}

{krb5-globals-library-output-files} ÄÄ {krb5-globals-library-dependencies} {makefile-name}
	{create-folder} {krb5-globals-library-output-folder}
	{krb5-globals-library-build-command}
	
{krb5-globals-data-library-output-files} ÄÄ {krb5-globals-data-library-dependencies} {makefile-name}
	{create-folder} {krb5-globals-data-library-output-folder}
	{krb5-globals-data-library-build-command}

{profile-library-output-files} ÄÄ {profile-library-dependencies} {makefile-name}
	{create-folder} {profile-library-output-folder}
	{profile-library-build-command}

{comerr-library-output-files} ÄÄ {comerr-library-dependencies} {makefile-name}
	{create-folder} {comerr-library-output-folder}
	{comerr-library-build-command}

##############################################################################################################
###			Default compilation rules
##############################################################################################################

{object-suffix} Ä .c {autogenerated-files} {makefile-name} {precompiled-headers}
	echo {DepDir}{Default}.c
	{compiler} {DepDir}{Default}.c -o {DepDir}{Default}{object-suffix} {compiler-options}

{object-suffix-data} Ä .c {autogenerated-files} {makefile-name} {precompiled-headers}
	echo {DepDir}{Default}.c
	{compiler} {DepDir}{Default}.c -o {DepDir}{Default}{object-suffix-data} {compiler-options}

##############################################################################################################
###			Autogenerating classic 68K glue files
##############################################################################################################

classic-glue-generation-script 						= {root-folder}mac:CFMGlue.pl
gss-library-glue-output-folder						= {root-folder}:GSSLib:ClassicGlue:
krb5-library-glue-output-folder						= {root-folder}:Kerberos5Lib:ClassicGlue:
profile-library-glue-output-folder					= {root-folder}:KerberosProfileLib:ClassicGlue:
comerr-library-glue-output-folder					= {root-folder}:ComErrLib:ClassicGlue:

gss-library-glue-output								= {gss-library-glue-output-folder}GSSLib.glue.c
krb5-library-glue-output							= {krb5-library-glue-output-folder}Kerberos5Lib.glue.c
profile-library-glue-output							= {profile-library-glue-output-folder}KrbProfileLib.glue.c
comerr-library-glue-output							= {comerr-library-glue-output-folder}ComErrLib.glue.c

classic-glue-output ={gss-library-glue-output}{krb5-library-glue-output}{profile-library-glue-output}{comerr-library-glue-output}

glue Ä {classic-glue-output}

glue-gss Ä {gss-library-glue-output}
glue-krb5 Ä {krb5-library-glue-output}
glue-profile Ä {profile-library-glue-output}
glue-comerr Ä {comerr-library-glue-output}

{krb5-library-glue-output} Ä {root-folder}mac:K5.CFMglue.cin {root-folder}mac:K5.CFMglue.proto.h ¶
	{root-folder}mac:CFMglue.c {root-folder}mac:K5.moreCFMglue.cin {classic-glue-generation-script}
	{create-folder} {krb5-library-glue-output-folder}
	perl {classic-glue-generation-script} < {root-folder}mac:K5.CFMglue.proto.h > {root-folder}mac:K5.CFMglue.c
	Catenate {root-folder}mac:K5.CFMglue.cin {root-folder}mac:CFMglue.c {root-folder}mac:K5.CFMglue.c ¶
	{root-folder}mac:K5.moreCFMglue.cin | Catenate > {krb5-library-glue-output}

{gss-library-glue-output} Ä {root-folder}mac:GSS.CFMglue.cin {root-folder}mac:GSS.CFMglue.proto.h ¶
	{root-folder}mac:CFMglue.c {root-folder}mac:GSS.moreCFMglue.cin {classic-glue-generation-script}
	{create-folder} {gss-library-glue-output-folder}
	perl {classic-glue-generation-script} < {root-folder}mac:GSS.CFMglue.proto.h > {root-folder}mac:GSS.CFMglue.c
	Catenate {root-folder}mac:GSS.CFMglue.cin {root-folder}mac:CFMglue.c {root-folder}mac:GSS.CFMglue.c ¶
	{root-folder}mac:GSS.moreCFMglue.cin | Catenate > {gss-library-glue-output}

{profile-library-glue-output} Ä {root-folder}mac:KrbProfileLib.glue.pre.cin {root-folder}mac:KrbProfileLib.glue.proto.h ¶
	{root-folder}mac:CFMglue.c {root-folder}mac:KrbProfileLib.glue.post.cin {classic-glue-generation-script}
	{create-folder} {profile-library-glue-output-folder}
	perl {classic-glue-generation-script} < {root-folder}mac:KrbProfileLib.glue.proto.h > {root-folder}mac:KrbProfileLib.CFMglue.c
	Catenate {root-folder}mac:KrbProfileLib.glue.pre.cin {root-folder}mac:CFMglue.c {root-folder}mac:KrbProfileLib.CFMglue.c ¶
	{root-folder}mac:KrbProfileLib.glue.post.cin | Catenate > {profile-library-glue-output}

{comerr-library-glue-output} Ä {root-folder}mac:ComErrLib.glue.pre.cin {root-folder}mac:ComErrLib.glue.proto.h ¶
	{root-folder}mac:CFMglue.c {root-folder}mac:ComErrLib.glue.post.cin {classic-glue-generation-script}
	{create-folder} {comerr-library-glue-output-folder}
	perl {classic-glue-generation-script} < {root-folder}mac:ComErrLib.glue.proto.h > {root-folder}mac:ComErrLib.CFMglue.c
	Catenate {root-folder}mac:ComErrLib.glue.pre.cin {root-folder}mac:CFMglue.c {root-folder}mac:ComErrLib.CFMglue.c ¶
	{root-folder}mac:ComErrLib.glue.post.cin | Catenate > {comerr-library-glue-output}

##############################################################################################################
###			Clean target deletes all generated files
##############################################################################################################

clean Ä
	# Need a dummy invalid name at the end to cover the case when nothing is found
	Delete -i `files -r -s -o -f "{root-folder}" | StreamEdit  -d -e "/Å{object-suffix-ppc-debug}/ Print"` supercalifragilisticexpialidoucious
	Delete -i `files -r -s -o -f "{root-folder}" | StreamEdit  -d -e "/Å{object-suffix-68k-debug}/ Print"` supercalifragilisticexpialidoucious
	Delete -i `files -r -s -o -f "{root-folder}" | StreamEdit  -d -e "/Å{object-suffix-ppc-final}/ Print"` supercalifragilisticexpialidoucious
	Delete -i `files -r -s -o -f "{root-folder}" | StreamEdit  -d -e "/Å{object-suffix-68k-final}/ Print"` supercalifragilisticexpialidoucious
	Delete -i `files -r -s -o -f "{root-folder}" | StreamEdit  -d -e "/Å{object-suffix-ppc-data}/ Print"` supercalifragilisticexpialidoucious
	Delete -i `files -r -s -o -f "{root-folder}" | StreamEdit  -d -e "/Å{object-suffix-68k-data}/ Print"` supercalifragilisticexpialidoucious
	Delete -i {all-lists}
	
##############################################################################################################
###			Copying headers around
##############################################################################################################

gss-headers-output-folder							= {root-folder}:GSSLib:Headers:
krb5-headers-output-folder							= {root-folder}:Kerberos5Lib:Headers:
krb5-globals-headers-output-folder					= {root-folder}:Kerberos5GlobalsLib:Headers:
profile-headers-output-folder						= {root-folder}:KerberosProfileLib:Headers:

gss-headers-output ="{gss-headers-output-folder}gssapi.h""{gss-headers-output-folder}gssapi_krb5.h"

krb5-headers-output ="{krb5-headers-output-folder}krb5.h""{krb5-headers-output-folder}com_err.h""{krb5-headers-output-folder}profile.h""{krb5-headers-output-folder}win-mac.h"

krb5-globals-headers-output ="{krb5-globals-headers-output-folder}Kerberos5Globals.h"
	
profile-headers-output ="{profile-headers-output-folder}profile.h"
	
headers-output = {gss-headers-output} {krb5-headers-output} {krb5-globals-headers-output} {profile-headers-output}

headers Ä {headers-output}

"{gss-headers-output-folder}gssapi.h" Ä "{root-folder}lib:gssapi:generic:gssapi.h" {makefile-name}
	"{create-folder}" "{TargDir}"
	If (`Exists "{Targ}" | Count -l`)
		SetFile -a l "{Targ}"
	End
	Duplicate -y "{root-folder}lib:gssapi:generic:gssapi.h" "{Targ}"
	SetFile -a l "{Targ}"

"{gss-headers-output-folder}gssapi_krb5.h" Ä "{root-folder}lib:gssapi:krb5:gssapi_krb5.h" {makefile-name}
	"{create-folder}" "{TargDir}"
	If (`Exists "{Targ}" | Count -l`)
		SetFile -a l "{Targ}"
	End
	Duplicate -y "{root-folder}lib:gssapi:krb5:gssapi_krb5.h" "{Targ}"
	SetFile -a l "{Targ}"

"{krb5-headers-output-folder}krb5.h" Ä "{root-folder}include:krb5.h" {makefile-name}
	"{create-folder}" "{TargDir}"
	If (`Exists "{Targ}" | Count -l`)
		SetFile -a l "{Targ}"
	End
	Duplicate -y "{root-folder}include:krb5.h" "{Targ}"
	SetFile -a l "{Targ}"

"{krb5-headers-output-folder}com_err.h" Ä "{root-folder}util:et:com_err.h" {makefile-name}
	"{create-folder}" "{TargDir}"
	If (`Exists "{Targ}" | Count -l`)
		SetFile -a l "{Targ}"
	End
	Duplicate -y "{root-folder}util:et:com_err.h" "{Targ}"
	SetFile -a l "{Targ}"

"{krb5-headers-output-folder}profile.h" Ä "{root-folder}util:profile:profile.h" {makefile-name}
	"{create-folder}" "{TargDir}"
	If (`Exists "{Targ}" | Count -l`)
		SetFile -a l "{Targ}"
	End
	Duplicate -y "{root-folder}util:profile:profile.h" "{Targ}"
	SetFile -a l "{Targ}"

"{krb5-headers-output-folder}win-mac.h" Ä "{root-folder}include:win-mac.h" {makefile-name}
	"{create-folder}" "{TargDir}"
	If (`Exists "{Targ}" | Count -l`)
		SetFile -a l "{Targ}"
	End
	Duplicate -y "{root-folder}include:win-mac.h" "{Targ}"
	SetFile -a l "{Targ}"

"{krb5-globals-headers-output-folder}Kerberos5Globals.h" Ä "{root-folder}mac:libraries:Kerberos v5 Globals:Krb5Globals.h" {makefile-name}
	"{create-folder}" "{TargDir}"
	If (`Exists "{Targ}" | Count -l`)
		SetFile -a l "{Targ}"
	End
	Duplicate -y "{root-folder}mac:libraries:Kerberos v5 Globals:Krb5Globals.h" "{Targ}"
	SetFile -a l "{Targ}"

"{profile-headers-output-folder}profile.h" Ä "{root-folder}util:profile:profile.h" {makefile-name}
	"{create-folder}" "{TargDir}"
	If (`Exists "{Targ}" | Count -l`)
		SetFile -a l "{Targ}"
	End
	Duplicate -y "{root-folder}util:profile:profile.h" "{Targ}"
	SetFile -a l "{Targ}"

##############################################################################################################
###			Copying documentation around
##############################################################################################################

gss-documentation-output-folder						= {root-folder}:GSSLib:Documentation:
krb5-documentation-output-folder					= {root-folder}:Kerberos5Lib:Documentation:
krb5-globals-documentation-output-folder			= {root-folder}:Kerberos5GlobalsLib:Documentation:
profile-documentation-output-folder					= {root-folder}:KerberosProfileLib:Documentation:

gss-documentation-output = ""

krb5-documentation-output ="{krb5-documentation-output-folder}krb5api.pdf"

krb5-globals-documentation-output ="{krb5-globals-documentation-output-folder}Kerberos5Globals.html"
	
profile-documentation-output = ""
	
documentation-output = {gss-documentation-output} {krb5-documentation-output}{krb5-globals-documentation-output} {profile-documentation-output}

documentation Ä {documentation-output}

"{krb5-documentation-output-folder}krb5api.pdf" Ä {makefile-name}
	"{create-folder}" "{TargDir}"
	If (`Exists "{Targ}" | Count -l`)
		SetFile -a l "{Targ}"
	End
	If (`Exists "{root-folder}:::Documentation:pdf:krb5api.pdf"`)
		Duplicate -y "{root-folder}:::Documentation:pdf:krb5api.pdf" "{Targ}"
	End
	SetFile -a l "{Targ}"

"{krb5-globals-documentation-output-folder}Kerberos5Globals.html" Ä "{root-folder}mac:libraries:Kerberos v5 Globals:Krb5Globals.html" {makefile-name}
	"{create-folder}" "{TargDir}"
	If (`Exists "{Targ}" | Count -l`)
		SetFile -a l "{Targ}"
	End
	Duplicate -y "{root-folder}mac:libraries:Kerberos v5 Globals:Krb5Globals.html" "{Targ}"
	SetFile -a l "{Targ}"