1 include $(SRCDIR)/config/aros.cfg
4 USELIBS := hiddstubs amiga arossupport autoinit libinit gcc1 stdc.static
5 #USELIBS := arossupport rom autoinit libinit gcc1
6 LIBS := $(addprefix -l,$(USELIBS))
7 DEPLIBS := $(addprefix $(AROS_LIB)/lib,$(addsuffix .a,$(USELIBS)))
9 KLIBS := exec aros #dos graphics utility intuition keymap \
10 #mathieeesingbas expansion oop layers workbench cybergraphics
12 KDEVS := #timer input keyboard console
13 KHNDLRS := #con nil ram
15 KRSRCS := #battclock misc
17 KOBJS := $(addprefix $(KOBJSDIR)/,$(addsuffix _library.o ,$(KLIBS) )) \
18 $(addprefix $(KOBJSDIR)/,$(addsuffix _device.o ,$(KDEVS) )) \
19 $(addprefix $(KOBJSDIR)/,$(addsuffix _handler.o ,$(KHNDLRS))) \
20 $(addprefix $(KOBJSDIR)/,$(addsuffix _hidd.o ,$(KHIDDS) )) \
21 $(addprefix $(KOBJSDIR)/,$(addsuffix _resource.o,$(KRSRCS) )) \
22 $(addprefix $(KOBJSDIR)/,$(addsuffix _driver.o ,$(KDRVRS) ))
24 #MM kernel-link-mac-m68k : setup-mac-m68k
25 kernel-link-mac-m68k : $(AROSDIR)/aros-mac-m68k $(AROSDIR)/aros.elf $(AROSDIR)/aros_stripped.elf $(AROSDIR)/aros_floppy.img
27 $(AROSDIR)/aros-mac-m68k : $(OBJS) $(DEPLIBS)
28 @$(ECHO) Linking $@...
29 $(CC) $(KOBJS) -ffreestanding -nostartfiles -nostdlib -o $@ -L$(AROS_LIB) $(LIBS) -nostdlib
31 $(AROSDIR)/aros.elf : entrycode.o $(AROSDIR)/aros-mac-m68k
32 @$(ECHO) Linking executable $@...
33 m68k-linux-ld -e hardware_reset_init_1 -Ttext 0x1000 -Map $(AROSDIR)/aros.map -o $@ $^
35 $(AROSDIR)/aros_stripped.elf : $(AROSDIR)/aros.elf
36 @$(ECHO) Striping to $@...
37 $(TARGET_STRIP) -d -o $@ $^
39 $(AROSDIR)/aros_floppy.img : $(AROSDIR)/aros_stripped.elf
40 @$(ECHO) Making floppy image
41 emile-install -f /lib/emile/first_floppy -s /lib/emile/m68k-second_floppy -k $^ $@
42 # @$(ECHO) "Generating $(AROSDIR)/aros.rom..."
43 # @$(OBJCOPY) -O binary $@ $(AROSDIR)/aros.rom -v -S --pad-to=0x100000
45 #rom-pp-m68k: clean aros.rom
47 entrycode.o : entrycode.s
48 @$(ECHO) Assembling $^...
52 # @$(ECHO) "Generating $@..."
53 # @$(OBJCOPY) -O binary $^ $@ -v -S --pad-to=0x10d00000
54 # @$(MKDIR) $(HOME)/.xcopilot
55 # @$(RM) $(HOME)/.xcopilot/aros.rom
56 # @$(CP) $@ $(HOME)/.xcopilot/aros.rom
59 # $(RM) *.o aros.rom aros_rom *.s ~/.xcopilot/aros.rom