1 # Makefile.win for Win32 APR alone
5 # buildall - compile everything
6 # checkall - run APR regression tests
7 # install - compile everything
8 # clean - mop up everything
10 # You can override the build mechanism, choose only one;
12 # USEMAK=1 - compile from exported make files
13 # USEDSW=1 - compile from .dsw / .dsp VC6 projects
14 # USESLN=1 - compile from converted .sln / .vcproj VC7+ files
16 # Define ARCH to your desired preference (your PATH must point
17 # to the correct compiler tools!) Choose only one;
19 # ARCH="Win32 Release"
21 # ARCH="Win32 Release9x"
22 # ARCH="Win32 Debug9x"
28 # nmake -f Makefile.win PREFIX=C:\APR buildall checkall install clean
31 !IF EXIST("apr.sln") && ([devenv /help > NUL 2>&1] == 0) \
32 && !defined(USEMAK) && !defined(USEDSW)
36 !ELSEIF EXIST("apr.mak") && !defined(USEDSW)
48 !IF [$(COMSPEC) /c cl /nologo /? \
49 | $(SystemRoot)\System32\find.exe "x64" >NUL ] == 0
55 !MESSAGE ARCH = $(ARCH)
56 !MESSAGE PREFIX = $(PREFIX) (install path)
59 # Utility and Translation things, nothing here for the user
61 !IF "$(ARCH)" == "Win32 Release"
65 !ELSEIF "$(ARCH)" == "Win32 Debug"
69 !ELSEIF "$(ARCH)" == "Win32 Release9x"
70 SLNARCH=Release9x|Win32
73 !ELSEIF "$(ARCH)" == "Win32 Debug9x"
77 !ELSEIF "$(ARCH)" == "x64 Release"
79 ARCHOSPATH=x64\Release
81 !ELSEIF "$(ARCH)" == "x64 Debug"
88 # Only default the behavior if MAKEOPT= is omitted
90 # Microsoft NMake options
92 !ELSEIF "$(MAKE)" == "make"
93 # Borland make options? Not really supported (yet)
99 all: buildall checkall
104 $(MAKE) $(MAKEOPT) -f Makefile.win ARCH="$(ARCH)" \
105 CTARGET=CLEAN buildall
108 $(MAKE) $(MAKEOPT) -f apr.mak CFG="apr - $(ARCH)" RECURSE=0 $(CTARGET)
109 $(MAKE) $(MAKEOPT) -f libapr.mak CFG="libapr - $(ARCH)" RECURSE=0 $(CTARGET)
111 $(MAKE) $(MAKEOPT) -f aprapp.mak CFG="aprapp - $(ARCH)" RECURSE=0 $(CTARGET)
112 $(MAKE) $(MAKEOPT) -f libaprapp.mak CFG="libaprapp - $(ARCH)" RECURSE=0 $(CTARGET)
115 !ELSEIF $(USESLN) == 1
118 -devenv apr.sln /useenv /clean "$(SLNARCH)" /project libaprapp
119 -devenv apr.sln /useenv /clean "$(SLNARCH)" /project libapr
120 -devenv apr.sln /useenv /clean "$(SLNARCH)" /project aprapp
121 -devenv apr.sln /useenv /clean "$(SLNARCH)" /project apr
124 devenv apr.sln /useenv /build "$(SLNARCH)" /project apr
125 devenv apr.sln /useenv /build "$(SLNARCH)" /project aprapp
126 devenv apr.sln /useenv /build "$(SLNARCH)" /project libapr
127 devenv apr.sln /useenv /build "$(SLNARCH)" /project libaprapp
133 -msdev apr.dsw /USEENV /MAKE "libaprapp - $(ARCH)" /CLEAN
134 -msdev apr.dsw /USEENV /MAKE "libapr - $(ARCH)" /CLEAN
135 -msdev apr.dsw /USEENV /MAKE "aprapp - $(ARCH)" /CLEAN
136 -msdev apr.dsw /USEENV /MAKE "apr - $(ARCH)" /CLEAN
139 @msdev apr.dsw /USEENV /MAKE "apr - $(ARCH)"
140 @msdev apr.dsw /USEENV /MAKE "aprapp - $(ARCH)"
141 @msdev apr.dsw /USEENV /MAKE "libapr - $(ARCH)"
142 @msdev apr.dsw /USEENV /MAKE "libaprapp - $(ARCH)"
149 $(MAKE) $(MAKEOPT) -f Makefile.win MODEL=static \
150 OUTDIR=$(LIBSOSPATH) check
151 $(MAKE) $(MAKEOPT) -f Makefile.win MODEL=dynamic \
152 OUTDIR=$(ARCHOSPATH) check
161 @if NOT EXIST "$(PREFIX)\." mkdir "$(PREFIX)"
162 @if NOT EXIST "$(PREFIX)\bin\." mkdir "$(PREFIX)\bin"
163 @if NOT EXIST "$(PREFIX)\include\." mkdir "$(PREFIX)\include"
164 @if NOT EXIST "$(PREFIX)\lib\." mkdir "$(PREFIX)\lib"
165 copy CHANGES "$(PREFIX)\APR-CHANGES.txt" <.y
166 copy LICENSE "$(PREFIX)\APR-LICENSE.txt" <.y
167 copy NOTICE "$(PREFIX)\APR-NOTICE.txt" <.y
168 xcopy include\*.h "$(PREFIX)\include\" /d < .a
169 copy $(LIBSOSPATH)\apr-1.lib "$(PREFIX)\lib\" <.y
170 copy $(LIBSOSPATH)\apr-1.pdb "$(PREFIX)\lib\" <.y
171 copy $(LIBSOSPATH)\aprapp-1.lib "$(PREFIX)\lib\" <.y
172 copy $(LIBSOSPATH)\aprapp-1.pdb "$(PREFIX)\lib\" <.y
173 copy $(ARCHOSPATH)\libaprapp-1.lib "$(PREFIX)\lib\" <.y
174 copy $(ARCHOSPATH)\libaprapp-1.pdb "$(PREFIX)\lib\" <.y
175 copy $(ARCHOSPATH)\libapr-1.lib "$(PREFIX)\lib\" <.y
176 copy $(ARCHOSPATH)\libapr-1.exp "$(PREFIX)\lib\" <.y
177 copy $(ARCHOSPATH)\libapr-1.dll "$(PREFIX)\bin\" <.y
178 copy $(ARCHOSPATH)\libapr-1.pdb "$(PREFIX)\bin\" <.y