changeset 1:b6f398718389

Adding missing Makefile
author lost
date Fri, 03 Oct 2008 02:44:39 +0000
parents 57495da01900
children a8a83ccffafd
files src/Makefile
diffstat 1 files changed, 48 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/Makefile	Fri Oct 03 02:44:39 2008 +0000
@@ -0,0 +1,48 @@
+OBJS=index.o insn_gen.o insn_misc.o instab.o lwasm.o list.o output.o\
+ main.o pseudo.o macro.o symtab.o pragma.o
+CFLAGS=-Wall -D_GNU_SOURCE
+
+# for debugging
+CFLAGS+=-g
+
+# for real code
+#CFLAGS+=-O2
+
+lwasm: $(OBJS)
+	gcc $(LDFLAGS) -o $@ $^
+
+index.o: index.c lwasm.h instab.h
+
+insn_gen.o:	insn_gen.c lwasm.h instab.h
+
+insn_misc.o: insn_misc.c lwasm.h instab.h
+
+symtab.o: symtab.c lwasm.h
+
+instab.o: instab.c instab.h
+#	gcc $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
+
+lwasm.o: lwasm.c lwasm.h instab.h
+#	gcc $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
+
+list.o: list.c lwasm.h
+
+output.o: output.c lwasm.h
+
+main.o: main.c lwasm.h
+
+macro.o: macro.c lwasm.h
+
+pseudo.o: pseudo.c lwasm.h
+
+pragma.o: pragma.c lwasm.h
+
+test.bin: test.asm lwasm
+	./lwasm -o test.bin test.asm
+
+.PHONY: clean
+clean:
+	rm -f *~ *.o lwasm core test.bin
+
+.PHONY: test
+test: test.bin