]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - board/MAI/bios_emulator/scitech/makedefs/common.mk
* Patch by Thomas Frieden, 13 Nov 2002:
[karo-tx-uboot.git] / board / MAI / bios_emulator / scitech / makedefs / common.mk
1 #############################################################################
2 #
3 #                                       SciTech Multi-platform Graphics Library
4 #
5 #  ========================================================================
6 #
7 #    The contents of this file are subject to the SciTech MGL Public
8 #    License Version 1.0 (the "License"); you may not use this file
9 #    except in compliance with the License. You may obtain a copy of
10 #    the License at http://www.scitechsoft.com/mgl-license.txt
11 #
12 #    Software distributed under the License is distributed on an
13 #    "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
14 #    implied. See the License for the specific language governing
15 #    rights and limitations under the License.
16 #
17 #    The Original Code is Copyright (C) 1991-1998 SciTech Software, Inc.
18 #
19 #    The Initial Developer of the Original Code is SciTech Software, Inc.
20 #    All Rights Reserved.
21 #
22 #  ========================================================================
23 #
24 # Descripton:   Common makefile targets used by all SciTech Software
25 #               makefiles. This file includes targets for cleaning the
26 #               current directory, and maintaining the source files with
27 #               RCS.
28 #
29 #############################################################################
30
31 # Override global OpenGL includes when compiling against MGL version
32
33 .IF $(USE_MGL_OPENGL)
34 .IF $(UNIX_HOST)
35 CFLAGS          += -I$(SCITECH)/include/mglgl
36 DEPEND_INC      += $(SCITECH)/include/mglgl
37 .ELSE
38 CFLAGS          += -I$(SCITECH)\include\mglgl
39 DEPEND_INC      += $(SCITECH)\include/mglgl
40 .ENDIF
41 .ENDIF
42
43 # Define where to install all compiled DLL files
44
45 .IF $(UNIX_HOST)
46 .IF $(CHECKED)
47 DLL_DEST    := $(SCITECH_LIB)/redist/debug
48 .ELSE
49 DLL_DEST    := $(SCITECH_LIB)/redist/release
50 .ENDIF
51 .ELSE
52 .IF $(CHECKED)
53 DLL_DEST    := $(SCITECH_LIB)\redist\debug
54 .ELSE
55 DLL_DEST    := $(SCITECH_LIB)\redist\release
56 .ENDIF
57 .ENDIF
58
59 # Target to build the library and DLL file if specified
60
61 .IF $(LIBFILE)
62
63 lib: $(LIBFILE)
64
65 .IF $(DLLFILE)
66
67 # Build and install a DLL file, or simply build import library and install
68
69 .IF $(BUILD_DLL)
70
71 $(DLLFILE): $(OBJECTS)
72 $(LIBFILE): $(DLLFILE)
73 install: $(LIBFILE) $(DLLFILE)
74         $(INSTALL) $(LIBFILE) $(LIB_DEST)$(LIB_EXTENDER)
75         $(INSTALL) $(DLLFILE) $(DLL_DEST)
76 .IF $(USE_SOFTICE)
77         $(INSTALL) $(DLLFILE:s/.dll/.nms) $(DLL_DEST)
78 .ENDIF
79 .ELSE
80
81 $(LIBFILE): $(DLL_DEST)\$(DLLFILE)
82 install: $(LIBFILE)
83         $(INSTALL) $(LIBFILE) $(LIB_DEST)$(LIB_EXTENDER)
84
85 .ENDIF
86 .ELSE
87
88 .IF $(BUILD_DLL)
89
90 # Build and install a Unix shared library
91
92 $(LIBFILE): $(OBJECTS)
93 install: $(LIBFILE)
94         $(INSTALL) $(LIBFILE) $(LIB_DEST)$(LIB_EXTENDER)
95         $(INSTALL) $(LIBFILE) $(DLL_DEST)/$(LIBFILE).$(VERSION)
96
97 .ELSE
98
99 # Build and install a normal library file
100
101 .IF $(USE_DLL)
102 .ELSE
103 $(LIBFILE): $(OBJECTS)
104 install: $(LIBFILE)
105         $(INSTALL) $(LIBFILE) $(LIB_DEST)$(LIB_EXTENDER)
106 .ENDIF
107 .ENDIF
108 .ENDIF
109 .ENDIF
110
111 # Build and install a VxD file, including debug information
112
113 .IF $(VXDFILE)
114 $(VXDFILE:s/.vxd/.dll): $(OBJECTS)
115 $(VXDFILE): $(VXDFILE:s/.vxd/.dll)
116 install: $(VXDFILE)
117         $(INSTALL) $(VXDFILE) $(DLL_DEST)
118 .IF $(DBG)
119         $(INSTALL) $(VXDFILE:s/.vxd/.nms) $(DLL_DEST)
120 .ENDIF
121 .ENDIF
122
123 # Clean up directory removing all files not needed to make the library.
124
125 __CLEAN_FILES := *.obj *.o *.sym *.bak *.tdk *.swp *.map *.err *.csm *.lib *.aps *.nms *.sys
126 __CLEAN_FILES += *.~* *.td *.tr *.tr? *.td? *.rws *.res *.exp *.ilk *.pdb *.pch *.a bcc32.*
127 __CLEAN_FILES += $(LIBCLEAN)
128 __CLEANEXE_FILES := $(__CLEAN_FILES) *$E *.drv *.rex *.dll *.vxd *.nms *.pel *.smf *.so.*
129
130 .PHONY clean:
131         @$(RM) -f -S $(mktmp $(__CLEAN_FILES:t"\n"))
132
133 .PHONY cleanexe:
134         @$(RM) -f -S $(mktmp $(__CLEANEXE_FILES:t"\n"))
135
136 # Define the source directories to find common files
137
138 .IF $(NO_SCITECH_COMMON)
139 .ELSE
140 .SOURCE:                   $(SCITECH)/src/common
141 .ENDIF
142
143 # Create the include file dependencies using the MKUTIL makedep program if
144 # the list of dependent object files is defined
145
146 .IF $(DEPEND_OBJ)
147 depend:
148         @$(RM) -f makefile.dep
149 .IF $(DEPEND_SRC)
150 .IF $(DEPEND_INC)
151         @makedep -amakefile.dep -r -s -I@$(mktmp $(DEPEND_INC:s/\/\\)) -S@$(mktmp $(DEPEND_SRC:s/\/\\);$(SCITECH)/src/common) @$(mktmp $(DEPEND_OBJ:t"\n")\n)
152 .ELSE
153         @makedep -amakefile.dep -r -s -S@$(mktmp $(DEPEND_SRC:s/\/\\);$(SCITECH)/src/common) @$(mktmp $(DEPEND_OBJ:t"\n")\n)
154 .ENDIF
155 .ELSE
156 .IF $(DEPEND_INC)
157         @makedep -amakefile.dep -r -s -I@$(mktmp $(DEPEND_INC:s/\/\\)) -S@$(mktmp $(SCITECH)/src/common) @$(mktmp $(DEPEND_OBJ:t"\n")\n)
158 .ELSE
159         @makedep -amakefile.dep -r -s -S@$(mktmp $(SCITECH)/src/common) @$(mktmp $(DEPEND_OBJ:t"\n")\n)
160 .ENDIF
161 .ENDIF
162         @$(ECHO) Object file dependency information generated.
163 .ENDIF
164
165 # Set up for compiling Snap executeables and dynamic link libraries
166
167 .IF $(USE_SNAP)
168 #CFLAGS         += -I$(PRIVATE)\include\drvlib -I$(SCITECH)\include\drvlib -D__SNAP__
169 CFLAGS          += -D__SNAP__
170 ASFLAGS         += -d__SNAP__
171 #EXELIBS                += snap$L
172 .ENDIF
173
174 # Include rule definitions for the compiler
175
176 .INCLUDE: "$(SCITECH)/makedefs/rules/$(RULES_MAK)"
177
178 # Include file dependencies
179
180 .INCLUDE .IGNORE: "makefile.dep"
181