LDFLAGS=-g
LIBS=
HELPER_CFLAGS=$(CFLAGS)
-DYNGEN=../dyngen
+DYNGEN=../dyngen$(EXESUF)
# user emulator name
QEMU_USER=qemu-$(TARGET_ARCH)
# system emulator name
ifdef CONFIG_SOFTMMU
-QEMU_SYSTEM=qemu
+QEMU_SYSTEM=qemu$(EXESUF)
else
QEMU_SYSTEM=qemu-fast
endif
DEFINES+=-D_GNU_SOURCE
LIBS+=-lm
+ifdef CONFIG_WIN32
+LIBS+=-lwinmm
+endif
# profiling code
ifdef TARGET_GPROF
OBJS+= libqemu.a
# cpu emulator library
-LIBOBJS=exec.o translate-all.o cpu-exec.o gdbstub.o \
+LIBOBJS=exec.o translate-all.o cpu-exec.o\
translate.o op.o
ifeq ($(TARGET_ARCH), i386)
VL_OBJS=vl.o osdep.o block.o monitor.o \
ide.o ne2000.o pckbd.o vga.o sb16.o dma.o oss.o \
fdc.o mc146818rtc.o serial.o i8259.o i8254.o pc.o
+ifdef CONFIG_GDBSTUB
+VL_OBJS+=gdbstub.o
+endif
ifeq ($(TARGET_ARCH), ppc)
VL_OBJS+= hw.o
endif
ifndef CONFIG_SOFTMMU
VL_LDFLAGS+=-Wl,-T,$(SRC_PATH)/i386-vl.ld
endif
+ifndef CONFIG_WIN32
+VL_LIBS=-lutil
+endif
$(QEMU_SYSTEM): $(VL_OBJS) libqemu.a
- $(CC) $(VL_LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) -lutil
+ $(CC) $(VL_LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(VL_LIBS)
sdl.o: sdl.c
$(CC) $(CFLAGS) $(DEFINES) $(SDL_CFLAGS) -c -o $@ $<
rm -f *.o *.a *~ $(PROGS) gen-op.h opc.h op.h nwfpe/*.o
install: all
- install -m 755 -s $(PROGS) $(prefix)/bin
+ifneq ($(PROGS),)
+ install -m 755 -s $(PROGS) "$(bindir)"
+endif
ifneq ($(wildcard .depend),)
include .depend