/[pcsx2_0.9.7]/trunk/debian-upstream/rules_fglrx
ViewVC logotype

Contents of /trunk/debian-upstream/rules_fglrx

Parent Directory Parent Directory | Revision Log Revision Log


Revision 273 - (show annotations) (download)
Fri Nov 12 01:10:22 2010 UTC (9 years ago) by william
File size: 2759 byte(s)
Auto Commited Import of: pcsx2-0.9.7-DEBUG (upstream: v0.9.7.4013 local: v0.9.7.197-latest) in ./trunk
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3
4 # Uncomment this to turn on verbose mode.
5 # export DH_VERBOSE=1
6
7 ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
8 CMAKE_BUILD_TYPE=Debug
9 else
10 CMAKE_BUILD_TYPE=Release
11 endif
12
13 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
14 NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
15 MAKEFLAGS += -j$(NUMJOBS)
16 endif
17
18 USER_CFLAGS=$(shell dpkg-buildflags --get CFLAGS)
19 USER_CXXFLAGS=$(shell dpkg-buildflags --get CXXFLAGS)
20
21 build: build-stamp
22 build-stamp:
23 dh_testdir
24
25 # backup orig makefile
26 for makefile in `find ./ -name "Makefile"` ; do [ -f $${makefile}.orig ] || mv $${makefile} $${makefile}.orig ; done
27
28 # Cmake based makefile
29 cmake CMakeLists.txt \
30 -DCMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE) \
31 -DCMAKE_BUILD_STRIP=FALSE \
32 -DFORCE_INTERNAL_SOUNDTOUCH=FALSE \
33 -DUSER_CMAKE_C_FLAGS:STRING="$(USER_CFLAGS)" \
34 -DUSER_CMAKE_CXX_FLAGS:STRING="$(USER_CXXFLAGS)"
35 $(MAKE) $(MAKEFLAGS)
36
37 touch build-stamp
38
39 clean:
40 dh_testdir
41 dh_testroot
42 rm -f build-stamp
43
44 # Backup some orig makefile if it's not already done.
45 # I hope that some will be delete by upstream when the cmake port is over.
46 # Note: In case that we do not dl all the plugins, the test [ -f $${makefile} ] ensures it works
47 for makefile in plugins/CDVDlinuz/Src/Linux/Makefile \
48 plugins/CDVDiso/src/Linux/Makefile \
49 plugins/CDVDiso/src/Windows/Makefile \
50 plugins/USBnull/Windows/Makefile \
51 plugins/FWnull/Windows/Makefile \
52 plugins/PeopsSPU2/Makefile \
53 plugins/CDVDisoEFP/src/Linux/Makefile ; do \
54 [ -f $${makefile}.orig ] || ( [ -f $${makefile} ] && mv $${makefile} $${makefile}.orig ) || true ; done
55
56 # Add here the commands to clean up after the build process.
57 [ -f Makefile ] && $(MAKE) clean || true
58 # Remove cmake stuff
59 rm -fr $$(find . -type d -name CMakeFiles)
60 rm -f $$(find . -type f -name CMakeCache.txt) $$(find . -type f -name cmake_install.cmake)
61 rm -f $$(find . -type f -name Makefile)
62 # Files generated by bin2cpp
63 cd pcsx2/gui/Resources/ && rm -f App*.h Config*.h BackgroundLogo.h ButtonIcon_Camera.h Dualshock.h
64 # leftover of cmake
65 rm -f bin/plugins/ps2hw.dat
66 rm -f pcsx2/svnrev.h
67 # Restore orig makefile
68 for makefile_orig in `find ./ -name "Makefile.orig"` ; do [ -f $${makefile_orig} ] && mv $${makefile_orig} `echo $${makefile_orig} | sed -e 's/.orig//'` ; done
69
70 dh_clean
71
72 # Allow compilation when fglrx is installed
73 override_dh_shlibdeps:
74 dh_shlibdeps -- --ignore-missing-info
75
76 override_dh_strip:
77 dh_strip --package=pcsx2 --dbg-package=pcsx2-dbg
78 dh_strip --package=pcsx2-plugins --dbg-package=pcsx2-plugins-dbg
79
80 # Avoid to relaunch the compilation twice. (build and dh_auto_build target)
81 override_dh_auto_build:
82 # Do nothing
83
84 %:
85 dh $@ --parallel
86
87 .PHONY: build clean install

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.22