3 export BUILDDATE
=$(shell date
-u
+'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
5 export TARGET
=-DIPOD_VIDEO
6 export TARGET_INC
=-I
$(FIRMWARE
)/target
/arm
/ipod
/video
-I
$(FIRMWARE
)/target
/arm
/ipod
-I
$(FIRMWARE
)/target
/arm
8 DRIVERS
= ..
/..
/drivers
13 RINCLUDE
= -I
$(FIRMWARE
)/include
14 DEFINES
= -DTEST_FAT
-DDEBUG
-DCRT_DISPLAY
-DDISK_WRITE
-DHAVE_FAT16SUPPORT
16 CFLAGS
= -g
-Wall
$(DEFINES
) -I.
$(INCLUDE
) $(RINCLUDE
) $(BUILDDATE
)
17 SIMFLAGS
= -g
-Wall
$(DEFINES
) -I.
$(INCLUDE
)
22 $(TARGET
): fat.o ata-sim.o main.o disk.o debug.o
dir.o file.o ctype.o
25 fat.o
: $(DRIVERS
)/fat.c
$(EXPORT
)/fat.h
$(EXPORT
)/ata.h
26 $(CC
) $(CFLAGS
) -DSIMULATOR
-c
$< -o
$@
28 ctype.o
: $(FIRMWARE
)/common
/ctype.c
29 $(CC
) $(CFLAGS
) -c
$< -o
$@
31 disk.o
: $(FIRMWARE
)/common
/disk.c
32 $(CC
) $(CFLAGS
) -c
$< -o
$@
34 dir.o
: $(FIRMWARE
)/common
/dir.c
35 $(CC
) $(CFLAGS
) -c
$< -o
$@
37 file.o
: $(FIRMWARE
)/common
/file.c
38 $(CC
) $(CFLAGS
) -c
$< -o
$@
40 debug.o
: $(FIRMWARE
)/debug.c
41 $(CC
) $(SIMFLAGS
) -DSIMULATOR
-c
$< -o
$@
43 ata-sim.o
: ata-sim.c
$(EXPORT
)/ata.h
44 $(CC
) $(SIMFLAGS
) -DSIMULATOR
-c
$< -o
$@
46 dir.h
: $(FIRMWARE
)/include/dir.h
47 ln
-s
$(FIRMWARE
)/include/dir.h .
49 file.h
: $(FIRMWARE
)/include/file.h
50 ln
-s
$(FIRMWARE
)/include/file.h .
52 main.o
: main.c
$(EXPORT
)/ata.h
dir.h file.h
53 $(CC
) $(SIMFLAGS
) -c
$< -o
$@
58 rm -f cmd.tab.h
lex.yy.c cmd.tab.c
64 tar cvf
$(TARGET
).
tar -C .. fat