# -*- Makefile -*- for GNU Emacs on the Microsoft W32 API.
# Copyright (C) 2000, 2001, 2002, 2003, 2004,
-# 2005 Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
#
# GNU Emacs is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
+# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# GNU Emacs is distributed in the hope that it will be useful,
#
OBJ0 = $(BLD)/emacs.$(O)
-OBJ1 = $(BLD)/abbrev.$(O) \
- $(BLD)/alloc.$(O) \
+OBJ1 = $(BLD)/alloc.$(O) \
$(BLD)/atimer.$(O) \
$(BLD)/buffer.$(O) \
$(BLD)/bytecode.$(O) \
$(BLD)/ccl.$(O) \
$(BLD)/fontset.$(O) \
$(BLD)/fringe.$(O) \
- $(BLD)/image.$(O)
+ $(BLD)/image.$(O) \
+ $(BLD)/terminal.$(O)
WIN32OBJ = $(BLD)/w32term.$(O) \
$(BLD)/w32xfns.$(O) \
$(TLIB1) \
$(TLIBW32) \
$(TLASTLIB) \
- $(WINMM) \
+ $(WINMM) \
$(ADVAPI32) \
$(GDI32) \
$(COMDLG32) \
$(MPR) \
$(SHELL32) \
$(WINSPOOL) \
+ $(OLE32) \
+ $(COMCTL32) \
$(libc)
#
#
# The dumped executable
#
-emacs: $(BLD) $(EMACS)
+emacs: stamp_BLD $(EMACS)
$(EMACS): $(DOC) $(TEMACS)
"$(THISDIR)/$(BLD)/temacs.exe" -batch -l loadup dump
-"$(THISDIR)/$(BLD)/emacs.exe" -q -batch -f list-load-path-shadows
# If preload runs out of memory, increase the last argument to addsection
# (it is the preload heap size in MB).
#
-temacs: $(BLD) $(TEMACS)
+temacs: stamp_BLD $(TEMACS)
$(TEMACS): $(TLIB0) $(TLIB1) $(TLIBW32) $(TLASTLIB) $(TOBJ) $(TRES) \
../nt/$(BLD)/addsection.exe
$(LINK) $(LINK_OUT)$(TEMACS_TMP) $(FULL_LINK_FLAGS) $(TOBJ) $(TRES) $(LIBS)
# WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
# this can break with GNU Make 3.81 and later if sh.exe is used.
bootstrap-temacs:
- $(MAKE) $(MFLAGS) temacs CFLAGS=$(ARGQUOTE)$(CFLAGS) -DPURESIZE=5000000$(ARGQUOTE)
+ $(MAKE) $(MFLAGS) $(XMFLAGS) temacs CFLAGS=$(ARGQUOTE)$(CFLAGS) -DPURESIZE=5000000$(ARGQUOTE)
#
# Dump an Emacs executable named bootstrap-emacs containing the
# The resource file. NT 3.10 requires the use of cvtres; even though
# it is not necessary on later versions, it is still ok to use it.
#
-$(TRES): ../nt/emacs.rc
- $(RC) $(RC_INCLUDE)../nt $(RC_OUT)$@ $(ALL_DEPS)
+$(TRES): ../nt/emacs.rc stamp_BLD
+ $(RC) $(RC_INCLUDE)../nt $(RC_OUT)$@ ../nt/emacs.rc
#
# Build the library. Split up the build into two phases...otherwise we
#
# Maintenance
#
+# We used to delete *~, s/*~, m/*~ here, but that might inadvertently
+# remove precious files if it happens to match their short 8+3 aliases.
clean:
- - $(DEL) *~ "s/*~" "m/*~"
+ - $(DEL) "s/*.h~" "m/*.h~"
- $(DEL) $(COMPILER_TEMP_FILES)
- $(DEL_TREE) $(OBJDIR)
+ - $(DEL) stamp_BLD
distclean: clean
- $(DEL) config.h epaths.h
EMACS_ROOT = ..
SRC = .
-$(BLD)/abbrev.$(O) : \
- $(SRC)/abbrev.c \
- $(EMACS_ROOT)/src/s/ms-w32.h \
- $(EMACS_ROOT)/src/m/intel386.h \
- $(EMACS_ROOT)/src/config.h \
- $(SRC)/buffer.h \
- $(SRC)/charset.h \
- $(SRC)/commands.h \
- $(SRC)/dispextern.h \
- $(SRC)/syntax.h \
- $(SRC)/w32bdf.h \
- $(SRC)/w32gui.h \
- $(SRC)/window.h
-
$(BLD)/alloc.$(O) : \
$(SRC)/alloc.c \
$(EMACS_ROOT)/src/s/ms-w32.h \
$(SRC)/process.h \
$(SRC)/syssignal.h \
$(SRC)/systty.h \
+ $(SRC)/frame.h \
+ $(SRC)/termhooks.h \
$(SRC)/w32.h
$(BLD)/casefiddle.$(O) : \
$(SRC)/composite.h \
$(SRC)/dispextern.h \
$(SRC)/intervals.h \
+ $(SRC)/frame.h \
+ $(SRC)/termhooks.h \
$(SRC)/w32bdf.h \
$(SRC)/w32gui.h \
$(SRC)/window.h
$(SRC)/frame.h \
$(SRC)/keyboard.h \
$(SRC)/puresize.h \
- $(SRC)/syssignal.h
+ $(SRC)/syssignal.h \
+ $(SRC)/termhooks.h
$(BLD)/dired.$(O) : \
$(SRC)/dired.c \
$(EMACS_ROOT)/src/s/ms-w32.h \
$(EMACS_ROOT)/src/m/intel386.h \
$(EMACS_ROOT)/src/config.h \
+ $(EMACS_ROOT)/nt/inc/langinfo.h \
+ $(EMACS_ROOT)/nt/inc/nl_types.h \
$(SRC)/atimer.h \
$(SRC)/blockinput.h \
$(SRC)/buffer.h \
$(SRC)/keymap.h \
$(SRC)/md5.h \
$(SRC)/systime.h \
+ $(SRC)/termhooks.h \
$(SRC)/w32bdf.h \
$(SRC)/w32gui.h \
$(SRC)/window.h
$(SRC)/fontset.h \
$(SRC)/frame.h \
$(SRC)/keyboard.h \
+ $(SRC)/termhooks.h \
$(SRC)/w32bdf.h \
$(SRC)/w32gui.h \
$(SRC)/window.h
$(SRC)/frame.h \
$(SRC)/keyboard.h \
$(SRC)/systime.h \
+ $(SRC)/termchar.h \
$(SRC)/termhooks.h \
$(SRC)/w32bdf.h \
$(SRC)/w32gui.h \
$(EMACS_ROOT)/src/config.h \
$(EMACS_ROOT)/nt/inc/sys/file.h \
$(EMACS_ROOT)/src/epaths.h \
+ $(SRC)/blockinput.h \
$(SRC)/buffer.h \
$(SRC)/ccl.h \
$(SRC)/charset.h \
$(SRC)/keyboard.h \
$(SRC)/keymap.h \
$(SRC)/syntax.h \
+ $(SRC)/termhooks.h \
$(SRC)/w32bdf.h \
$(SRC)/w32gui.h \
$(SRC)/window.h
$(SRC)/w32proc.c \
$(SRC)/s/ms-w32.h \
$(SRC)/m/intel386.h \
+ $(EMACS_ROOT)/nt/inc/langinfo.h \
+ $(EMACS_ROOT)/nt/inc/nl_types.h \
$(SRC)/config.h \
$(SRC)/process.h \
$(SRC)/syssignal.h \
$(SRC)/frame.h \
$(SRC)/keyboard.h \
$(SRC)/termchar.h \
+ $(SRC)/termhooks.h \
$(SRC)/w32bdf.h \
$(SRC)/w32gui.h \
$(SRC)/window.h
$(EMACS_ROOT)/nt/inc/sys/file.h \
$(SRC)/atimer.h \
$(SRC)/blockinput.h \
+ $(SRC)/cm.h \
$(SRC)/dispextern.h \
$(SRC)/frame.h \
$(SRC)/keyboard.h \
$(EMACS_ROOT)/src/config.h \
$(EMACS_ROOT)/nt/inc/sys/file.h
+$(BLD)/terminal.$(O) : \
+ $(SRC)/terminal.c \
+ $(EMACS_ROOT)/src/s/ms-w32.h \
+ $(EMACS_ROOT)/src/m/intel386.h \
+ $(EMACS_ROOT)/src/config.h \
+ $(SRC)/charset.h \
+ $(SRC)/coding.h \
+ $(SRC)/frame.h \
+ $(SRC)/keyboard.h \
+ $(SRC)/termchar.h \
+ $(SRC)/termhooks.h
+
$(BLD)/textprop.$(O) : \
$(SRC)/textprop.c \
$(EMACS_ROOT)/src/s/ms-w32.h \
$(SRC)/intervals.h \
$(SRC)/keyboard.h \
$(SRC)/systime.h \
+ $(SRC)/termchar.h \
+ $(SRC)/termhooks.h \
$(SRC)/w32bdf.h \
$(SRC)/w32gui.h \
$(SRC)/w32term.h \
$(SRC)/w32bdf.h \
$(SRC)/w32gui.h \
$(SRC)/w32term.h
+
+# Each object file depends on stamp_BLD, because in parallel builds we must
+# make sure $(BLD) exists before starting compilations.
+#
+$(OBJ0) $(OBJ1) $(WIN32OBJ) $(BLD)/lastfile.$(O) $(BLD)/firstfile.$(O): stamp_BLD