Changes to get platform-v8080 running again
[FUZIX.git] / Makefile
1 # Set this to the desired platform to build
2 #
3 # Useful values for general work
4 #
5 # amstradnc/nc100:      Amstrad NC100 (or emulator)
6 # amstradnc/nc200:      Amstrad NC200 (or emulator)
7 # coco2cart:    Tandy COCO2 or Dragon with 64K and IDE or SDC + cartridge flash
8 #               (or modified xroar)
9 # coco3:        Tandy COCO3 512K (or MAME)
10 # dragon-nx32:  Dragon 32/64 with Spinx 512K card (or modified xroar)
11 # msx2:         MSX2 with 128K or more and MegaFlashROM+SD interface
12 #               (or OpenMSX suitably configured)
13 # mtx:          Memotech MTX512 with SDX (or MEMU emulator)
14 # multicomp09:  Extended multicomp 6809
15 # n8vem-mark4:  RBC/N8VEM Retrobrew Z180 board
16 # p112:         DX Designs P112
17 # rc2014:       RC2014 with 512K RAM/ROM and RTC
18 # rc2014-sbc64: RC2014 Z80SBC64 128K system and RTC
19 # rc2014-tiny:  RC2014 with 64K RAM, banked ROM and RTC
20 # sam:          Sam Coupe
21 # sbcv2:        RBC/N8VEM SBC v2
22 # sc108:        Small Computer Central SC108 and SC114 systems
23 # socz80:       Will Sowerbutt's FPGA SocZ80 or extended version
24 # tc2068:       Timex TC2068/TS2068 with DivIDE/DivMMC disk interface
25 # tiny68k:      Bill Shen's Tiny68K
26 # trs80:        TRS80 Model 4/4D/4P with 128K RAM (or some other mappers)
27 # trs80m1:      TRS80 Model I/III with suitable banker (also clones)
28 # ubee:         Microbee
29 # v8080:        8080 development using Z80Pack
30 # z80pack:      Z80Pack virtual Z80 platform
31 # zeta-v2:      Zeta v2 retrobrew SBC (for Zeta V1 see sbcv2)
32 # zx+3:         ZX Spectrum +3
33 # zxdiv:        ZX Spectrum 128K with DivIDE/DivMMC interface
34 #
35 # Virtual platforms for in progress development work
36 #
37 # v65:          Virtual platform for 6502 development (dead)
38 # v65c816:      Virtual platform for 65c816 development
39 # v68:          Virtual platform for 68000 development
40 # v85:          Virtual platform for 8085 development
41
42 TARGET=z80pack
43
44 # Get the CPU type
45 include Kernel/platform-$(TARGET)/target.mk
46
47 ifeq ($(USERCPU),)
48         USERCPU = $(CPU)
49 endif
50
51 # FIXME: we should make it possible to do things entirely without /opt/fcc
52 PATH := /opt/fcc/bin:$(PATH)
53
54 FUZIX_ROOT = $(shell pwd)
55
56 # TARGET is what we are building
57 # CPU is the CPU type for the kernel
58 # USERCPU is the CPU type for userspace and eventually may be different
59 # (eg for 65c816 with 6502 user)
60 export TARGET CPU USERCPU PATH FUZIX_ROOT
61
62 # FUZIX_CCOPTS is the global CC optimization level
63 ifeq ($(FUZIX_CCOPTS),)
64         FUZIX_CCOPTS = -O2
65 endif
66 export FUZIX_CCOPTS
67
68 all: stand ltools libs apps kernel
69
70 stand:
71         +(cd Standalone; $(MAKE))
72
73 ltools:
74         +(cd Library; $(MAKE); $(MAKE) install)
75
76 libs: ltools
77         +(cd Library/libs; $(MAKE) -f Makefile.$(USERCPU); \
78                 $(MAKE) -f Makefile.$(USERCPU) install)
79
80 apps: libs
81         +(cd Applications; $(MAKE))
82
83 kernel: ltools
84         +(cd Kernel; $(MAKE))
85
86 kclean:
87         +(cd Kernel; $(MAKE) clean)
88
89 clean:
90         +(cd Standalone; $(MAKE) clean)
91         +(cd Library/libs; $(MAKE) -f Makefile.$(USERCPU) clean)
92         +(cd Library; $(MAKE) clean)
93         +(cd Kernel; $(MAKE) clean)
94         +(cd Applications; $(MAKE) clean)