1#**************************************************************
2#
3#  Licensed to the Apache Software Foundation (ASF) under one
4#  or more contributor license agreements.  See the NOTICE file
5#  distributed with this work for additional information
6#  regarding copyright ownership.  The ASF licenses this file
7#  to you under the Apache License, Version 2.0 (the
8#  "License"); you may not use this file except in compliance
9#  with the License.  You may obtain a copy of the License at
10#
11#    http://www.apache.org/licenses/LICENSE-2.0
12#
13#  Unless required by applicable law or agreed to in writing,
14#  software distributed under the License is distributed on an
15#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16#  KIND, either express or implied.  See the License for the
17#  specific language governing permissions and limitations
18#  under the License.
19#
20#**************************************************************
21
22
23
24PRJ=..$/..$/..
25PRJNAME=sal
26TARGET=uwinapi
27
28USE_DEFFILE=TRUE
29LIBTARGET=NO
30
31# --- Settings ----------------------------------
32
33.INCLUDE : settings.mk
34
35CFLAGS+= $(LFS_CFLAGS)
36CXXFLAGS+= $(LFS_CFLAGS)
37
38# --- Targets ----------------------------------
39
40
41.IF "$(GUI)"=="WNT"
42.IF "$(COM)"=="GCC"
43CFLAGSCXX+=-Wno-unused-parameter -Wno-return-type
44.ENDIF
45
46.IF "$(COMEX)"=="9"
47.IF "$(PSDK_HOME)"!=""
48# Since the 02/2003 PSDK the "new" linker is needed here.
49LINK=$(WRAPCMD) "$(PSDK_HOME)$/Bin$/Win64$/LINK.EXE"
50.ENDIF
51.ENDIF
52
53SLOFILES=\
54		$(SLO)$/ResolveThunk.obj\
55		$(SLO)$/SHCreateItemFromParsingName.obj\
56		$(SLO)$/snprintf.obj\
57		$(SLO)$/snwprintf.obj
58
59
60.IF "$(CPUNAME)"=="INTEL"
61SLOFILES+=\
62		$(SLO)$/CheckTokenMembership.obj\
63		$(SLO)$/CommandLineToArgvW.obj\
64		$(SLO)$/CopyFileExA.obj\
65		$(SLO)$/CopyFileExW.obj\
66		$(SLO)$/DrawStateW.obj\
67		$(SLO)$/EnumProcesses.obj\
68		$(SLO)$/GetLogicalDriveStringsW.obj\
69		$(SLO)$/GetLongPathNameA.obj\
70		$(SLO)$/GetLongPathNameW.obj\
71		$(SLO)$/GetModuleFileNameExA.obj\
72		$(SLO)$/GetModuleFileNameExW.obj\
73		$(SLO)$/GetProcessId.obj\
74		$(SLO)$/GetUserDefaultUILanguage.obj\
75		$(SLO)$/GetUserDomainA.obj\
76		$(SLO)$/GetUserDomainW.obj\
77		$(SLO)$/GetDiskFreeSpaceExA.obj\
78		$(SLO)$/GetDiskFreeSpaceExW.obj\
79		$(SLO)$/MoveFileExA.obj\
80		$(SLO)$/MoveFileExW.obj\
81		$(SLO)$/toolhelp.obj\
82		$(SLO)$/ResolveUnicows.obj\
83		$(SLO)$/FindFirstVolumeA.obj\
84		$(SLO)$/FindFirstVolumeW.obj\
85		$(SLO)$/FindNextVolumeA.obj\
86		$(SLO)$/FindNextVolumeW.obj\
87		$(SLO)$/FindVolumeClose.obj\
88		$(SLO)$/FindFirstVolumeMountPointA.obj\
89		$(SLO)$/FindFirstVolumeMountPointW.obj\
90		$(SLO)$/FindNextVolumeMountPointA.obj\
91		$(SLO)$/FindNextVolumeMountPointW.obj\
92		$(SLO)$/FindVolumeMountPointClose.obj\
93		$(SLO)$/GetVolumeNameForVolumeMountPointA.obj\
94		$(SLO)$/GetVolumeNameForVolumeMountPointW.obj\
95		$(SLO)$/DeleteVolumeMountPointA.obj\
96		$(SLO)$/DeleteVolumeMountPointW.obj\
97		$(SLO)$/GetVolumePathNameA.obj\
98		$(SLO)$/GetVolumePathNameW.obj\
99		$(SLO)$/SetVolumeMountPointA.obj\
100		$(SLO)$/SetVolumeMountPointW.obj\
101		$(SLO)$/PathAddBackslashW.obj\
102		$(SLO)$/PathCompactPathExW.obj\
103		$(SLO)$/PathFileExistsW.obj\
104		$(SLO)$/PathFindExtensionW.obj\
105		$(SLO)$/PathFindFileNameW.obj\
106		$(SLO)$/PathIsFileSpecW.obj\
107		$(SLO)$/PathIsUNCW.obj\
108		$(SLO)$/PathRemoveExtensionW.obj\
109		$(SLO)$/PathRemoveFileSpecW.obj\
110		$(SLO)$/PathSetDlgItemPathW.obj\
111		$(SLO)$/PathStripToRootW.obj
112.ENDIF
113
114SHL1TARGET=$(TARGET)
115SHL1IMPLIB=$(SHL1TARGET)
116SHL1DEF=$(MISC)/$(SHL1TARGET).def
117DEF1NAME=$(SHL1TARGET)
118.IF "$(COM)"=="GCC"
119DEF1EXPORTFILE=\
120	$(SHL1TARGET)_mingw.dxp\
121	unicows_mingw.dxp
122.ELSE
123DEF1EXPORTFILE=\
124	$(SHL1TARGET)64.dxp
125.IF "$(CPUNAME)"=="INTEL"
126DEF1EXPORTFILE+=\
127	$(SHL1TARGET).dxp\
128	unicows.dxp
129.ENDIF
130.ENDIF
131DEF1DEPN=\
132		$(DEF1EXPORTFILE)\
133		makefile.mk
134
135#SHL1VERINFO=$(SHL1TARGET).rc
136SHL1OBJS=$(SLOFILES)
137
138#No default libraries
139STDSHL=
140
141.IF "$(COM)"=="GCC"
142SHL1STDLIBS=\
143		-lmingw32 \
144		$(MINGW_LIBGCC)
145MINGWSSTDOBJ=
146MINGWSSTDENDOBJ=
147.ELSE
148SHL1STDLIBS=\
149		unicows.lib
150.ENDIF
151
152SHL1STDLIBS+=\
153		$(KERNEL32LIB)\
154		$(USER32LIB)\
155		$(ADVAPI32LIB)\
156		$(VERSIONLIB)\
157		$(LIBCMT)\
158		$(SHLWAPILIB)
159
160
161.ENDIF
162
163.IF "$(COM)"=="GCC"
164ALL: ALLTAR $(LB)$/libuwinapi.a
165
166$(LB)$/libuwinapi.a: $(MISC)$/uwinapi.def
167	dlltool --dllname uwinapi.dll --input-def=$(MISC)$/uwinapi.def --kill-at --output-lib=$(LB)$/libuwinapi.a
168.ENDIF
169
170.INCLUDE : target.mk
171