2002-05-03 11:59:53 +00:00
|
|
|
FIRMWARE = ../..
|
2008-12-04 21:28:56 +00:00
|
|
|
|
|
|
|
export BUILDDATE=$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
|
|
|
|
export CPU=arm
|
|
|
|
export TARGET=-DIPOD_VIDEO
|
|
|
|
export TARGET_INC=-I$(FIRMWARE)/target/arm/ipod/video -I$(FIRMWARE)/target/arm/ipod -I$(FIRMWARE)/target/arm
|
|
|
|
|
2002-04-26 16:44:58 +00:00
|
|
|
DRIVERS = ../../drivers
|
2003-03-10 12:42:53 +00:00
|
|
|
EXPORT = ../../export
|
2002-04-26 16:44:58 +00:00
|
|
|
|
2011-02-28 10:48:58 +00:00
|
|
|
INCLUDE = -I$(EXPORT) -I$(FIRMWARE)/include
|
2005-04-18 14:16:35 +00:00
|
|
|
|
2011-02-28 10:48:58 +00:00
|
|
|
DEFINES = -DTEST_FAT -DDEBUG -DCRT_DISPLAY -DDISK_WRITE -DHAVE_FAT16SUPPORT -D__PCTOOL__
|
2002-10-15 14:36:52 +00:00
|
|
|
|
2011-02-28 10:48:58 +00:00
|
|
|
CFLAGS = -g -Wall -std=gnu99 -Wno-pointer-sign $(DEFINES) -I. $(INCLUDE) $(BUILDDATE) -I$(FIRMWARE)/libc/include
|
|
|
|
SIMFLAGS = -g -Wall -std=gnu99 -Wno-pointer-sign $(DEFINES) -I. $(INCLUDE)
|
2002-04-26 16:44:58 +00:00
|
|
|
|
|
|
|
TARGET = fat
|
|
|
|
|
2011-02-28 10:48:58 +00:00
|
|
|
all: $(TARGET)
|
2008-12-04 21:28:56 +00:00
|
|
|
|
2011-02-28 10:48:58 +00:00
|
|
|
$(TARGET): fat.o ata-sim.o main.o disk.o dir.o file.o ctype.o unicode.o strlcpy.o
|
2002-04-26 16:44:58 +00:00
|
|
|
gcc -g -o fat $+ -lfl
|
|
|
|
|
2003-03-10 12:42:53 +00:00
|
|
|
fat.o: $(DRIVERS)/fat.c $(EXPORT)/fat.h $(EXPORT)/ata.h
|
2011-02-28 10:48:58 +00:00
|
|
|
$(CC) $(CFLAGS) -c $< -o $@
|
2002-10-15 14:36:52 +00:00
|
|
|
|
2011-02-28 10:48:58 +00:00
|
|
|
ctype.o: $(FIRMWARE)/libc/ctype.c
|
2002-04-26 16:44:58 +00:00
|
|
|
$(CC) $(CFLAGS) -c $< -o $@
|
|
|
|
|
2002-05-03 11:59:53 +00:00
|
|
|
disk.o: $(FIRMWARE)/common/disk.c
|
|
|
|
$(CC) $(CFLAGS) -c $< -o $@
|
|
|
|
|
2011-02-28 10:48:58 +00:00
|
|
|
dir.o: $(FIRMWARE)/common/dir_uncached.c
|
2002-05-03 15:36:52 +00:00
|
|
|
$(CC) $(CFLAGS) -c $< -o $@
|
|
|
|
|
2002-05-07 16:01:53 +00:00
|
|
|
file.o: $(FIRMWARE)/common/file.c
|
|
|
|
$(CC) $(CFLAGS) -c $< -o $@
|
|
|
|
|
2011-02-28 10:48:58 +00:00
|
|
|
unicode.o: $(FIRMWARE)/common/unicode.c
|
|
|
|
$(CC) $(CFLAGS) -c $< -o $@
|
2002-04-26 16:44:58 +00:00
|
|
|
|
2011-02-28 10:48:58 +00:00
|
|
|
strlcpy.o: $(FIRMWARE)/common/strlcpy.c
|
|
|
|
$(CC) $(CFLAGS) -c $< -o $@
|
2003-03-10 12:42:53 +00:00
|
|
|
|
2011-02-28 10:48:58 +00:00
|
|
|
ata-sim.o: ata-sim.c $(EXPORT)/ata.h
|
|
|
|
$(CC) $(SIMFLAGS) -c $< -o $@
|
2003-03-10 12:42:53 +00:00
|
|
|
|
2011-02-28 10:48:58 +00:00
|
|
|
main.o: main.c $(EXPORT)/ata.h
|
2002-10-15 14:36:52 +00:00
|
|
|
$(CC) $(SIMFLAGS) -c $< -o $@
|
2002-04-26 16:44:58 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *.o $(TARGET)
|