comparison buildsys/nmake/common.nmake @ 0:3e629dc19168

initial from svn dyncall-1745
author Daniel Adler
date Thu, 19 Mar 2015 22:24:28 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:3e629dc19168
1 #//////////////////////////////////////////////////////////////////////////////
2 #
3 # Copyright (c) 2007,2009 Daniel Adler <dadler@uni-goettingen.de>,
4 # Tassilo Philipp <tphilipp@potion-studios.com>
5 #
6 # Permission to use, copy, modify, and distribute this software for any
7 # purpose with or without fee is hereby granted, provided that the above
8 # copyright notice and this permission notice appear in all copies.
9 #
10 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 #
18 #//////////////////////////////////////////////////////////////////////////////
19
20 #///////////////////////////////////////////////////
21 #
22 # common nmake rules
23 # common.nmake
24 #
25 #///////////////////////////////////////////////////
26
27
28 build: dirs $(TARGETS)
29
30
31 dirs: $(DIRS)
32 !IF DEFINED(DIRS) && "$(DIRS)" != ""
33 !echo Handling sub-directory $** ... && cd $** && $(MAKE) /NOLOGO /F Nmakefile && cd ..
34 # !echo Handling sub-directory $** ... && cd $** && $(MAKE) /NOLOGO /F Nmakefile $** && cd ..
35 !ENDIF
36
37
38 clean: $(DIRS)
39 !IF DEFINED(DIRS) && "$(DIRS)" != ""
40 !echo Handling sub-directory $** ... && cd $** && $(MAKE) /NOLOGO /F Nmakefile $@ && cd ..
41 !ENDIF
42 !IF (DEFINED(TARGETS) && "$(TARGETS)" != "") || (DEFINED(OBJS) && "$(OBJS)" != "")
43 echo Cleaning $(MAKEDIR) ...
44 del $(TARGETS) *.exp *.lib $(OBJS)
45 # del $(TARGETS) $(TARGETS:.exe=.lib) $(TARGETS:.dll=.lib) $(TARGETS:.exe=.exp) $(TARGETS:.dll=.exp) $(OBJS)
46 !ENDIF
47
48
49 distclean: $(DIRS)
50 !IF DEFINED(DIRS) && "$(DIRS)" != ""
51 !echo Handling sub-directory $** ... && cd $** && $(MAKE) /NOLOGO /F Nmakefile $@ && cd ..
52 !ENDIF
53 !IF DEFINED(AUTOS) && "$(AUTOS)" != ""
54 echo Cleaning auto-generated files in $(MAKEDIR) ...
55 del $(AUTOS)
56 !ENDIF
57 !IF (DEFINED(TARGETS) && "$(TARGETS)" != "") || (DEFINED(OBJS) && "$(OBJS)" != "")
58 echo Cleaning $(MAKEDIR) ...
59 del $(TARGETS) *.exp *.lib $(OBJS)
60 # del $(TARGETS) $(TARGETS:.exe=.lib) $(TARGETS:.dll=.lib) $(TARGETS:.exe=.exp) $(TARGETS:.dll=.exp) $(OBJS)
61 !ENDIF