summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile31
1 files changed, 31 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..4a6ea42
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,31 @@
+OBJECTS = x86-common.o
+CFLAGS ?= -O2 -Wall -DDEBUG -g
+LIBDIR ?= /usr/lib
+
+ifeq ($(BACKEND),lrmi)
+ OBJECTS += lrmi.o
+else
+ OBJECTS += thunk.o x86emu/decode.o x86emu/debug.o x86emu/fpu.o \
+ x86emu/ops.o x86emu/ops2.o x86emu/prim_ops.o x86emu/sys.o
+endif
+
+ifeq ($(LIBRARY),shared)
+ CFLAGS += -fPIC
+endif
+
+default:
+ $(MAKE) LIBRARY=static static
+ $(MAKE) vbetool
+
+static: $(OBJECTS)
+ $(AR) cru libx86.a $(OBJECTS)
+
+objclean:
+ $(MAKE) -C x86emu clean
+ rm -f *.o *~
+
+vbetool: vbetool.c vbetool.h libx86.a
+ $(CC) -o vbetool vbetool.c libx86.a -lpciaccess
+
+clean: objclean
+ rm -f *.a vbetool