summaryrefslogtreecommitdiffstats
path: root/firmware/test/fat/Makefile
blob: bd6869e8e999ba61e8c8ec3e4f9b5e6b56e7bfc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FIRMWARE = ../..
DRIVERS = ../../drivers

CFLAGS = -g -Wall -DTEST_FAT -I$(DRIVERS) -I$(FIRMWARE)/common -I$(FIRMWARE) -I. -DDEBUG -DCRT_DISPLAY

TARGET = fat

$(TARGET): fat.o ata-sim.o main.o disk.o debug.o dir.o file.o
	gcc -g -o fat $+ -lfl

fat.o: $(DRIVERS)/fat.c $(DRIVERS)/fat.h $(DRIVERS)/ata.h
	$(CC) $(CFLAGS) -c $< -o $@

disk.o: $(FIRMWARE)/common/disk.c
	$(CC) $(CFLAGS) -c $< -o $@

dir.o: $(FIRMWARE)/common/dir.c
	$(CC) $(CFLAGS) -c $< -o $@

file.o: $(FIRMWARE)/common/file.c
	$(CC) $(CFLAGS) -c $< -o $@

debug.o: $(FIRMWARE)/debug.c
	$(CC) $(CFLAGS) -c $< -o $@

ata-sim.o: ata-sim.c $(DRIVERS)/ata.h

main.o: main.c $(DRIVERS)/ata.h

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