Stefan Reinauer | 1858844 | 2005-01-17 11:08:08 +0000 | [diff] [blame] | 1 | # |
| 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 Lo | 8152126 | 2004-07-08 17:18:27 +0000 | [diff] [blame] | 9 | CC = gcc |
Stefan Reinauer | 4aeff4f | 2010-04-16 11:45:16 +0000 | [diff] [blame] | 10 | CFLAGS = -O2 -g -fomit-frame-pointer |
| 11 | CFLAGS += -Wall -Wundef -Wstrict-prototypes -Wmissing-prototypes |
Stefan Reinauer | 14e2277 | 2010-04-27 06:56:47 +0000 | [diff] [blame^] | 12 | CFLAGS += -Wwrite-strings -Wredundant-decls -Wno-trigraphs |
Stefan Reinauer | 4aeff4f | 2010-04-16 11:45:16 +0000 | [diff] [blame] | 13 | CFLAGS += -Wstrict-aliasing -Wshadow -Wextra |
| 14 | |
| 15 | INCLUDES = -Iinclude -I../../src/devices/oprom/include/ |
Li-Ta Lo | 8152126 | 2004-07-08 17:18:27 +0000 | [diff] [blame] | 16 | |
Stefan Reinauer | 86051f9 | 2010-03-23 15:53:38 +0000 | [diff] [blame] | 17 | INTOBJS = int10.o int15.o int16.o int1a.o inte6.o |
| 18 | X86EMUOBJS = sys.o decode.o ops.o ops2.o prim_ops.o fpu.o debug.o |
| 19 | OBJS = testbios.o helper_exec.o helper_mem.o $(INTOBJS) $(X86EMUOBJS) |
Li-Ta Lo | 8152126 | 2004-07-08 17:18:27 +0000 | [diff] [blame] | 20 | |
| 21 | # user space pci is the only option right now. |
Stefan Reinauer | 86051f9 | 2010-03-23 15:53:38 +0000 | [diff] [blame] | 22 | OBJS += pci-userspace.o |
| 23 | |
| 24 | LIBS=-lpci |
Li-Ta Lo | 8152126 | 2004-07-08 17:18:27 +0000 | [diff] [blame] | 25 | |
| 26 | all: testbios |
| 27 | |
Stefan Reinauer | 86051f9 | 2010-03-23 15:53:38 +0000 | [diff] [blame] | 28 | testbios: $(OBJS) |
| 29 | $(CC) $(CFLAGS) -o $@ $^ $(LIBS) |
Stefan Reinauer | 14e2277 | 2010-04-27 06:56:47 +0000 | [diff] [blame^] | 30 | |
Li-Ta Lo | 8152126 | 2004-07-08 17:18:27 +0000 | [diff] [blame] | 31 | helper_exec.o: helper_exec.c test.h |
| 32 | |
Li-Ta Lo | 8152126 | 2004-07-08 17:18:27 +0000 | [diff] [blame] | 33 | clean: |
Li-Ta Lo | 8152126 | 2004-07-08 17:18:27 +0000 | [diff] [blame] | 34 | rm -f *.o *~ testbios |
| 35 | |
Stefan Reinauer | 86051f9 | 2010-03-23 15:53:38 +0000 | [diff] [blame] | 36 | %.o: ../../src/devices/oprom/x86emu/%.c |
Stefan Reinauer | 4aeff4f | 2010-04-16 11:45:16 +0000 | [diff] [blame] | 37 | $(CC) $(CFLAGS) $(INCLUDES) -include stdio.h -c -o $@ $^ |
| 38 | |
| 39 | %.o: %.c |
| 40 | $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $< |
Stefan Reinauer | 86051f9 | 2010-03-23 15:53:38 +0000 | [diff] [blame] | 41 | |