jdk/make/sun/jawt/Depend.mak
author duke
Sat, 01 Dec 2007 00:00:00 +0000
changeset 2 90ce3da70b43
permissions -rw-r--r--
Initial load
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
     2
# This makefile must be executed on a system with makedepend, such as Solaris.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
# In my copious amount of spare time, I hope to write a Java-based makedepend
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
# to eliminate this dependency (no pun intended). TB
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
BUILD_DIR = ../..
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
TOPDIR   = ../../..
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
STUBDIR = WindowsSystemHeaderStubs
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
BUILDSTUBDIR = BuildStubs
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
SHARE_SRC = $(TOPDIR)/src/share
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
SUN_SRC = $(SHARE_SRC)/native/sun
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
COMP_SRC = $(SUN_SRC)/awt/alphacomposite
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
DEBUG_SRC = $(SUN_SRC)/awt/debug
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
IMG_SRC = $(SUN_SRC)/awt/image
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
MEDIA_SRC = $(SUN_SRC)/awt/medialib
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
J2D_SRC  = $(SUN_SRC)/java2d
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
J2D_WINDOWS_SRC = $(WINDOWS_SRC)/native/sun/java2d
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
J2D_FONT_SRC = $(SUN_SRC)/font
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
LOOP_SRC = $(SUN_SRC)/java2d/loops
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
PIPE_SRC = $(SUN_SRC)/java2d/pipe
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
WINDOWS_SRC = $(TOPDIR)/src/windows
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
SRC = $(WINDOWS_SRC)/native/sun/windows
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
SRCDIRS = \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
	$(COMP_SRC) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
	$(DEBUG_SRC) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
	$(IMG_SRC) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
	$(IMG_SRC)/cvutils \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
	$(IMG_SRC)/gif \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
	$(MEDIA_SRC) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
	$(J2D_SRC) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
	$(J2D_FONT_SRC) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
	$(J2D_WINDOWS_SRC)/windows \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
	$(J2D_WINDOWS_SRC)/d3d \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
	$(J2D_WINDOWS_SRC)/opengl \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
	$(LOOP_SRC) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
	$(PIPE_SRC) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
	$(SRC)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
INCLUDES = \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
	   -I$(STUBDIR) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
	   -I$(BUILDSTUBDIR) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
	   -I$(SHARE_SRC)/javavm/export \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
	   -I$(WINDOWS_SRC)/javavm/export \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
	   -I$(SHARE_SRC)/native/common \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
	   -I$(WINDOWS_SRC)/native/common \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
	   -I$(SUN_SRC)/dc/doe \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
	   -I$(SUN_SRC)/dc/path \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
	   -I$(COMP_SRC) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
	   -I$(DEBUG_SRC) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
	   -I$(IMG_SRC) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
	   -I$(IMG_SRC)/cvutils \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
	   -I$(MEDIA_SRC) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
	   -I$(J2D_SRC) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
	   -I$(J2D_FONT_SRC) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
	   -I$(J2D_WINDOWS_SRC) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
	   -I$(J2D_WINDOWS_SRC)/windows \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
	   -I$(J2D_WINDOWS_SRC)/d3d \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
	   -I$(J2D_WINDOWS_SRC)/opengl \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
	   -I$(LOOP_SRC) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
	   -I$(PIPE_SRC) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
	   -I$(SRC)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
STUBFILES = \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
	$(STUBDIR)/ddraw.h \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
	$(STUBDIR)/Ole2.h \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
	$(STUBDIR)/d3d.h \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
	$(STUBDIR)/d3dx.h \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
	$(STUBDIR)/cderr.h \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
	$(STUBDIR)/commdlg.h \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
	$(STUBDIR)/direct.h \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
	$(STUBDIR)/imm.h \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
	$(STUBDIR)/ime.h \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
	$(STUBDIR)/io.h \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
	$(STUBDIR)/mmsystem.h \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
	$(STUBDIR)/new.h \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
	$(STUBDIR)/new \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
	$(STUBDIR)/shellapi.h \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
	$(STUBDIR)/shlobj.h \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
	$(STUBDIR)/tchar.h \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
	$(STUBDIR)/winbase.h \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
	$(STUBDIR)/windef.h \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
	$(STUBDIR)/windows.h \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
	$(STUBDIR)/winspool.h \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
	$(STUBDIR)/winuser.h \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
	$(STUBDIR)/wtypes.h
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
default: dependencies
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
FILES_cpp = jawt.cpp
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
dependencies:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
	rm -rf make.depend
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
	rm -rf make.tmp make.tmp2 make.tmp.bak
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
	rm -rf $(STUBDIR) $(BUILDSTUBDIR) depend.filelist
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
	for file in $(FILES_c) $(FILES_cpp) $(EXTRAFILES_c); do \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
	    for dir in $(SRCDIRS); do \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
	    	if [ -f $$dir/$$file ]; then \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
		    echo $$dir/$$file >>depend.filelist; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
		fi; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
	    	if [ -f $$dir/$${file}pp ]; then \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
		    echo $$dir/$${file}pp >>depend.filelist; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
		fi; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
	    done; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
	done
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
	touch make.tmp
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
	mkdir $(STUBDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
	touch $(STUBFILES)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
	mkdir $(BUILDSTUBDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
	gnumake -f Depend.mak classhdrstubs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
	cat depend.filelist | xargs -n 100 makedepend \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
		-DWIN32 -D_X86X -Dx86 -DDEBUG -D_MSC_VER -DMLIB_NO_LIBSUNMATH \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
		-a -f make.tmp -o.obj $(INCLUDES)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
	fgrep .obj make.tmp | sed -f Depend.sed | sort -u | nawk -f ../awt/CondenseRules.awk > make.depend
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
	rm -rf make.tmp make.tmp2 make.tmp.bak
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
	rm -rf $(STUBDIR) $(BUILDSTUBDIR) depend.filelist
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
include ../awt/FILES_export_windows.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
FILES_java = $(FILES_export) $(FILES_export2) $(FILES_export3)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
classhdrstubs:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
	for file in `echo $(FILES_java) | \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
		      tr ' ' '\n' | \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
		      sed -e 'y/\//_/' -e 's/\.java/.h/'`; do \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
	    echo "#include <jni.h>" > $(BUILDSTUBDIR)/$$file; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
	done