Update copyright notices for 2013.
[bpt/emacs.git] / lib-src / makefile.w32-in
index 07f6170..51fac61 100644 (file)
@@ -1,5 +1,5 @@
-#  -*- Makefile -*- for GNU Emacs on the Microsoft W32 API.
-# Copyright (C) 2000-2011 Free Software Foundation, Inc.
+#  -*- Makefile -*- for GNU Emacs on the Microsoft Windows API.
+# Copyright (C) 2000-2013 Free Software Foundation, Inc.
 
 # This file is part of GNU Emacs.
 
 # along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 
-ALL = make-docfile hexl ctags etags movemail ebrowse emacsclient
+ALL = $(BLD)/test-distrib.exe $(BLD)/make-docfile.exe $(BLD)/hexl.exe\
+ $(BLD)/ctags.exe $(BLD)/etags.exe $(BLD)/movemail.exe $(BLD)/ebrowse.exe\
+ $(BLD)/emacsclient.exe $(BLD)/emacsclientw.exe $(BLD)/profile.exe
 
-.PHONY: $(ALL)
+.PHONY: make-docfile
 
-LOCAL_FLAGS    = -DWINDOWSNT -DDOS_NT -DSTDC_HEADERS=1 -DNO_LDAV=1 \
-                 -DNO_ARCHIVES=1 -DHAVE_CONFIG_H=1 -I../lib \
-                 -I../nt/inc -I../src
+LOCAL_FLAGS    = -DNO_LDAV=1 -DNO_ARCHIVES=1 -I../lib \
+                 -I../nt/inc -I../src $(EMACS_EXTRA_C_FLAGS)
 
 LIBS           = $(BASE_LIBS) $(ADVAPI32)
 
+# The following target is used by makefile.w32-in files in other directories.
+make-docfile:  $(BLD)/make-docfile.exe
+
 $(BLD)/make-docfile.exe:       $(BLD)/make-docfile.$(O) $(BLD)/ntlib.$(O)
                $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(BLD)/make-docfile.$(O) $(BLD)/ntlib.$(O) $(LIBS)
 $(BLD)/hexl.exe:               $(BLD)/hexl.$(O)
                $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(BLD)/hexl.$(O) $(LIBS)
 $(BLD)/test-distrib.exe: $(BLD)/test-distrib.$(O)
                $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(BLD)/test-distrib.$(O) $(LIBS)
-
-make-docfile:  stamp_BLD $(BLD)/make-docfile.exe
-ctags:         stamp_BLD $(BLD)/ctags.exe
-etags:         stamp_BLD $(BLD)/etags.exe
-ebrowse:        stamp_BLD $(BLD)/ebrowse.exe
-hexl:          stamp_BLD $(BLD)/hexl.exe
-movemail:      stamp_BLD $(BLD)/movemail.exe
-emacsclient:   stamp_BLD $(BLD)/emacsclient.exe $(BLD)/emacsclientw.exe
-
-test-distrib:  stamp_BLD $(BLD)/test-distrib.exe
-       "$(BLD)/test-distrib.exe" "$(SRC)/testfile"
+               "$(BLD)/test-distrib.exe" "$(LIB_SRC)/testfile"
 
 MOVEMAILOBJS =  $(BLD)/movemail.$(O) \
                $(BLD)/pop.$(O) \
@@ -70,7 +64,7 @@ $(BLD)/emacsclient.exe:               $(ECLIENTOBJS)
 
 $(BLD)/emacsclientw.exe:       $(ECLIENTOBJS) $(CLIENTRES)
 # put wsock32.lib before $(LIBS) to ensure we don't link to ws2_32.lib
-               $(LINK) $(LINK_OUT)$@ $(CLIENTRES) -mwindows $(LINK_FLAGS) $(ECLIENTOBJS) $(WSOCK32) $(USER32) $(COMCTL32) $(LIBS)
+               $(LINK) $(LINK_OUT)$@ $(CLIENTRES) $(MWINDOWS) $(LINK_FLAGS) $(ECLIENTOBJS) $(WSOCK32) $(USER32) $(COMCTL32) $(LIBS)
 
 $(BLD)/emacsclient.$(O):       emacsclient.c
                $(CC) $(CFLAGS) $(ECLIENT_CFLAGS) $(CC_OUT)$@ emacsclient.c
@@ -111,10 +105,16 @@ ctags.c:  etags.c
                - $(DEL) ctags.c
                $(CP) etags.c ctags.c
 
-CTAGS_CFLAGS  = -DCTAGS $(ETAGS_CFLAGS) -DEMACS_NAME="\"GNU Emacs\""
+CTAGS_CFLAGS  = -DCTAGS $(ETAGS_CFLAGS)
 $(BLD)/ctags.$(O): ctags.c
                $(CC) $(CFLAGS) $(CTAGS_CFLAGS) $(CC_OUT)$@ ctags.c
 
+PROFILEOBJS    = $(BLD)/profile.$(O) \
+                 ../lib/$(BLD)/libgnu.$(A) \
+                 $(BLD)/ntlib.$(O)
+$(BLD)/profile.exe:    $(PROFILEOBJS)
+               $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(PROFILEOBJS) $(LIBS)
+
 #
 # From ..\src\Makefile.in
 # It doesn't matter if the real name is *.obj for the files in this list,
@@ -124,7 +124,7 @@ $(BLD)/ctags.$(O): ctags.c
 obj =   dosfns.o msdos.o \
        xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o fringe.o image.o \
        fontset.o menu.o \
-       w32.o w32console.o w32fns.o w32heap.o w32inevt.o \
+       w32.o w32console.o w32fns.o w32heap.o w32inevt.o cygw32.o \
        w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o \
        font.o w32font.o w32uniscribe.o \
        dispnew.o frame.o scroll.o xdisp.o window.o bidi.o \
@@ -140,7 +140,7 @@ obj =   dosfns.o msdos.o \
        process.o callproc.o unexw32.o \
        region-cache.o sound.o atimer.o \
        doprnt.o intervals.o textprop.o composite.o \
-       gnutls.o
+       gnutls.o xml.o profiler.o
 
 #
 # These are the lisp files that are loaded up in loadup.el
@@ -209,39 +209,40 @@ lisp1= \
        $(lispsource)emacs-lisp/map-ynp.elc \
        $(lispsource)menu-bar.elc \
        $(lispsource)international/mule.elc \
-       $(lispsource)international/mule-conf.el \
+       $(lispsource)international/mule-conf.elc \
        $(lispsource)international/mule-cmds.elc \
        $(lispsource)international/characters.elc \
        $(lispsource)international/charprop.el \
        $(lispsource)case-table.elc
 
 lisp2 = \
-       $(lispsource)language/chinese.el \
-       $(lispsource)language/cyrillic.el \
-       $(lispsource)language/indian.el \
-       $(lispsource)language/sinhala.el \
-       $(lispsource)language/english.el \
+       $(lispsource)language/chinese.elc \
+       $(lispsource)language/cyrillic.elc \
+       $(lispsource)language/indian.elc \
+       $(lispsource)language/sinhala.elc \
+       $(lispsource)language/english.elc \
        $(lispsource)language/ethiopic.elc \
        $(lispsource)language/european.elc \
-       $(lispsource)language/czech.el \
-       $(lispsource)language/slovak.el \
-       $(lispsource)language/romanian.el \
-       $(lispsource)language/greek.el \
+       $(lispsource)language/czech.elc \
+       $(lispsource)language/slovak.elc \
+       $(lispsource)language/romanian.elc \
+       $(lispsource)language/greek.elc \
        $(lispsource)language/hebrew.elc \
-       $(lispsource)language/japanese.el \
-       $(lispsource)language/korean.el \
-       $(lispsource)language/lao.el \
-       $(lispsource)language/cham.el \
-       $(lispsource)language/tai-viet.el \
-       $(lispsource)language/thai.el \
+       $(lispsource)language/japanese.elc \
+       $(lispsource)international/cp51932.el \
+       $(lispsource)international/eucjp-ms.el \
+       $(lispsource)language/korean.elc \
+       $(lispsource)language/lao.elc \
+       $(lispsource)language/cham.elc \
+       $(lispsource)language/tai-viet.elc \
+       $(lispsource)language/thai.elc \
        $(lispsource)language/tibetan.elc \
-       $(lispsource)language/vietnamese.el \
-       $(lispsource)language/misc-lang.el \
-       $(lispsource)language/utf-8-lang.el \
-       $(lispsource)language/georgian.el \
-       $(lispsource)language/khmer.el \
-       $(lispsource)language/burmese.el \
-       $(lispsource)paths.el \
+       $(lispsource)language/vietnamese.elc \
+       $(lispsource)language/misc-lang.elc \
+       $(lispsource)language/utf-8-lang.elc \
+       $(lispsource)language/georgian.elc \
+       $(lispsource)language/khmer.elc \
+       $(lispsource)language/burmese.elc \
        $(lispsource)register.elc \
        $(lispsource)replace.elc \
        $(lispsource)simple.elc \
@@ -267,7 +268,7 @@ lisp2 = \
        $(WINDOW_SUPPORT) \
        $(lispsource)widget.elc \
        $(lispsource)window.elc \
-       $(lispsource)version.el
+       $(lispsource)version.elc
 
 # This is needed the first time we build the tree, since temacs.exe
 # does not exist yet, and the DOC rule needs it to rebuild DOC whenever
@@ -297,7 +298,7 @@ $(DOC):             stamp_BLD $(BLD)/make-docfile.exe ../src/$(BLD)/temacs.exe $(lisp1) $(l
 #
 # Build the executables
 #
-all:           stamp_BLD $(ALL) $(DOC)
+all:           $(ALL) $(DOC)
 
 #
 # Assuming INSTALL_DIR is defined, build and install emacs in it.
@@ -312,6 +313,7 @@ install:    $(INSTALL_FILES)
                $(CP) $(BLD)/movemail.exe $(INSTALL_DIR)/bin
                $(CP) $(BLD)/emacsclient.exe $(INSTALL_DIR)/bin
                $(CP) $(BLD)/emacsclientw.exe $(INSTALL_DIR)/bin
+               $(CP) $(BLD)/profile.exe $(INSTALL_DIR)/bin
                - mkdir "$(INSTALL_DIR)/etc"
                $(CP) $(DOC) $(INSTALL_DIR)/etc
 
@@ -354,114 +356,111 @@ TAGS: $(BLD)/etags.exe *.c *.h
 ### DEPENDENCIES ###
 
 EMACS_ROOT     = ..
-SRC            = .
-
-$(BLD)/alloca.$(O) : \
-       $(SRC)/alloca.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
-       $(EMACS_ROOT)/src/blockinput.h
+LIB_SRC                = .
+SRC            = $(EMACS_ROOT)/src
+NT_INC         = $(EMACS_ROOT)/nt/inc
+GNU_LIB                = $(EMACS_ROOT)/lib
+
+MS_W32_H       = $(NT_INC)/ms-w32.h \
+                $(NT_INC)/sys/stat.h
+CONF_POST_H    = $(SRC)/conf_post.h \
+                $(MS_W32_H)
+CONFIG_H       = $(SRC)/config.h \
+                $(CONF_POST_H)
+INTTYPES_H     = $(NT_INC)/inttypes.h \
+                $(NT_INC)/stdint.h
+NTLIB_H        = $(LIB_SRC)/ntlib.h \
+                $(NT_INC)/pwd.h
+SYSTIME_H      = $(SRC)/systime.h \
+                $(NT_INC)/sys/time.h \
+                $(GNU_LIB)/timespec.h
 
 $(BLD)/ctags.$(O) : \
-       $(SRC)/ctags.c \
-       $(EMACS_ROOT)/nt/inc/sys/param.h \
-       $(EMACS_ROOT)/nt/inc/sys/stat.h \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/lib-src/../src/config.h \
-       $(SRC)/ntlib.h \
-       $(EMACS_ROOT)/lib/getopt.h
+       $(LIB_SRC)/ctags.c \
+       $(SRC)/regex.h \
+       $(NT_INC)/sys/stat.h \
+       $(NT_INC)/unistd.h \
+       $(GNU_LIB)/c-strcase.h \
+       $(GNU_LIB)/getopt.h \
+       $(CONFIG_H)
 
 $(BLD)/ebrowse.$(O) : \
-       $(SRC)/ebrowse.c \
-       $(EMACS_ROOT)/lib/min-max.h \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/lib-src/../src/config.h
+       $(LIB_SRC)/ebrowse.c \
+       $(GNU_LIB)/getopt.h \
+       $(GNU_LIB)/min-max.h \
+       $(CONFIG_H)
 
 $(BLD)/emacsclient.$(O) : \
-       $(SRC)/emacsclient.c \
-       $(EMACS_ROOT)/nt/inc/sys/stat.h \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/lib-src/../src/config.h
+       $(LIB_SRC)/emacsclient.c \
+       $(NT_INC)/pwd.h \
+       $(NT_INC)/sys/stat.h \
+       $(NT_INC)/unistd.h \
+       $(GNU_LIB)/getopt.h \
+       $(CONFIG_H)
 
 $(BLD)/etags.$(O) : \
-       $(SRC)/etags.c \
-       $(EMACS_ROOT)/nt/inc/sys/param.h \
-       $(EMACS_ROOT)/nt/inc/sys/stat.h \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/lib-src/../src/config.h \
-       $(SRC)/ntlib.h \
-       $(EMACS_ROOT)/lib/getopt.h
-
-$(BLD)/getdate.$(O) : \
-       $(SRC)/getdate.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/src/config.h \
-       $(MSTOOLS_SYS)/types.h
+       $(LIB_SRC)/etags.c \
+       $(SRC)/regex.h \
+       $(NT_INC)/sys/stat.h \
+       $(NT_INC)/unistd.h \
+       $(GNU_LIB)/c-strcase.h \
+       $(GNU_LIB)/getopt.h \
+       $(CONFIG_H)
 
 $(BLD)/hexl.$(O) : \
-       $(SRC)/hexl.c
-
-$(BLD)/leditcfns.$(O) : \
-       $(SRC)/leditcfns.c
+       $(LIB_SRC)/hexl.c \
+       $(CONFIG_H)
 
 $(BLD)/make-docfile.$(O) : \
-       $(SRC)/make-docfile.c \
-       $(EMACS_ROOT)/src/config.h
-
-$(BLD)/make-path.$(O) : \
-       $(SRC)/make-path.c
+       $(LIB_SRC)/make-docfile.c \
+       $(NT_INC)/unistd.h \
+       $(CONFIG_H)
 
 $(BLD)/movemail.$(O) : \
-       $(SRC)/movemail.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/lib-src/../src/config.h \
-       $(EMACS_ROOT)/nt/inc/sys/file.h \
-       $(EMACS_ROOT)/nt/inc/sys/stat.h \
-       $(EMACS_ROOT)/lib-src/../src/syswait.h \
-       $(EMACS_ROOT)/nt/inc/pwd.h \
-       $(SRC)/ntlib.h
-       $(CC) $(CFLAGS) -DUSG $(CC_OUT)$@ movemail.c
+       $(LIB_SRC)/movemail.c \
+       $(LIB_SRC)/pop.h \
+       $(SRC)/syswait.h \
+       $(NT_INC)/pwd.h \
+       $(NT_INC)/sys/file.h \
+       $(NT_INC)/sys/stat.h \
+       $(NT_INC)/unistd.h \
+       $(GNU_LIB)/getopt.h \
+       $(CONFIG_H) \
+       $(NTLIB_H)
 
 $(BLD)/ntlib.$(O) : \
-       $(SRC)/ntlib.c \
-       $(SRC)/ntlib.h \
-       $(EMACS_ROOT)/nt/inc/sys/stat.h \
-       $(EMACS_ROOT)/nt/inc/pwd.h
+       $(LIB_SRC)/ntlib.c \
+       $(NT_INC)/sys/stat.h \
+       $(NTLIB_H)
 
 $(BLD)/pop.$(O) : \
-       $(SRC)/pop.c \
-       $(SRC)/pop.h \
-       $(EMACS_ROOT)/lib/min-max.h \
-       $(SRC)/ntlib.h
+       $(LIB_SRC)/pop.c \
+       $(LIB_SRC)/pop.h \
+       $(NT_INC)/netdb.h \
+       $(NT_INC)/pwd.h \
+       $(NT_INC)/unistd.h \
+       $(GNU_LIB)/min-max.h \
+       $(CONFIG_H) \
+       $(NTLIB_H)
 
 $(BLD)/profile.$(O) : \
-       $(SRC)/profile.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/lib-src/../src/config.h \
-       $(EMACS_ROOT)/lib-src/../src/systime.h
-
-$(BLD)/qsort.$(O) : \
-       $(SRC)/qsort.c
-
-$(BLD)/tcp.$(O) : \
-       $(SRC)/tcp.c
+       $(LIB_SRC)/profile.c \
+       $(GNU_LIB)/intprops.h \
+       $(CONFIG_H) \
+       $(INTTYPES_H) \
+       $(SYSTIME_H)
+
+$(BLD)/regex.$(O) : \
+       $(SRC)/regex.c \
+       $(SRC)/regex.h \
+       $(NT_INC)/stdbool.h \
+       $(NT_INC)/unistd.h \
+       $(CONFIG_H)
 
 $(BLD)/test-distrib.$(O) : \
-       $(SRC)/test-distrib.c
-
-$(BLD)/timer.$(O) : \
-       $(SRC)/timer.c \
-       $(EMACS_ROOT)/src/s/ms-w32.h \
-       $(EMACS_ROOT)/src/m/intel386.h \
-       $(EMACS_ROOT)/lib-src/../src/config.h
+       $(LIB_SRC)/test-distrib.c \
+       $(NT_INC)/unistd.h \
+       $(CONFIG_H)
 
 # The following dependencies are for supporting parallel builds, where
 # we must make sure $(BLD) exists before any compilation starts.
@@ -472,4 +471,4 @@ $(BLD)/test-distrib.$(O) $(MOVEMAILOBJS): stamp_BLD
 
 $(BLD)/emacsclient.$(O) $(BLD)/etags.$(O) $(BLD)/regex.$(O): stamp_BLD
 
-$(BLD)/ebrowse.$(O) $(BLD)/ctags.$(O): stamp_BLD
+$(BLD)/ebrowse.$(O) $(BLD)/ctags.$(O) $(BLD)/profile.$(O): stamp_BLD