/[debburn]/cdrkit/trunk/Makefile
ViewVC logotype

Contents of /cdrkit/trunk/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 592 - (show annotations) (download)
Fri Dec 8 13:41:35 2006 UTC (6 years, 5 months ago) by blade
File size: 1816 byte(s)
Call cmake in the build dir when used with tweaks
1 ifneq ($(CFLAGS),)
2 CMAKETWEAKS += ( cd build ; cmake .. -DCMAKE_C_FLAGS="$(CFLAGS)" ) || exit 1;
3 endif
4
5 ifneq ($(LDFLAGS),)
6 CMAKETWEAKS += (cd build ; cmake .. -DCMAKE_EXE_LINKER_FLAGS:STRING="$(LDFLAGS)" -DCMAKE_MODULE_LINKER_FLAGS:STRING="$(LDFLAGS)" -DCMAKE_SHARED_LINKER_FLAGS:STRING="$(LDFLAGS)" ) || exit 1;
7 endif
8
9 ifneq ($(PREFIX),)
10 CMAKETWEAKS += ( cd build ; cmake .. -DCMAKE_INSTALL_PREFIX="$(PREFIX)") || exit 1;
11 endif
12
13 default_target: all
14
15 DISTNAME=cdrkit-$(shell cat VERSION)
16
17 build/Makefile:
18 @-mkdir build 2>/dev/null
19 cd build && cmake ..
20
21 cmakepurge:
22 rm -rf install_manifest.txt progress.make CMakeFiles CMakeCache.txt cmake_install.cmake
23 rm -rf */install_manifest.txt */progress.make */CMakeFiles */CMakeCache.txt */cmake_install.cmake
24 rm -rf */*/install_manifest.txt */*/progress.make */*/CMakeFiles */*/CMakeCache.txt */*/cmake_install.cmake
25 rm */Makefile */*/Makefile
26
27 clean:
28 rm -rf build
29
30 release:
31 # if test "$(shell svn status | grep -v -i make)" ; then echo Uncommited files found. Run \"svn status\" to display them. ; exit 1 ; fi
32 @if test -f ../$(DISTNAME).tar.gz ; then echo ../$(DISTNAME).tar.gz exists, not overwritting ; exit 1; fi
33 rm -rf tmp
34 mkdir tmp
35 svn export . tmp/$(DISTNAME)
36 rm -rf tmp/$(DISTNAME)/debian
37 tar -f - -c -C tmp $(DISTNAME) | gzip -9 > ../$(DISTNAME).tar.gz
38 rm -rf tmp
39 test -e /etc/debian_version && ln -f ../$(DISTNAME).tar.gz ../cdrkit_$(shell cat VERSION | sed -e "s,pre,~pre,").orig.tar.gz || true
40
41 #%::
42 # $(MAKE) $(MAKE_FLAGS) build/Makefile
43 # $(CMAKETWEAKS)
44 # $(MAKE) -C build $(MAKE_FLAGS) $@
45
46 # needs to be explicite, for PHONY and install (AKA INSTALL) file on cygwin
47 install: build/Makefile
48 $(CMAKETWEAKS)
49 $(MAKE) -C build $(MAKE_FLAGS) $@
50
51 all: build/Makefile
52 $(CMAKETWEAKS)
53 $(MAKE) -C build $(MAKE_FLAGS) $@
54
55 .PHONY: install all
56
57

  ViewVC Help
Powered by ViewVC 1.1.5