2002-05-03 11:59:53 +00:00
|
|
|
FIRMWARE = ../..
|
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
|
|
|
|
2003-03-10 12:42:53 +00:00
|
|
|
INCLUDE = -I$(EXPORT)
|
2005-04-18 14:16:35 +00:00
|
|
|
|
2002-10-15 14:36:52 +00:00
|
|
|
RINCLUDE = -I$(FIRMWARE)/include
|
2005-04-18 14:16:35 +00:00
|
|
|
DEFINES = -DTEST_FAT -DDEBUG -DCRT_DISPLAY -DDISK_WRITE -DHAVE_FAT16SUPPORT
|
2002-10-15 14:36:52 +00:00
|
|
|
|
|
|
|
CFLAGS = -g -Wall $(DEFINES) -I. $(INCLUDE) $(RINCLUDE) -DLITTLE_ENDIAN
|
|
|
|
SIMFLAGS = -g -Wall $(DEFINES) -I. $(INCLUDE)
|
2002-04-26 16:44:58 +00:00
|
|
|
|
|
|
|
TARGET = fat
|
|
|
|
|
2002-10-15 14:36:52 +00:00
|
|
|
$(TARGET): fat.o ata-sim.o main.o disk.o debug.o dir.o file.o ctype.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
|
2002-10-15 14:36:52 +00:00
|
|
|
$(CC) $(CFLAGS) -DSIMULATOR -c $< -o $@
|
|
|
|
|
|
|
|
ctype.o: $(FIRMWARE)/common/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 $@
|
|
|
|
|
2002-05-03 15:36:52 +00:00
|
|
|
dir.o: $(FIRMWARE)/common/dir.c
|
|
|
|
$(CC) $(CFLAGS) -c $< -o $@
|
|
|
|
|
2002-05-07 16:01:53 +00:00
|
|
|
file.o: $(FIRMWARE)/common/file.c
|
|
|
|
$(CC) $(CFLAGS) -c $< -o $@
|
|
|
|
|
2002-05-03 11:59:53 +00:00
|
|
|
debug.o: $(FIRMWARE)/debug.c
|
2002-10-15 14:36:52 +00:00
|
|
|
$(CC) $(SIMFLAGS) -DSIMULATOR -c $< -o $@
|
2002-05-03 11:59:53 +00:00
|
|
|
|
2003-03-10 12:42:53 +00:00
|
|
|
ata-sim.o: ata-sim.c $(EXPORT)/ata.h
|
2002-10-15 14:36:52 +00:00
|
|
|
$(CC) $(SIMFLAGS) -DSIMULATOR -c $< -o $@
|
2002-04-26 16:44:58 +00:00
|
|
|
|
2003-03-10 12:42:53 +00:00
|
|
|
dir.h: $(FIRMWARE)/include/dir.h
|
|
|
|
ln -s $(FIRMWARE)/include/dir.h .
|
|
|
|
|
|
|
|
file.h: $(FIRMWARE)/include/file.h
|
|
|
|
ln -s $(FIRMWARE)/include/file.h .
|
|
|
|
|
|
|
|
main.o: main.c $(EXPORT)/ata.h dir.h file.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)
|
|
|
|
rm -f *~
|
|
|
|
rm -f cmd.tab.h lex.yy.c cmd.tab.c
|
|
|
|
rm -f core
|
2003-03-10 12:42:53 +00:00
|
|
|
rm -f dir.h file.h
|
2002-04-26 16:44:58 +00:00
|
|
|
|
|
|
|
tar:
|
|
|
|
rm -f $(TARGET).tar
|
|
|
|
tar cvf $(TARGET).tar -C .. fat
|