blob: 12bd1b73400070e357cad933de9b3e9d6962090a [file] [log] [blame]
# This Makefile understands the following targets:
#
# all (default): build wine
# clean: remove all intermediate files
# distclean: also remove all files created by configure
# depend: create the dependencies
# etags: Create a TAGS file for Emacs.
#
# Author: Michael Patra <micky@marie.physik.tu-berlin.de>
# <patra@itp1.physik.tu-berlin.de>
# First some useful definitions
SHELL = /bin/sh
CC = @CC@
CPP = @CPP@
CFLAGS = @CFLAGS@
DEFS = @DEFS@ -DWINE_INI_GLOBAL=\"$(WINE_INI_GLOBAL)\"
X_CFLAGS = @X_CFLAGS@
X_LIBS = @X_LIBS@
TOPSRC = @top_srcdir@
DIVINCL = -I$(TOPSRC)/include
XPM_LIB = -lXpm
XLIB = @X_PRE_LIBS@ -lXext -lX11 @X_EXTRA_LIBS@
LDLIBS = @LDLIBS@
AR = ar rc
RANLIB = @RANLIB@
RM = rm -f
SUBMAKE = $(MAKE) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'DEFS=$(DEFS)'
@SET_MAKE@
# Installation infos
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
sysconfdir = @sysconfdir@
mandir = @mandir@/man1
manext = .1
WINE_INI_GLOBAL = $(sysconfdir)/wine.conf
# Main target to build
MAIN_TARGET = @MAIN_TARGET@
COMMONSUBDIRS = \
rc \
controls \
files \
ipc \
loader \
misc \
multimedia \
objects \
resources \
win32 \
windows
EMUSUBDIRS = \
tools \
debugger \
debugger/readline \
if1632 \
memory \
miscemu
LIBSUBDIRS = library
PROGSUBDIRS = libtest programs
ALLSUBDIRS = $(COMMONSUBDIRS) $(EMUSUBDIRS) $(LIBSUBDIRS) $(PROGSUBDIRS)
COMMONOBJS = \
controls/controls.o \
files/files.o \
ipc/ipc.o \
loader/loader.o \
misc/misc.o \
multimedia/multimedia.o \
objects/objects.o \
resources/resources.o \
win32/win32.o \
windows/windows.o
EMUOBJS = \
debugger/debugger.o \
debugger/readline/readline.o \
if1632/if1632.o \
memory/memory.o \
miscemu/miscemu.o
LIBOBJS = library/library.o
all: $(MAIN_TARGET)
install: install_$(MAIN_TARGET)
wine wine.sym: $(COMMONSUBDIRS) $(EMUSUBDIRS) dummy
$(CC) -o wine $(COMMONOBJS) $(EMUOBJS) $(LDOPTIONS) $(X_LIBS) $(XPM_LIB) $(XLIB) $(LDLIBS)
nm -n wine | grep -v _compiled >wine.sym
install_wine: dummy
$(INSTALL_PROGRAM) wine $(bindir)/wine
$(INSTALL_DATA) wine.man $(mandir)/wine$(manext)
libwine.a: $(COMMONSUBDIRS) $(LIBSUBDIRS) dummy
$(RM) $@
$(AR) $@ $(COMMONOBJS) $(LIBOBJS)
$(RANLIB) $@
install_libwine.a: dummy
$(INSTALL_DATA) libwine.a $(libdir)
libwine.so.1.0: $(COMMONSUBDIRS) $(LIBSUBDIRS) dummy
$(CC) -shared -Wl,-soname,libwine.so.1 -o$@ $(COMMONOBJS) $(LIBOBJS) $(LDOPTIONS) $(X_LIBS) $(XPM_LIB) $(XLIB) $(LDLIBS)
install_libwine.so.1.0: dummy
$(INSTALL_DATA) libwine.so.1.0 $(libdir)
$(ALLSUBDIRS): dummy
@cd $@; $(SUBMAKE)
depend:
for i in $(ALLSUBDIRS); do (cd $$i; $(MAKE) depend); done
etags:
etags `find . -name '*.[chS]' -print`
clean:
for i in $(ALLSUBDIRS); do (cd $$i; $(MAKE) clean); done
$(RM) *.o \#*\# *~ *.bak *.orig *.rej *.flc
$(RM) wine wine.sym libwine.a libwine.so.1.0 TAGS
(cd include; $(RM) *.o \#*\# *~ *.bak *.orig *.rej *.flc)
distclean: clean
$(RM) config.* Make.rules
$(RM) `find . \( -name Makefile -o -size 0 \) -print`
dummy: