2002-05-03 11:59:53 +00:00
|
|
|
FIRMWARE = ../..
|
2002-04-26 16:44:58 +00:00
|
|
|
DRIVERS = ../../drivers
|
|
|
|
|
2002-10-15 14:36:52 +00:00
|
|
|
INCLUDE = -I$(DRIVERS) -I$(FIRMWARE) -I$(FIRMWARE)/common
|
|
|
|
RINCLUDE = -I$(FIRMWARE)/include
|
|
|
|
DEFINES = -DTEST_FAT -DDEBUG -DCRT_DISPLAY -DDISK_WRITE
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
fat.o: $(DRIVERS)/fat.c $(DRIVERS)/fat.h $(DRIVERS)/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
|
|
|
|
2002-04-26 16:44:58 +00:00
|
|
|
ata-sim.o: ata-sim.c $(DRIVERS)/ata.h
|
2002-10-15 14:36:52 +00:00
|
|
|
$(CC) $(SIMFLAGS) -DSIMULATOR -c $< -o $@
|
2002-04-26 16:44:58 +00:00
|
|
|
|
2002-05-03 11:59:53 +00:00
|
|
|
main.o: main.c $(DRIVERS)/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)
|
|
|
|
rm -f *~
|
|
|
|
rm -f cmd.tab.h lex.yy.c cmd.tab.c
|
|
|
|
rm -f core
|
|
|
|
|
|
|
|
tar:
|
|
|
|
rm -f $(TARGET).tar
|
|
|
|
tar cvf $(TARGET).tar -C .. fat
|