-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathmakefile
1711 lines (1382 loc) · 48.7 KB
/
makefile
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
#-----------------------------------------------------------------------------
# Warning: "@@@" in comment = Work here to be done!
#-----------------------------------------------------------------------------
#
# TO DO:
#
# Still to have generic makefiles written:
#
# Bart: ioproc/iserver
# Bart: cmds/games
# bcpl - compiler/interpreter
# fortran
# X11
# gnu utilities - *LOTS of WORK*
# other pd stuff - *LOTS of WORK*
# Fortran - wait for norcroft version?
# PC Graphics - msgfx microsoft graphics library + inc in master make
# Paul: generic makefile for ncc/ARM
# Martyn: masterdisks - tar get to create a set of master disks for
# this level in /HeliosRoot/MasterDisks/disk1, etc.
# Add a public domain c pre-processor (cpp) to hostutils directory.
# This will then be used by the release system.
#
# Check:
# make clean under helios - env size problem (to be fixed in 1.3?)
#
# Change all makefiles to use DFLT.mak and RSRC capability:
# All makefiles to include DFLT.mak and HVPATH
#
# Write doc defining the steps to be taken at each release:
# clean/make/test/debug/fix/srctar/check make/freeze/masterdisks+srctar
#
# Document the Helios release system in this makefile
#
# Other than that...
#
#-----------------------------------------------------------------------------
# Helios Generic Make System - Top Level Makefile - Make Entire Helios World
#-----------------------------------------------------------------------------
#
# File: /HSRC/makefile
#
# These are host/processor independent rules to make the entire Helios
# system. It does this by executing other makefiles in individual component
# directories.
#
# You should only alter this makefile by using "ifeq ($(HPROC),YYY)"
# or "ifeq ($(HHOST),YYY)" clauses for a specific processor/host.
#
# Note that unlike all other makefiles in the Helios Generic make system,
# This makefile is executed in the Helios source root directory and not
# a processor specific directory.
#
# For more info consult "/HSRC/oemdocs/makesystem".
#
#
# SccsId: %W% %G%
# RcsId: $Id: makefile,v 1.141 1994/05/16 10:33:35 nickc Exp $
# (C) Copyright 1990 Perihelion Software
#
# WARNING: assumes you are using GNUmake.
#-----------------------------------------------------------------------------
#
#
# BASIC TARGETS:
#
# default: (if no target specified) makes the entire Helios system
# hostutil: makes the utilities to make Helios on the host system
# install: makes host utilities and then uses them to make Helios
#
#
# INDIVIDUAL TARGETS:
#
# Nucleus: / Nuc: build just the Helios nucleus
# MkDefs: make all .def library definition files
# Linklibs: make link libraries c.lib and helios.lib
# LibHdrs: both of the above
# ScanLibs: make all of the scan libraries
#
#
# All the Library and Command items can be made individually as well:
#
# Libraries: makes all the libraries:
# Nucleus, Kernel, Util, Fault, Fplib, Posix,
# all Scanlibs, etc
#
# Commands: makes following:
# Com, Ammp, Link, Asm, Make, GMake, Emacs,
# Shell, Ncc, Tar, etc
#
#
# RELEASE SYSTEM: @@@ Document!
#
# TestRelease:
# SaRelease:
# TarRelease:
# CopyRelease:
# List:
#
#
# CLEANUP FACILITIES:
#
# clean: removes all object and intermediate Helios system files
# hostclean: removes all object and intermediate host utility files
# binclean: removes all production binary programs and libraries
# realclean: combines the three previous targets
# ultraclean: all the other cleans + rcsclean
# quickclean: just kernel:nucleus:util:fault:posix:clib:shell:cmd/com
# nucclean: just kernel:nucleus:util
#
#
# BACKUP/SRC DELIVERY FACILITIES:
#
# srctar: Intelligent tar backup of makefile defined sources
# gettar: Get contents of tar backup
# tsttar: Check consistency of tar backup
#
# tarbakall: tar backup Helios source, rcs and binaries
#
#
#-----------------------------------------------------------------------------
# Reminders about make:
#
# <tab> - "cmd" = ignore exit status
# <tab> @ "cmd" = dont print command
# <tab> cd dir; "cmd" = cd and other command must be on same line if
# command is to be executed in that dir.
#
# Consult GNU Make manual for more info.
#-----------------------------------------------------------------------------
# The variables HPROC, HHOST, HSRC, and HPROD should already be set by
# your make script or environment, if not then get local defaults from
# $(HSRC)/makeinc/DFLT.mak. Note that the following pathname cannot use $(HSRC).
ifndef HPROC
include makeinc/DFLT.mak
endif
ifndef HLICENSEE
Stop the make!
You have not defined who you are. I do not know what parts of Helios
to build. Please check your make script (look in /hsrc/makeinc) or DFLT.mak
file.
endif
include $(HSRC)/makeinc/$(HHOST).mak # Default host system variables
# note what targets are phoney and not actual file targets
.PHONY: default install Mess1 EndMess1 MakeProdDir \
TestRelease SaRelease TarRelease CopyRelease List \
clean hostclean binclean realclean ultraclean quickclean nucclean \
HostStartM HostEndM HostC HostIOS HostAmpp HostLink HostAsm \
HostMisc hostutil HostUtil \
LibHdrs MkDefs Linklibs \
nuc2 nuc Servers Nucleus Network romsys \
Fault Kernel Util Posix Clib Fplib \
PatchLib Abclib \
Scanlibs Bsd Termcap Curses MsWin \
Asm Shell Com Link Ampp Emacs Make GMake Tar Cdl \
Debugger Tcpip Hfs Help Fortran Bcpl Public Gnu \
srctar gettar tsttar tarbakall makeltree \
rcsunfreeze rcsfreeze rcslevel rcsclean rcscheck rcsreport
# AxM: removed Demos
#-----------------------------------------------------------------------------
# Define what part of Helios to build for different licensee's
#
# Lists of source directories for use with clean, rcs and backup targets:
# Std source components:
NUCLEUS := text fault kernel nucleus nucleus/syslib util posix
NETWORK := network
NETPKGS :=
ifndef HSINGLEPROC
NETPKGS := $(NETPKGS) network/packages/farmlib network/packages/tftests \
network/packages/hwtests1
endif
LIBRARIES := cmds/cc/clib fplib
#ifeq ($(HLICENSEE), ABC)
# LIBRARIES := $(LIBRARIES) abclib/patchlib abclib
#endif
SCANLIBS := scanlibs scanlibs/bsd scanlibs/termcap scanlibs/curses
ifeq ($(HPROC),TRAN)
SCANLIBS := $(SCANLIBS) scanlibs/vectlib
endif
ifeq ($(HPROC),C40)
SCANLIBS := $(SCANLIBS) scanlibs/vectlib scanlibs/IEEE64
endif
MSWIN := ioproc/mswin/lib
SERVERS := servers servers/common servers/servtask \
servers/ttyserv servers/ttyserv/devs servers/ttyserv/ttyserv \
servers/lock servers/include servers/logger servers/familiar
ifeq ($(HLICENSEE), ABC)
SERVERS := $(SERVERS) servers/serial servers/codec servers/fdc \
servers/helios servers/ramdisk servers/romdisk \
servers/keyboard
endif
COMMANDS := cmds/support cmds/shell cmds/com cmds/textutil cmds/emacs \
cmds/emacs.311 cmds/ampp cmds/private cmds/cdl cmds/make \
cmds/cmdtests cmds/help
ifeq ($(HPROC),TRAN)
COMMANDS := $(COMMANDS) cmds/asm
else
COMMANDS := $(COMMANDS) cmds/linker cmds/assembler
endif
# AxM: Disabled Demos as they seem to be not Helios 1.3 conformant
#DEMOS := demos demos/hello demos/tut
#ifndef HSINGLEPROC
#DEMOS := $(DEMOS) demos/factor demos/lb \
# demos/pi demos/pi/pi_farm demos/pi/pi_fast demos/pi/pi_fort \
# demos/pi/pi_ring demos/servers demos/servers/keyboard \
# demos/rmlib demos/rmlib/mappipe demos/rmlib/buildrm \
# demos/rmlib/owners
# ifeq ($(HPROC), TRAN)
# DEMOS := $(DEMOS) demos/pi/pi_mix demos/pi/pi_mod2 \
# demos/pi/pi_pasc
# endif
#endif
PUBLIC := cmds/public cmds/public/spreadsh cmds/public/clock \
cmds/public/cookie cmds/public/yacc-1.4
# @@@ TODO generic makefiles: ed stevie rcs mille sed
GNU := cmds/gnu cmds/gnu/gmake cmds/gnu/tar
# @@@ TODO generic makefiles: cmds/gnu/bison cmds/gnu/diff \
# cmds/gnu/flex cmds/gnu/gawk cmds/gnu/gcc
GNUMISC := cmds/gnu/gmake/make-doc
HOSTUTIL := cmds/hostutil
# std source license:
# AxM: Removed $(DEMOS)
STDHELIOS := $(NUCLEUS) $(LIBRARIES) $(NETWORK) $(NETPKGS) $(SCANLIBS) \
$(SERVERS) $(MSWIN) $(COMMANDS) $(PUBLIC) $(GNU) \
$(HOSTUTIL)
# cut down nucleus only license (but includes fault+posix)
NUCHELIOS := $(NUCLEUS)
# Optional source licenses:
DEBUGGER := cmds/debugger cmds/debugger/lib
# TCP/IP
TCPCMDS := tcpip/cmds/ftp tcpip/cmds/ftpd tcpip/cmds/inetd \
tcpip/cmds/ping tcpip/cmds/rexecd tcpip/cmds/rlogin \
tcpip/cmds/rsh tcpip/cmds/rshd tcpip/cmds/telnet \
tcpip/cmds/telnetd tcpip/cmds/rcp tcpip/cmds/rlogind \
tcpip/cmds/binmail tcpip/cmds/sendmail tcpip/cmds/lpr
TCPDEVS := tcpip/devs/pc-ether
ifeq ($(HPROC),TRAN)
TCPDEVS := $(TCPDEVS) tcpip/devs/in-ether tcpip/devs/sq-ether \
tcpip/devs/ims-b431
endif
TCPIP := tcpip tcpip/cmds tcpip/helios tcpip/net \
tcpip/netinet tcpip/sys tcpip/rpc/rpc \
tcpip/nfs $(TCPCMDS) $(TCPDEVS)
# @@@ No generic makefiles for these items (yet):
TCPEXTRAS := tcpip/etc tcpip/h tcpip/include tcpip/lib tcpip/machine
# @@@ to be added:
# tcpip/netstat tcpip/rpc tcpip/test tcpip/cmds/test
# tcpip/cmds/tftp tcpip/cmds/route tcpip/devs/hpt02
# tcpip/laserp
# also, sort out mount.x and nfs_prot.x in NFS
# and the makefile for rpc/rpc
X11 := #@@@ to add: X
ifeq ($(HPROC),C40)
XBIN = $(HPROD)/../C40_X_Clients
endif
MSDOSFS := servers/msdosfs
HFSDEVS := filesys/devs/raw
ifeq ($(HPROC),TRAN)
HFSDEVS := $(HFSDEVS) filesys/devs/m212 filesys/devs/he1000 \
filesys/devs/msc filesys/devs/b422
endif
HFS := filesys filesys/fs filesys/cmds $(HFSDEVS)
ifeq ($(HPROC),TRAN)
CCOMPILER := cmds/cc/compiler sa # + standalone support
else
ifeq ($(HPROC),C40)
CCOMPILER := cmds/cc/ncc/cc350
else
CCOMPILER := cmds/cc/ncc/cc450
endif
endif
# Host Tools:
# Tools that are run on both the host and on Helios
# i.e. must have a generic makefile
HOSTTOOLS := cmds/hostutil cmds/ampp Embedded/esysbuild
ifeq ($(HPROC),C40)
HOSTTOOLS := $(HOSTTOOLS) cmds/public/yacc-1.4
else
HOSTTOOLS := $(HOSTTOOLS) cmds/ampp cmds/help
endif
ifeq ($(HPROC),TRAN)
HOSTTOOLS := $(HOSTTOOLS) cmds/asm cmds/com
else
HOSTTOOLS := $(HOSTTOOLS) cmds/linker cmds/assembler
endif
# HOSTTOOLS will include C Compiler if NCC_LIC is set (see below)
# IO Server sources:
# So we can give out individual parts i.e. PC to some, unix to others, etc
# @@@ The IO Server source delivery system has to be sorted out - will it
# have a generic style listing of the sources in each makefile - see Alan?
IOSSRC := ioproc/server
IOSMISC := ioproc/server/testprog
IOSMINI := ioproc/miniserv
IOSISERV := ioproc/iserver
IOSMSGFX := ioproc/msgfx
IOSUNIX := ioproc/server/sun
IOSPC := ioproc/server/ibm ioproc/pcmisc
# Extra places to check RCS files (subdirectories to these packages)
IOSRCSXTRA := ioproc/msgfx/xp ioproc/msgfx/msg
# The other bits (these don't have a generic makefile to note their filenames):
ALLINC := include include/sys include/net include/netinet include/arpa \
include/dev include/X11
OEMDOC := oemdoc/$(HPROC) oemdoc/slots oemdoc/filetypes oemdoc/makesystem
# extras for the TCPIP package
TCPMISC := servers/ttyserv/debug servers/ttyserv/window $(TCPEXTRAS)
# otherbits for the C compiler package
ifeq ($(HPROC),TRAN)
NCCMISC := cmds/cc/compiler/SUN4/include
endif
# Extra places to check RCS files (subdirectories to these packages)
NCCRCSXTRA := cmds/cc/compiler/SUN4/include/sys
# extras for the helios filesystem
HFSMISC := filesys/msdos
# if you have a source std licence you also get:
STDMISC := $(GNUMISC)
# if you have any source licence you get:
FREEMISC := makeinc $(OEMDOC)
# Extra places to check RCS files (subdirectories to these packages)
FREERCSXTRA := makeinc/template
# Odd bits in root directory
ODDFILES := makefile
# Who has licenses for what:
# @@@ Should also define the processor versions they have licenses for
ifeq ($(HLICENSEE), PERIHELION) # The lot!
# These define what parts of Helios will be built/cleaned/tar'ed/rcs'ed
SRC_LIC = TRUE
NCC_LIC = TRUE
HFS_LIC = TRUE
MSDOS_LIC = TRUE
DEBUG_LIC = TRUE
TCPIP_LIC = TRUE
IOS_LIC = TRUE
X_LIC = TRUE
# What hosts we support the Helios build on:
HOSTSUPPORT := SUN4 R140 HELIOSTRAN
# What hosts we support the IOServer on other than the PC:
HOSTIOSUPPORT := SUN4 R140 HELIOSTRAN
# ALL licensee specific code that we support:
XTRASRC := $(NETWORK)/telmat $(NETWORK)/parsytec $(NETWORK)/meiko
EXTRAIOS := $(IOSSRC)/telmat $(IOSSRC)/bleistein $(IOSSRC)/gemini \
$(IOSSRC)/st $(IOSSRC)/synergy $(IOSSRC)/windows \
$(IOSSRC)/helios $(IOSSRC)/parsy $(IOSMSGFX) $(IOSISERV)
endif
ifeq ($(HLICENSEE), PERIHELION_C40) # C40 system components
# These define what parts of Helios will be built/cleaned/tar'ed/rcs'ed
SRC_LIC = TRUE
NCC_LIC = TRUE
# HFS_LIC = TRUE
# MSDOS_LIC = TRUE
DEBUG_LIC = TRUE
TCPIP_LIC = TRUE
IOS_LIC = TRUE
# X_LIC = TRUE
# What hosts we support the Helios build on:
HOSTSUPPORT := SUN4 R140 HELIOSC40 HP
# What hosts we support the IOServer on other than the PC:
HOSTIOSUPPORT := SUN4 R140 SUN3
# ALL licensee specific code that we support:
XTRASRC :=
EXTRAIOS := $(IOSSRC)/windows # $(IOSSRC)/helios $(IOSMSGFX)
endif
ifeq ($(HLICENSEE), PERIHELION_ARM) # Helios-ARM system components
# These define what parts of Helios will be built/cleaned/tar'ed/rcs'ed
SRC_LIC = TRUE
NCC_LIC = TRUE
# HFS_LIC = TRUE
MSDOS_LIC = TRUE
# DEBUG_LIC = TRUE
# TCPIP_LIC = TRUE
IOS_LIC = TRUE
# X_LIC = TRUE
# What hosts we support the Helios build on:
HOSTSUPPORT := SUN4 R140 HP
# What hosts we support the IOServer on other than the PC:
HOSTIOSUPPORT := SUN4 R140 SUN3
# ALL licensee specific code that we support:
# XTRASRC :=
EXTRAIOS := $(IOSSRC)/windows # $(IOSSRC)/helios $(IOSMSGFX)
endif
ifeq ($(HLICENSEE), TELMAT)
SRC_LIC = TRUE
HFS_LIC = TRUE
MSDOS_LIC = TRUE
DEBUG_LIC = TRUE
TCPIP_LIC = TRUE
IOS_LIC = TRUE
X_LIC = TRUE
XTRASRC := $(NETWORK)/telmat
HOSTSUPPORT := SUN4 HELIOSTRAN
HOSTIOSUPPORT := SUN4
EXTRAIOS := $(IOSSRC)/telmat $(IOSSRC)/helios $(IOSSRC)/windows/winsrvr_exe
endif
ifeq ($(HLICENSEE), PARSYTEC)
SRC_LIC = TRUE
HFS_LIC = TRUE
DEBUG_LIC = TRUE
TCPIP_LIC = TRUE
IOS_LIC = TRUE
X_LIC = TRUE
XTRASRC := $(NETWORK)/parsytec
HOSTSUPPORT := SUN4 HELIOSTRAN
HOSTIOSUPPORT := SUN4
EXTRAIOS := $(IOSSRC)/parsy
endif
ifeq ($(HLICENSEE), ETRI)
SRC_LIC = TRUE
HFS_LIC = TRUE
DEBUG_LIC = TRUE
TCPIP_LIC = TRUE
IOS_LIC = TRUE
X_LIC = TRUE
XTRASRC :=
HOSTSUPPORT := SUN4 HELIOSTRAN
HOSTIOSUPPORT := SUN4
EXTRAIOS :=
endif
ifeq ($(HLICENSEE), CDAC)
SRC_LIC = TRUE
IOS_LIC = TRUE
HOSTSUPPORT := SUN4 HELIOSTRAN
HOSTIOSUPPORT := SUN4
XTRASRC :=
XTRAIOS :=
endif
ifeq ($(HLICENSEE), INMOS)
NCC_LIC = TRUE
HOSTSUPPORT := SUN4 HELIOSTRAN
HOSTIOSUPPORT := SUN4
XTRASRC :=
XTRAIOS :=
endif
ifeq ($(HLICENSEE),ABC)
SRC_LIC = TRUE
MSDOS_LIC = TRUE
NCC_LIC = TRUE
IOS_LIC = TRUE
HOSTSUPPORT := R140
HOSTIOSUPPORT := R140
XTRASRC :=
XTRAIOS :=
endif
ifeq ($(HLICENSEE), IGM)
NUC_LIC = TRUE
HFS_LIC = TRUE
MSDOS_LIC = TRUE
IOS_LIC = TRUE
HOSTSUPPORT := SUN4 HELIOSTRAN
HOSTIOSUPPORT := SUN4
XTRASRC :=
XTRAIOS :=
endif
ifeq ($(HLICENSEE), HPLABS)
NUC_LIC = TRUE
IOS_LIC = TRUE
HOSTSUPPORT := SUN4 HELIOSTRAN
HOSTIOSUPPORT := SUN4
XTRASRC :=
XTRAIOS :=
endif
ifeq ($(HLICENSEE), CSIR)
HFS_LIC = TRUE
IOS_LIC = TRUE
HOSTSUPPORT := SUN4 HELIOSTRAN
HOSTIOSUPPORT := SUN4
XTRASRC :=
XTRAIOS :=
endif
ifeq ($(HLICENSEE), ALENIA)
SRC_LIC = TRUE
IOS_LIC = TRUE
HOSTSUPPORT := HELIOSC40
HOSTIOSUPPORT := SUN4
XTRAIOS := $(IOSSRC)/unix/hepc $(IOSSRC)/unix/nidio $(IOSSRC)/rs6000
endif
# Define what parts of Helios will be targeted in rcs, clean and tar rules
ALLSRC := $(XTRASRC)
ALLMISC := $(FREEMISC)
ifdef SRC_LIC
ALLSRC := $(ALLSRC) $(STDHELIOS)
ALLMISC := $(ALLMISC) $(STDMISC) $(foreach MC, $(HOSTSUPPORT), $(HOSTUTIL)/$(MC)/makefile)
endif
ifdef DEBUG_LIC
ALLSRC := $(ALLSRC) $(DEBUGGER)
endif
ifdef NUC_LIC
SERVERS := servers/servtask
ALLSRC := $(ALLSRC) $(NUCLEUS) fplib $(HOSTUTIL) cmds/support \
$(SERVERS)
# ALLMISC := $(ALLMISC) $(foreach MC, $(HOSTSUPPORT), $(HOSTUTIL)/$(MC))
endif
ifdef MSDOS_LIC
ALLSRC := $(ALLSRC) $(MSDOSFS)
endif
ifdef HFS_LIC
ALLSRC := $(ALLSRC) $(HFS)
ALLMISC := $(ALLMISC) $(HFSMISC)
endif
ifdef TCPIP_LIC
ALLSRC := $(ALLSRC) $(TCPIP)
ALLMISC := $(ALLMISC) $(TCPMISC)
endif
ifdef X_LIC
ALLSRC := $(ALLSRC) $(X)
endif
ifdef NCC_LIC
ALLSRC := $(ALLSRC) $(CCOMPILER)
ALLMISC := $(ALLMISC) $(NCCMISC)
ifeq ($(HPROC),TRAN)
HOSTTOOLS := $(HOSTTOOLS) cmds/cc/compiler
else
ifeq ($(HPROC),C40)
HOSTTOOLS := $(HOSTTOOLS) cmds/cc/ncc/cc350
else
ifeq ($(HPROC),ARM)
HOSTTOOLS := $(HOSTTOOLS) cmds/cc/ncc/cc450
endif
endif
endif
endif
ifdef IOS_LIC
STDIOS := $(IOSSRC)
ALLIOS := $(XTRAIOS) $(IOSMISC) $(IOSMINI) $(IOSUNIX) $(IOSPC)
# Add extra ioserver versions for the supported hosts
ALLIOS := $(ALLIOS) $(foreach HST, $(HOSTIOSUPPORT), $(STDIOS)/$(HST) )
endif
# Define the host tool support directories
ALLHOST := $(foreach MC, $(HOSTSUPPORT), $(foreach HDIR, $(HOSTTOOLS), $(HDIR)/$(MC)))
#-----------------------------------------------------------------------------
# default rule to MAKE ENTIRE HELIOS SYSTEM
#
ifdef NUC_LIC
MAINTARGETS := LibHdrs Nucleus
endif
ifdef SRC_LIC
MAINTARGETS := LibHdrs Nucleus Libraries Network MsWin Commands Gnu Public
# AxM: removed Demos
ifeq ($(HLICENSEE), ABC)
MAINTARGETS := $(MAINTARGETS) romsys
endif
endif
ifdef DEBUG_LIC
MAINTARGETS := $(MAINTARGETS) Debugger
endif
ifdef TCPIP_LIC
MAINTARGETS := $(MAINTARGETS) Tcpip
endif
default: Mess1 $(MAINTARGETS) EndMess1
# Make entire Helios system from scratch
install: MakeProdDir HostUtil default
#-----------------------------------------------------------------------------
# Start and End Messages
Mess1:
@echo " [[[[[ Making entire **Helios/$(HPROC)** world ]]]]]"
EndMess1:
@echo " [[[[[ Entire **Helios/$(HPROC)** world made successfully ]]]]]"
#-----------------------------------------------------------------------------
# Shorthand
nuc: LibHdrs Kernel Util Nuc
hostutil: HostUtil
#-----------------------------------------------------------------------------
# Make production directories
# @@@ Should also copy cshrc, loginrc, initrc, motd, etc?
MakeProdDir:
@ test -d $(HPROD) || mkdir $(HPROD)
@ test -d $(HPROD)/tmp || mkdir $(HPROD)/tmp
-touch $(HPROD)/tmp/dummy
@ test -d $(HPROD)/etc || mkdir $(HPROD)/etc
ifeq ($(HHOST),SUN4)
-rm $(HPROD)/etc0 $(HPROD)/etc1 $(HPROD)/tmp0 $(HPROD)/tmp1
-ln -s $(HPROD)/etc $(HPROD)/etc0
-ln -s $(HPROD)/etc $(HPROD)/etc1
-ln -s $(HPROD)/tmp $(HPROD)/tmp0
-ln -s $(HPROD)/tmp $(HPROD)/tmp1
endif
@ test -d $(HPROD)/lib || mkdir $(HPROD)/lib
@ test -d $(HPROD)/bin || mkdir $(HPROD)/bin
@ test -d $(HPROD)/bin/private || mkdir $(HPROD)/bin/private
@ test -d $(HPROD)/system || mkdir $(HPROD)/system
@ test -d $(HPROD)/users || mkdir $(HPROD)/users
@ test -d $(HPROD)/users/root || mkdir $(HPROD)/users/root
@ test -d $(HPROD)/users/shutdown || mkdir $(HPROD)/users/shutdown
@ test -d $(HPROD)/users/guest || mkdir $(HPROD)/users/guest
@ test -d $(HPROD)/users/guest/examples || mkdir $(HPROD)/users/guest/examples
@ test -d $(HPROD)/users/guest/examples/servers || mkdir $(HPROD)/users/guest/examples/servers
@ test -d $(HPROD)/local || mkdir $(HPROD)/local
@ test -d $(HPROD)/local/lib || mkdir $(HPROD)/local/lib
@ test -d $(HPROD)/local/lib/tex || mkdir $(HPROD)/local/lib/tex
@ test -d $(HPROD)/local/bin || mkdir $(HPROD)/local/bin
@ test -d $(HPROD)/local/bin/X11 || mkdir $(HPROD)/local/bin/X11
@ test -d $(HPROD)/local/games || mkdir $(HPROD)/local/games
@ test -d $(HPROD)/local/src || mkdir $(HPROD)/local/src
@ test -d $(HPROD)/local/src/hfs || mkdir $(HPROD)/local/src/hfs
@ test -d $(HPROD)/local/src/hfs/b422 || mkdir $(HPROD)/local/src/hfs/b422
@ test -d $(HPROD)/local/src/hfs/he1000 || mkdir $(HPROD)/local/src/hfs/he1000
@ test -d $(HPROD)/local/src/hfs/m212 || mkdir $(HPROD)/local/src/hfs/m212
@ test -d $(HPROD)/local/src/hfs/msc || mkdir $(HPROD)/local/src/hfs/msc
@ test -d $(HPROD)/local/src/hfs/raw || mkdir $(HPROD)/local/src/hfs/raw
@ test -d $(HPROD)/local/tcpip || mkdir $(HPROD)/local/tcpip
@ test -d $(HPROD)/local/tcpip/example || mkdir $(HPROD)/local/tcpip/example
@ test -d $(HPROD)/local/tcpip/pc-ether || mkdir $(HPROD)/local/tcpip/pc-ether
ifeq ($(HHOST),HELIOSTRAN)
@ test -d $(HPROD)/include || mkdir $(HPROD)/include
-cp -r $(HSRC)/include/* $(HPROD)/include
else
ifeq ($(HHOST),HELIOSC40)
test -d $(HPROD)/include || mkdir $(HPROD)/include
-cp -r $(HSRC)/include/* $(HPROD)/include
else
@ test -L $(HPROD)/include || ln -s $(HSRC)/include $(HPROD)
@ test -L $(HPROD)/bin/X11 || ln -s $(XBIN)/bin/X11 $(HPROD)/bin
@ test -L $(HPROD)/lib/X11 || ln -s $(XBIN)/lib/X11 $(HPROD)/lib
endif
endif
-cp $(HSRC)/ioproc/server/ibm/server_exe/server.exe $(HPROD)
-cp $(HSRC)/ioproc/server/windows/winsrvr_exe/winsrvr.exe $(HPROD)
$(MAKE) -C text install
#-----------------------------------------------------------------------------
# Software Release System
ifeq ($(HHOST),HELIOSTRAN)
CPP = /helios/lib/cpp#
endif
TestRelease :
$(CPP) -D$(OPTS) -DHELIOS=$(HPROD) -DHPROC=$(HPROC) -DSYSTEM <Files >test.rel
ifeq (HELIOS,$(findstring HELIOS,$(HHOST)))
chmod 0777 test.rel
./test.rel
else
chmod 0777 test.rel
./test.rel
endif
TarRelease :
$(CPP) -D$(OPTS) -DTAR -DHELIOS=$(HPROD) -DTARFILE=helios.tar \
-DHPROC=$(HPROC) -DSYSTEM <Files >tar.rel
ifeq (HELIOS,$(findstring HELIOS,$(HHOST)))
chmod 0777 tar.rel
./tar.rel
else
chmod 0777 tar.rel
./tar.rel
endif
SaRelease :
$(CPP) -DTAR -DHELIOS=$(HPROD) -DTARFILE=sa.tar \
-DHPROC=$(HPROC) -DSA <Files >tar.rel
ifeq (HELIOS,$(findstring HELIOS,$(HHOST)))
chmod 0777 tar.rel
./tar.rel
else
chmod 0777 tar.rel
./tar.rel
endif
List :
$(CPP) -D$(OPTS) -DLIST -DHELIOS=$(HPROD) \
-DHPROC=$(HPROC) -DSYSTEM <Files >list.rel
ifeq (HELIOS,$(findstring HELIOS,$(HHOST)))
chmod 0777 list.rel
./list.rel
else
chmod 0777 list.rel
./list.rel
endif
CopyRelease :
$(CPP) -D$(OPTS) -DCOPY -DHELIOS=$(HPROD) -DRELDIR=$(RELDIR) \
-DHPROC=$(HPROC) -DSYSTEM <Files >cp.rel
ifeq (HELIOS,$(findstring HELIOS,$(HHOST)))
chmod 0777 cp.rel
./cp.rel
else
chmod 0777 cp.rel
./cp.rel
endif
#-----------------------------------------------------------------------------
# Host Utility programs:
ifdef NUC_LIC
HOSTTARGETS := HostMisc HostSysbuild
endif
ifdef SRC_LIC
ifeq ($(HPROC),TRAN)
HOSTTARGETS := HostMisc HostAmpp HostAsm HostIOS HostHelp HostSysbuild
else
HOSTTARGETS := HostMisc HostAmpp HostYacc HostAsm HostIOS HostHelp HostLink HostSysbuild
endif
endif
ifdef NCC_LIC
HOSTTARGETS := $(HOSTTARGETS) HostC
endif
HostStartM:
@echo " [[[[[ Making $(HHOST) HOST utilities for Helios/$(HPROC) ]]]]]"
HostEndM:
@echo " [[[[[ Successfully made $(HHOST) HOST utilities for Helios/$(HPROC) ]]]]]"
HostMisc:
@echo " [[[ Making HOST misc utils ]]]"
$(MAKE) -C cmds/hostutil/$(HHOST) install
HostSysbuild:
@echo " [[[ Making HOST Sysbuild ]]]"
$(MAKE) -C Embedded/esysbuild/$(HHOST) install
HostAmpp:
@echo " [[[ Making HOST ampp ]]]"
$(MAKE) -C cmds/ampp/$(HHOST) install
HostYacc:
ifeq ($(HHOST),HELIOSTRAN)
@echo " [[[ Skipping HOST yacc ]]]"
else
@echo " [[[ Making HOST yacc ]]]"
$(MAKE) -C cmds/public/yacc-1.4/$(HHOST) install
endif
HostLink:
ifeq ($(HHOST),HELIOSC40)
@echo " [[[ Skipping HOST linker ]]]"
else
@echo " [[[ Making HOST linker ]]]"
$(MAKE) -C cmds/linker/$(HHOST) install
endif
HostIOS:
ifeq ($(HHOST),HP)
@echo " [[[ No HOST IO Server for HPUX ]]]"
else
ifeq ($(HHOST),HELIOSTRAN)
@echo " [[[ Skipping HOST IO Server ]]]"
else
ifeq ($(HHOST),HELIOSC40)
@echo " [[[ Skipping HOST IO Server ]]]"
else
@echo " [[[ Making HOST IO Server ]]]"
$(MAKE) -C ioproc/server/$(HHOST) install
endif
endif
endif
HostAsm:
ifeq ($(HPROC),TRAN)
@echo " [[[ Making HOST Assembler ]]]"
$(MAKE) -C cmds/asm/$(HHOST) install
else
ifeq ($(HHOST),HELIOSC40)
@echo " [[[ Skipping HOST assembler ]]]"
else
@echo " [[[ Making HOST Assembler ]]]"
$(MAKE) -C cmds/assembler/$(HHOST) install
endif
endif
HostHelp:
ifeq ($(HHOST),HELIOSC40)
@echo " [[[ Skipping HOST help ]]]"
else
@echo " [[[ Making HOST Help ]]]"
$(MAKE) -C cmds/help/$(HHOST) install
endif
HostC:
@echo " [[[ Making HOST C Compiler ]]]"
ifeq ($(HPROC),TRAN)
$(MAKE) -C cmds/cc/compiler/$(HHOST) install
else
ifeq ($(HPROC),ARM)
$(MAKE) -C cmds/cc/ncc/cc450/$(HHOST) install
else
ifeq ($(HPROC),C40)
$(MAKE) -C cmds/cc/ncc/cc350/$(HHOST) install
else
@echo " [[[ @@@ Add rule to Make HOST C Compiler ]]]"
endif
endif
endif
HostUtil: HostStartM $(HOSTTARGETS) HostEndM
#-----------------------------------------------------------------------------
# Library definition files
LibHdrs: MkDefs Linklibs
@echo " [[[ Made library header files ]]]"
# Make all library definition and startup code files:
MkDefs:
@echo " [[[ Making library definition files ]]]"
$(MAKE) -C kernel/$(HPROC) installdef
$(MAKE) -C util/$(HPROC) installdef
$(MAKE) -C nucleus/$(HPROC) installdef
$(MAKE) -C fault/$(HPROC) installdef
$(MAKE) -C posix/$(HPROC) installdef
$(MAKE) -C fplib/$(HPROC) installdef
ifndef NUC_LIC
$(MAKE) -C cmds/cc/clib/$(HPROC) installdef
endif
ifeq ($(HLICENSEE),ABC)
$(MAKE) -C abclib/$(HPROC) installdef
$(MAKE) -C abclib/patchlib/$(HPROC) installdef
endif
# Create link library files
Linklibs:
@echo " [[[ Making shared link libraries ]]]"
ifeq ($(HPROC),TRAN) # use tokenised assembler
asm -p -o $(LIB)/helios.lib \
$(LIB)/kernel.def \
$(LIB)/syslib.def \
$(LIB)/util.def \
$(LIB)/servlib.def \
$(LIB)/fault.def \
$(LIB)/fplib.def \
$(LIB)/posix.def
ifndef NUC_LIC
asm -p -o $(LIB)/c.lib \
$(LIB)/clib.def \
$(LIB)/fpclib.def
endif
else
cat $(LIB)/kernel.def \
$(LIB)/syslib.def \
$(LIB)/util.def \
$(LIB)/servlib.def \
$(LIB)/fault.def \
$(LIB)/fplib.def \
$(LIB)/posix.def \
> $(LIB)/helios.lib
cat $(HPROD)/lib/clib.def \
> $(LIB)/c.lib
# note no fpclib
endif
#-----------------------------------------------------------------------------
# The Helios Nucleus
#
# System/Servlib libs, servers and system image
# Fault library made for codes.h, errno.h and signal.h
# Note libraries that are included in the nucleus as std.
PRENUC := Fault Kernel Util
ifeq ($(HLICENSEE),ABC)
# Most libraries are included in ABC's ROMed ARM nucleus
PRENUC := $(PRENUC) Abclib Posix Clib Fplib Patchlib
endif
# Build scanlibs before servers so that servers can use them
ifdef SRC_LIC
PRENUC := $(PRENUC) Scanlibs Servers