2 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
3 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
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
)
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
36 $(SILENT
)mkdir
-p
$(dir $@
)
37 $(SILENT
)$(CROSS
)$(CC
) $(SIM_FLAGS
) -c
-o
$@
$<
42 $(SILENT
)mkdir
-p
$(dir $@
)
43 $(SILENT
)$(CROSS
)$(CC
) $(FLAGS
) -c
-o
$@
$<
46 $(OBJDIR
)fat.o
: $(DRIVERS
)fat.c
$(EXPORT
)fat.h
$(EXPORT
)ata.h autoconf.h
49 $(OBJDIR
)ctype.o
: $(FIRMWARE
)libc
/ctype.c autoconf.h
52 $(OBJDIR
)strtok.o
: $(FIRMWARE
)libc
/strtok.c
$(FIRMWARE
)libc
/include/string.h autoconf.h
55 $(OBJDIR
)errno.o
: $(FIRMWARE
)libc
/errno.c
$(FIRMWARE
)libc
/include/errno.h autoconf.h
58 $(OBJDIR
)disk.o
: $(FIRMWARE
)common
/disk.c autoconf.h
61 $(OBJDIR
)dir_uncached.o
: $(FIRMWARE
)common
/dir_uncached.c autoconf.h
64 $(OBJDIR
)file.o
: $(FIRMWARE
)common
/file.c
$(FIRMWARE
)/include/file.h autoconf.h
67 $(OBJDIR
)unicode.o
: $(FIRMWARE
)common
/unicode.c autoconf.h
70 $(OBJDIR
)strlcpy.o
: $(FIRMWARE
)common
/strlcpy.c autoconf.h
73 $(OBJDIR
)ata-sim.o
: ata-sim.c
$(EXPORT
)ata.h autoconf.h
76 $(OBJDIR
)mkrk27boot.o
: mkrk27boot.c mkrk27boot.h autoconf.h