Makefile 1.59 KB
Newer Older
1 2
CC=gcc
AS=as
3
OUTDIR="Clean System Files"
4 5 6

all: copy_graph_to_string.o copy_graph_to_string_interface.o copy_string_to_graph.o copy_string_to_graph_interface.o

7
copy_graph_to_string.o: ../common/copy_graph_to_string.c
8 9 10 11
	mkdir -p $(OUTDIR)
	$(CC) $(CFLAGS) -O -S -fomit-frame-pointer -DLINUX32 ../common/copy_graph_to_string.c -o $(OUTDIR)/copy_graph_to_string.a
	sed -f ../tools/intel32.sed $(OUTDIR)/copy_graph_to_string.a > $(OUTDIR)/copy_graph_to_string.s
	$(AS) $(ASFLAGS) $(OUTDIR)/copy_graph_to_string.s -o $(OUTDIR)/copy_graph_to_string.o
12 13

copy_graph_to_string_interface.o: copy_graph_to_string_interface.s
14 15
	mkdir -p $(OUTDIR)
	$(AS) $(ASFLAGS) copy_graph_to_string_interface.s -o $(OUTDIR)/copy_graph_to_string_interface.o
16

17
copy_string_to_graph.o: ../common/copy_string_to_graph.c
18 19 20 21
	mkdir -p $(OUTDIR)
	$(CC) $(CFLAGS) -O -S -fomit-frame-pointer -DLINUX32 ../common/copy_string_to_graph.c -o $(OUTDIR)/copy_string_to_graph.a
	sed -f ../tools/intel32.sed $(OUTDIR)/copy_string_to_graph.a > $(OUTDIR)/copy_string_to_graph.s
	$(AS) $(ASFLAGS) $(OUTDIR)/copy_string_to_graph.s -o $(OUTDIR)/copy_string_to_graph.o
22 23

copy_string_to_graph_interface.o: copy_string_to_graph_interface.s
24 25
	mkdir -p $(OUTDIR)
	$(AS) $(ASFLAGS) copy_string_to_graph_interface.s -o $(OUTDIR)/copy_string_to_graph_interface.o
26 27

cleanup:
28 29 30 31 32 33 34 35
	rm $(OUTDIR)/copy_graph_to_string.a
	rm $(OUTDIR)/copy_graph_to_string.s
	rm $(OUTDIR)/copy_string_to_graph.a
	rm $(OUTDIR)/copy_string_to_graph.s
	rm $(OUTDIR)/copy_graph_to_string.o
	rm $(OUTDIR)/copy_graph_to_string_interface.o
	rm $(OUTDIR)/copy_string_to_graph.o
	rm $(OUTDIR)/copy_string_to_graph_interface.o