summaryrefslogtreecommitdiff
path: root/Makefile
blob: 4a6ea4265cdb67c21c5315515dc1d1911454562c (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
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