blob: 0a8dae6d599d8ac62fa37e0815930406eee12b59 [file] [log] [blame]
Stefan Reinauer18588442005-01-17 11:08:08 +00001#
2# NOTE: You need to add your libpci.a version to CFLAGS below if
3# pci-userspace.c does not build.
4#
5# If you are building on AMD64, you have to use /usr/lib64/libpci.a instead of
6# /usr/lib/...
7#
8
Li-Ta Lo81521262004-07-08 17:18:27 +00009CC = gcc
Stefan Reinauer4aeff4f2010-04-16 11:45:16 +000010CFLAGS = -O2 -g -fomit-frame-pointer
11CFLAGS += -Wall -Wundef -Wstrict-prototypes -Wmissing-prototypes
Stefan Reinauer14e22772010-04-27 06:56:47 +000012CFLAGS += -Wwrite-strings -Wredundant-decls -Wno-trigraphs
Stefan Reinauer4aeff4f2010-04-16 11:45:16 +000013CFLAGS += -Wstrict-aliasing -Wshadow -Wextra
14
15INCLUDES = -Iinclude -I../../src/devices/oprom/include/
Li-Ta Lo81521262004-07-08 17:18:27 +000016
Stefan Reinauer86051f92010-03-23 15:53:38 +000017INTOBJS = int10.o int15.o int16.o int1a.o inte6.o
18X86EMUOBJS = sys.o decode.o ops.o ops2.o prim_ops.o fpu.o debug.o
19OBJS = testbios.o helper_exec.o helper_mem.o $(INTOBJS) $(X86EMUOBJS)
Li-Ta Lo81521262004-07-08 17:18:27 +000020
21# user space pci is the only option right now.
Stefan Reinauer86051f92010-03-23 15:53:38 +000022OBJS += pci-userspace.o
23
24LIBS=-lpci
Li-Ta Lo81521262004-07-08 17:18:27 +000025
26all: testbios
27
Stefan Reinauer86051f92010-03-23 15:53:38 +000028testbios: $(OBJS)
29 $(CC) $(CFLAGS) -o $@ $^ $(LIBS)
Stefan Reinauer14e22772010-04-27 06:56:47 +000030
Li-Ta Lo81521262004-07-08 17:18:27 +000031helper_exec.o: helper_exec.c test.h
32
Li-Ta Lo81521262004-07-08 17:18:27 +000033clean:
Li-Ta Lo81521262004-07-08 17:18:27 +000034 rm -f *.o *~ testbios
35
Stefan Reinauer86051f92010-03-23 15:53:38 +000036%.o: ../../src/devices/oprom/x86emu/%.c
Stefan Reinauer4aeff4f2010-04-16 11:45:16 +000037 $(CC) $(CFLAGS) $(INCLUDES) -include stdio.h -c -o $@ $^
38
39%.o: %.c
40 $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
Stefan Reinauer86051f92010-03-23 15:53:38 +000041