# Iris: micro-kernel for a capability-based operating system. # Makefile.am: build rules # Copyright 2009-2012 Bas Wijnen # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . AUTOMAKE_OPTIONS = subdir-objects foreign # Define some variables. OBJCOPY = $(host_alias)-objcopy SERIAL = /dev/ttyUSB0 junk = mdebug.abi32 reginfo comment pdr note.gnu.build-id objcopyflags = -S $(addprefix --remove-section=.,$(junk)) start_load = 0x80400000 load = 0x80000000 noinst_DATA = iris.raw noinst_PROGRAMS = iris.elf %.raw: %.elf $(OBJCOPY) $(objcopyflags) -Obinary $< $@ # Define boot_threads depending on selected mode. if UDC boot_threads = bootinit udc else if UNBRICK boot_threads = nand sdmmc usbmassstorage else boot_threads = sdmmc partition fat endif endif # Threadlist must be the last file on the line below. iris_sources = panic.cc data.cc alloc.cc memory.cc invoke.cc schedule.cc mips/interrupts.cc mips/arch.cc threadlist.S boot_sources = mips/init.cc mips/nanonote/board.cc headers = kernel.hh iris.hh devices.hh ui.hh keys.hh mips/arch.hh mips/nanonote/jz4740.hh mips/nanonote/board.hh mips/nand.hh iris_elf_CPPFLAGS = -O5 -fno-inline -I. -Imips -Imips/nanonote -Wa,-mips32 -DNANONOTE -DUSE_SERIAL iris_elf_CXXFLAGS = -Wno-unused-parameter -fno-strict-aliasing -fno-builtin -ggdb3 iris_elf_LDFLAGS = -Wl,--omagic -Wl,-Ttext -Wl,$(load) -nostdlib iris_elf_SOURCES = mips/entry.S ${iris_sources} mips/boot.S ${boot_sources} ${headers} program_sources = \ source/alarm.cc \ source/ball.cc \ source/boot.cc \ source/booter.cc \ source/bootinit.cc \ source/bsquare.cc \ source/buzzer.cc \ source/elfrun.cc \ source/fat.cc \ source/font.cc \ source/gpio.cc \ source/gui.cc \ source/init.cc \ source/lcd.cc \ source/metronome.cc \ source/nand.cc \ source/partition.cc \ source/rtc.cc \ source/sdmmc.cc \ source/test.cc \ source/udc.cc \ source/usbmassstorage.cc program_targets = \ fs/alarm.elf \ fs/ball.elf \ fs/boot.elf \ fs/booter.elf \ fs/bootinit.elf \ fs/bsquare.elf \ fs/buzzer.elf \ fs/elfrun.elf \ fs/fat.elf \ fs/font.elf \ fs/gpio.elf \ fs/gui.elf \ fs/init.elf \ fs/lcd.elf \ fs/metronome.elf \ fs/nand.elf \ fs/partition.elf \ fs/rtc.elf \ fs/sdmmc.elf \ fs/test.elf \ fs/udc.elf \ fs/usbmassstorage.elf noinst_PROGRAMS += $(program_targets) AM_CPPFLAGS = -O5 -fno-inline -I. -Imips -Imips/nanonote -Wa,-mips32 -DNANONOTE AM_CXXFLAGS = -Wno-unused-parameter -fno-strict-aliasing -fno-builtin -ggdb3 AM_LDFLAGS = -nostdlib BUILT_SOURCES = $(iris_sources) $(boot_sources) $(program_sources) $(headers) mips/nanonote/threadlist.S source/charset.data fs/font.dat fs/init.config threadlist.S: mkthreadlist Makefile $(addprefix fs/,$(addsuffix .elf,$(boot_threads))) $(top_srcdir)/$< $(boot_threads) > $@ PYPP = /usr/bin/pypp %.cc: %.ccp $(PYPP) --name $< < $< > $@ %.hh: %.hhp $(PYPP) --name $< < $< > $@ source/charset.data: source/charset $< > $@ fs/font.dat: courier-10+8+32.png makefont ./makefont $< > $@ fs/%: % ln -s ../$< $@ fs_alarm_elf_SOURCES = source/crt0.cc source/alarm.cc fs_ball_elf_SOURCES = source/crt0.cc source/ball.cc fs_boot_elf_SOURCES = source/crt0.cc source/boot.cc fs_booter_elf_SOURCES = source/crt0.cc source/booter.cc fs_bootinit_elf_SOURCES = source/crt0.cc source/bootinit.cc fs_bsquare_elf_SOURCES = source/crt0.cc source/bsquare.cc fs_buzzer_elf_SOURCES = source/crt0.cc source/buzzer.cc fs_elfrun_elf_SOURCES = source/crt0.cc source/elfrun.cc fs_fat_elf_SOURCES = source/crt0.cc source/fat.cc fs_font_elf_SOURCES = source/crt0.cc source/font.cc fs_gpio_elf_SOURCES = source/crt0.cc source/gpio.cc fs_gui_elf_SOURCES = source/crt0.cc source/gui.cc fs_init_elf_SOURCES = source/crt0.cc source/init.cc fs_lcd_elf_SOURCES = source/crt0.cc source/lcd.cc fs_metronome_elf_SOURCES = source/crt0.cc source/metronome.cc fs_nand_elf_SOURCES = source/crt0.cc source/nand.cc fs_partition_elf_SOURCES = source/crt0.cc source/partition.cc fs_rtc_elf_SOURCES = source/crt0.cc source/rtc.cc fs_sdmmc_elf_SOURCES = source/crt0.cc source/sdmmc.cc fs_test_elf_SOURCES = source/crt0.cc source/test.cc fs_udc_elf_SOURCES = source/crt0.cc source/udc.cc fs_usbmassstorage_elf_SOURCES = source/crt0.cc source/usbmassstorage.cc autoclean: maintainer-clean rm -rf aclocal.m4 configure depcomp fs install-sh iris.raw iris-sd.tar Makefile.in missing