2002-05-03 11:59:53 +00:00
|
|
|
FIRMWARE = ../..
|
2008-12-04 21:28:56 +00:00
|
|
|
|
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
|
|
|
|
2012-05-03 05:08:43 +00:00
|
|
|
BUILDDATE=$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
|
|
|
|
INCLUDE = -I$(EXPORT) -I$(FIRMWARE)/include -I$(FIRMWARE)/target/hosted -I$(FIRMWARE)/target/hosted/sdl
|
|
|
|
DEFINES = -DTEST_FAT -DDEBUG -DDISK_WRITE -DHAVE_FAT16SUPPORT -D__PCTOOL__
|
2002-10-15 14:36:52 +00:00
|
|
|
|
2012-05-08 06:53:38 +00:00
|
|
|
CFLAGS = -g -Wall -std=gnu99 -Wno-pointer-sign $(DEFINES) $(BUILDDATE) -I. $(INCLUDE) -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
|
2012-05-08 06:53:38 +00:00
|
|
|
gcc -g -o fat $+
|
2002-04-26 16:44:58 +00:00
|
|
|
|
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)
|