DEFS      = -D__WINE__
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ..
SRCDIR    = @srcdir@
VPATH     = @srcdir@
MODULE    = miscemu

SPEC_SRCS = wine.spec

C_SRCS = \
	main.c

PRELOADER_OBJS = \
	preloader.o

LOADER_BINARIES = @PRELOADER_BINARY@

all: $(MODULE).o $(LOADER_BINARIES)

@MAKE_RULES@

$(MODULE).o: $(OBJS) Makefile.in $(TOPSRCDIR)/Make.rules.in
	$(LDCOMBINE) $(OBJS) -o $@

wine-preloader: $(PRELOADER_OBJS) Makefile.in $(TOPSRCDIR)/Make.rules.in
	$(CC) -o wine-preloader -static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x78000000 $(PRELOADER_OBJS) $(LDFLAGS)

install:: $(LOADER_BINARIES)
	[ -d $(bindir) ] || $(MKDIR) $(bindir)
	$(INSTALL_PROGRAM) wine-preloader $(bindir)/wine-preloader

uninstall::
	$(RM) $(bindir)/wine-preloader

### Dependencies:
