Prepare new maemo release
[maemo-rb.git] / rbutil / mkrk27boot / Makefile
blobfa215b1bde19bd592f5fa96eabbdcbc633b684f8
1 # __________ __ ___.
2 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
3 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6 # \/ \/ \/ \/ \/
7 # $Id$
10 FIRMWARE = ../../firmware/
12 DRIVERS = $(FIRMWARE)drivers/
13 EXPORT = $(FIRMWARE)export/
15 BUILDDATE=$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
16 INCLUDE = -I$(EXPORT) -I$(FIRMWARE)include -I$(FIRMWARE)target/hosted -I$(FIRMWARE)target/hosted/sdl
17 DEFINES = -DTEST_FAT -DDISK_WRITE -DHAVE_FAT16SUPPORT -D__PCTOOL__
19 SIM_FLAGS = -Wall -g -std=gnu99 -Wno-pointer-sign $(DEFINES) $(BUILDDATE) -I. $(INCLUDE) -I$(FIRMWARE)/libc/include
20 FLAGS = -Wall -g -std=gnu99 -Wno-pointer-sign $(DEFINES) -I. $(INCLUDE)
22 OUTPUT = mkrk27boot
25 # inputs
26 LIBSOURCES := $(DRIVERS)fat.c $(FIRMWARE)libc/ctype.c $(FIRMWARE)libc/strtok.c \
27 $(FIRWARE)libc/errno.c $(FIRMWARE)common/strlcpy.c $(FIRMWARE)common/unicode.c \
28 $(FIRMWARE)common/file.c $(FIRMWARE)common/dir_uncached.c $(FIRMWARE)common/disk.c ata-sim.c mkrk27boot.c
30 SOURCES := $(LIBSOURCES) main.c
32 include ../libtools.make
34 define sim_compile
35 @echo CC $<
36 $(SILENT)mkdir -p $(dir $@)
37 $(SILENT)$(CROSS)$(CC) $(SIM_FLAGS) -c -o $@ $<
38 endef
40 define compile
41 @echo CC $<
42 $(SILENT)mkdir -p $(dir $@)
43 $(SILENT)$(CROSS)$(CC) $(FLAGS) -c -o $@ $<
44 endef
46 $(OBJDIR)fat.o: $(DRIVERS)fat.c $(EXPORT)fat.h $(EXPORT)ata.h autoconf.h
47 $(sim_compile)
49 $(OBJDIR)ctype.o: $(FIRMWARE)libc/ctype.c autoconf.h
50 $(sim_compile)
52 $(OBJDIR)strtok.o: $(FIRMWARE)libc/strtok.c $(FIRMWARE)libc/include/string.h autoconf.h
53 $(sim_compile)
55 $(OBJDIR)errno.o: $(FIRMWARE)libc/errno.c $(FIRMWARE)libc/include/errno.h autoconf.h
56 $(sim_compile)
58 $(OBJDIR)disk.o: $(FIRMWARE)common/disk.c autoconf.h
59 $(sim_compile)
61 $(OBJDIR)dir_uncached.o: $(FIRMWARE)common/dir_uncached.c autoconf.h
62 $(sim_compile)
64 $(OBJDIR)file.o: $(FIRMWARE)common/file.c $(FIRMWARE)/include/file.h autoconf.h
65 $(sim_compile)
67 $(OBJDIR)unicode.o: $(FIRMWARE)common/unicode.c autoconf.h
68 $(sim_compile)
70 $(OBJDIR)strlcpy.o: $(FIRMWARE)common/strlcpy.c autoconf.h
71 $(sim_compile)
73 $(OBJDIR)ata-sim.o: ata-sim.c $(EXPORT)ata.h autoconf.h
74 $(compile)
76 $(OBJDIR)mkrk27boot.o: mkrk27boot.c mkrk27boot.h autoconf.h
77 $(compile)