xref: /AOO41X/main/sal/systools/win32/uwinapi/makefile.mk (revision 7871dc3ea494bf86c742e1f4dfc9c6e20f5bcb2a)
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)$/CheckTokenMembership.obj\
55        $(SLO)$/CommandLineToArgvW.obj\
56        $(SLO)$/CopyFileExA.obj\
57        $(SLO)$/CopyFileExW.obj\
58        $(SLO)$/DrawStateW.obj\
59        $(SLO)$/EnumProcesses.obj\
60        $(SLO)$/GetLogicalDriveStringsW.obj\
61        $(SLO)$/GetLongPathNameA.obj\
62        $(SLO)$/GetLongPathNameW.obj\
63        $(SLO)$/GetModuleFileNameExA.obj\
64        $(SLO)$/GetModuleFileNameExW.obj\
65        $(SLO)$/GetProcessId.obj\
66        $(SLO)$/GetUserDefaultUILanguage.obj\
67        $(SLO)$/GetUserDomainA.obj\
68        $(SLO)$/GetUserDomainW.obj\
69        $(SLO)$/GetDiskFreeSpaceExA.obj\
70        $(SLO)$/GetDiskFreeSpaceExW.obj\
71        $(SLO)$/MoveFileExA.obj\
72        $(SLO)$/MoveFileExW.obj\
73        $(SLO)$/toolhelp.obj\
74        $(SLO)$/ResolveThunk.obj\
75        $(SLO)$/ResolveUnicows.obj\
76        $(SLO)$/snprintf.obj\
77        $(SLO)$/snwprintf.obj\
78        $(SLO)$/FindFirstVolumeA.obj\
79        $(SLO)$/FindFirstVolumeW.obj\
80        $(SLO)$/FindNextVolumeA.obj\
81        $(SLO)$/FindNextVolumeW.obj\
82        $(SLO)$/FindVolumeClose.obj\
83        $(SLO)$/FindFirstVolumeMountPointA.obj\
84        $(SLO)$/FindFirstVolumeMountPointW.obj\
85        $(SLO)$/FindNextVolumeMountPointA.obj\
86        $(SLO)$/FindNextVolumeMountPointW.obj\
87        $(SLO)$/FindVolumeMountPointClose.obj\
88        $(SLO)$/GetVolumeNameForVolumeMountPointA.obj\
89        $(SLO)$/GetVolumeNameForVolumeMountPointW.obj\
90        $(SLO)$/DeleteVolumeMountPointA.obj\
91        $(SLO)$/DeleteVolumeMountPointW.obj\
92        $(SLO)$/GetVolumePathNameA.obj\
93        $(SLO)$/GetVolumePathNameW.obj\
94        $(SLO)$/SetVolumeMountPointA.obj\
95        $(SLO)$/SetVolumeMountPointW.obj\
96        $(SLO)$/PathAddBackslashW.obj\
97        $(SLO)$/PathCompactPathExW.obj\
98        $(SLO)$/PathFileExistsW.obj\
99        $(SLO)$/PathFindExtensionW.obj\
100        $(SLO)$/PathFindFileNameW.obj\
101        $(SLO)$/PathIsFileSpecW.obj\
102        $(SLO)$/PathIsUNCW.obj\
103        $(SLO)$/PathRemoveExtensionW.obj\
104        $(SLO)$/PathRemoveFileSpecW.obj\
105        $(SLO)$/PathSetDlgItemPathW.obj\
106        $(SLO)$/PathStripToRootW.obj\
107        $(SLO)$/SHCreateItemFromParsingName.obj
108
109SHL1TARGET=$(TARGET)
110SHL1IMPLIB=$(SHL1TARGET)
111SHL1DEF=$(MISC)/$(SHL1TARGET).def
112DEF1NAME=$(SHL1TARGET)
113.IF "$(COM)"=="GCC"
114DEF1EXPORTFILE=\
115    $(SHL1TARGET)_mingw.dxp\
116    unicows_mingw.dxp
117.ELSE
118DEF1EXPORTFILE=\
119    $(SHL1TARGET).dxp\
120    unicows.dxp
121.ENDIF
122DEF1DEPN=\
123        $(DEF1EXPORTFILE)\
124        makefile.mk
125
126#SHL1VERINFO=$(SHL1TARGET).rc
127SHL1OBJS=$(SLOFILES)
128
129#No default libraries
130STDSHL=
131
132.IF "$(COM)"=="GCC"
133SHL1STDLIBS=\
134        -lmingw32 \
135        $(MINGW_LIBGCC)
136MINGWSSTDOBJ=
137MINGWSSTDENDOBJ=
138.ELSE
139SHL1STDLIBS=\
140        unicows.lib
141.ENDIF
142
143SHL1STDLIBS+=\
144        $(KERNEL32LIB)\
145        $(USER32LIB)\
146        $(ADVAPI32LIB)\
147        $(VERSIONLIB)\
148        $(LIBCMT)\
149        $(SHLWAPILIB)
150
151
152.ENDIF
153
154.IF "$(COM)"=="GCC"
155ALL: ALLTAR $(LB)$/libuwinapi.a
156
157$(LB)$/libuwinapi.a: $(MISC)$/uwinapi.def
158    dlltool --dllname uwinapi.dll --input-def=$(MISC)$/uwinapi.def --kill-at --output-lib=$(LB)$/libuwinapi.a
159.ENDIF
160
161.INCLUDE : target.mk
162