~ubuntu-branches/ubuntu/karmic/libsmbios/karmic

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Jose Luis Tallon
  • Date: 2007-04-22 13:04:55 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20070422130455-t40zo63zf23cip6t
Tags: 0.13.6-1
* New upstream version
  - Adds complete support for EFI (i.e. intel-based Macs)

* Fixed FTBFS with gcc4.3 (missing includes) (Closes: #418621)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/make 
2
 
# vim:noet:ai:ts=8:sw=8:filetype=make:nocindent:textwidth=0:
3
 
#
4
 
# Copyright (C) 2005 Dell Inc.
5
 
#  by Michael Brown <Michael_E_Brown@dell.com>
6
 
# Licensed under the Open Software License version 2.1 
7
 
8
 
# Alternatively, you can redistribute it and/or modify 
9
 
# it under the terms of the GNU General Public License as published 
10
 
# by the Free Software Foundation; either version 2 of the License, 
11
 
# or (at your option) any later version.
12
 
#
13
 
# This program is distributed in the hope that it will be useful, but 
14
 
# WITHOUT ANY WARRANTY; without even the implied warranty of 
15
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
16
 
# See the GNU General Public License for more details.
17
 
#
18
 
# Note that all 'module.mk' files are "include"-ed in this file and
19
 
# fall under the same license.
20
 
21
 
# This is a standard non-recursive make system.
22
 
#
23
 
 
24
 
  include version.mk
25
 
  RELEASE_VERSION := $(RELEASE_MAJOR).$(RELEASE_MINOR).$(RELEASE_SUBLEVEL)$(RELEASE_EXTRALEVEL)
26
 
  RELEASE_STRING := $(RELEASE_NAME)-$(RELEASE_VERSION)
27
 
  RPM_RELEASE := 1
28
 
 
29
 
  BUILD_DATE := $(shell date "+%Y-%m-%d %H:%M:%S")
30
 
 
31
 
#Standard Compiler Flags  
32
 
        # To pass in extra args to CFLAGS, CXXFLAGS, or LDFLAGS, use the EXTRA_* 
33
 
        # versions from make's command line (see below)
34
 
  CXXFLAGS += -DBUILD_DATE="$(BUILD_DATE)" -g -Wall -W -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE  -D_GNU_SOURCE 
35
 
  CFLAGS += -DBUILD_DATE="$(BUILD_DATE)" -g -Wall -W -Wbad-function-cast -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE  -D_GNU_SOURCE
36
 
  LDFLAGS += -Llib/ $(EXTRA_LDFLAGS)
37
 
 
38
 
WARNINGS=-Wpointer-arith -Wfloat-equal -Wcast-qual -Wcast-align -Wwrite-strings -Wredundant-decls -Winline 
39
 
WARNINGS_CXX=-Wabi -Wctor-dtor-privacy -Wnon-virtual-dtor  -Wreorder -Woverloaded-virtual -Wsign-promo  -Wsynth -Wold-style-cast
40
 
# Would like to enable, but too many stupid warnings. (comma at end of enumerator list, anonymous structs
41
 
# -pedantic
42
 
# would like to enable, but cannot (too many warnings in system headers.).
43
 
#-Weffc++ 
44
 
NO_WARN=-Wno-long-long -Wno-inline
45
 
 
46
 
#Standard include locations
47
 
  CXXFLAGS += -Ilibraries/common/ -Iinclude/ -Llib/ $(EXTRA_CXXFLAGS) $(WARNINGS) $(WARNINGS_CXX) $(NO_WARN) -O2
48
 
  CFLAGS += -Ilibraries/common/ -Iinclude/ -Llib/ $(EXTRA_CFLAGS) $(WARNINGS) $(NO_WARN) -O2
49
 
 
50
 
#Release history:
51
 
# 0.1.0 == 22 Dec 2001 initial import into CVS.
52
 
 
53
 
#--------------------------------------------
54
 
# Generic Makefile stuff is below. You
55
 
#  should not have to modify any of the stuff
56
 
#  below.
57
 
#--------------------------------------------
58
 
 
59
 
  default: noxml
60
 
  nothing:
61
 
 
62
 
#Included makefiles will add their deps for each stage in these vars:
63
 
  RPMS := 
64
 
 
65
 
  INSTALL_LIST :=
66
 
  INSTALL_DEPS :=
67
 
 
68
 
  CLEAN_LIST := 
69
 
  CLEAN_DEPS :=
70
 
 
71
 
  DISTCLEAN_LIST :=
72
 
  DISTCLEAN_DEPS :=
73
 
 
74
 
  ALL_DEPS :=
75
 
  BASE_BINS :=
76
 
  BASE_BINS_STATIC :=
77
 
  BASE_LIBS :=
78
 
  BASE_STATIC_LIBS :=
79
 
  BASE_STATIC_DEBUG_LIBS :=
80
 
  EXT_BINS :=
81
 
  EXT_BINS_STATIC :=
82
 
  EXT_LIBS :=
83
 
        
84
 
 
85
 
#Define the top-level build directory
86
 
  BUILDDIR := $(shell pwd)
87
 
 
88
 
  include build/Rules.make-linux
89
 
  include build/Rules.make-common
90
 
 
91
 
  dir:=libraries
92
 
  include libraries/module.mk
93
 
 
94
 
  dir:=cppunit
95
 
  include cppunit/module.mk
96
 
 
97
 
  dir:=doc
98
 
  include doc/module.mk
99
 
 
100
 
  dir:=bins
101
 
  include bins/module.mk
102
 
 
103
 
  dir:=supported-bins
104
 
  include supported-bins/module.mk
105
 
 
106
 
  include common.mk
107
 
 
108
 
#Include the docs in the build
109
 
#  doc_FILES += COPYING INSTALL README
110
 
 
111
 
  all:  $(ALL_DEPS) 
112
 
  minimal: $(BASE_BINS) 
113
 
  static: $(BASE_BINS_STATIC) $(EXT_BINS_STATIC)
114
 
 
115
 
  clean: clean_list $(CLEAN_DEPS) 
116
 
  clean_list:
117
 
        rm -rf $(CLEAN_LIST)
118
 
 
119
 
  distclean: clean distclean_list $(DISTCLEAN_DEPS) 
120
 
  distclean_list:
121
 
        rm -rf $(DISTCLEAN_LIST)
122
 
 
123
 
  install_list: $(INSTALL_LIST)
124
 
  install: all $(INSTALL_DEPS) install_list
125
 
 
126
 
  .PHONY: tarball rpm
127
 
  tarball: $(RELEASE_STRING).tar.bz2
128
 
  zip: $(RELEASE_STRING).zip
129
 
  rpm: $(RPMS)
130
 
 
131
 
  .PHONY: version
132
 
  version:
133
 
        @echo "Libsmbios Version: $(RELEASE_VERSION)"
134
 
 
135
 
  $(RELEASE_STRING).zip $(RELEASE_STRING).tar.bz2: $(shell find . -name \*.cpp -o -name \*.h -o -name \*.mk -o -name \*.hpp -o -name \*.in ) Makefile 
136
 
        $(SIL)[ ! -e $(RELEASE_STRING) ] || rm -rf $(RELEASE_STRING)
137
 
        $(SIL)[ ! -e $(RELEASE_STRING).tar.bz2 ] || rm -rf $(RELEASE_STRING).tar.bz2
138
 
        $(SIL)[ ! -e $(RELEASE_STRING).zip ] || rm -rf $(RELEASE_STRING).zip
139
 
        find . -depth | grep -v ^./$(RELEASE_STRING) | grep -v ^rpm/ | cpio -pdm $(RELEASE_STRING) 
140
 
        rm -f $(RELEASE_STRING)/include/smbios/version.h
141
 
        $(SIL)make -s -C $(RELEASE_STRING) include/smbios/version.h
142
 
        $(SIL)make -s -C $(RELEASE_STRING) libsmbios.spec
143
 
        $(SIL)make -s -C $(RELEASE_STRING) libraries/common/StdSmbiosXml.h
144
 
        $(SIL)mv $(RELEASE_STRING)/libraries/common/StdSmbiosXml.h $(RELEASE_STRING)/libraries/common/StdSmbiosXml.h-save
145
 
        $(SIL)make -s -C $(RELEASE_STRING) distclean
146
 
        $(SIL)mv $(RELEASE_STRING)/libraries/common/StdSmbiosXml.h-save $(RELEASE_STRING)/libraries/common/StdSmbiosXml.h
147
 
        $(SIL)find $(RELEASE_STRING) -name \*.d -exec rm {} \;
148
 
        tar cjf $(RELEASE_STRING).tar.bz2 $(RELEASE_STRING)
149
 
        zip -r $(RELEASE_STRING).zip $(RELEASE_STRING)
150
 
        $(SIL)rm -rf $(RELEASE_STRING)/
151
 
 
152
 
  rpm: tarball
153
 
        BLD_DIR=$$(mktemp -d /tmp/rpmbuild-$$$$-XXXXXX); \
154
 
        mkdir -p $$BLD_DIR/SOURCES $$BLD_DIR/BUILD $$BLD_DIR/RPMS $$BLD_DIR/RPMS/i386 $$BLD_DIR/RPMS/noarch $$BLD_DIR/SRPMS $$BLD_DIR/SPECS ;\
155
 
        rpmbuild --define "_topdir $$BLD_DIR" -ta $(RELEASE_STRING).tar.bz2  ;\
156
 
        cp $$BLD_DIR/RPMS/*/*rpm .      ;\
157
 
        cp $$BLD_DIR/SRPMS/*rpm .       ;\
158
 
        rm -rf $$BLD_DIR
159
 
 
160
 
  srpm: tarball
161
 
        BLD_DIR=$$(mktemp -d /tmp/rpmbuild-$$$$-XXXXXX); \
162
 
        mkdir -p $$BLD_DIR/SOURCES $$BLD_DIR/BUILD $$BLD_DIR/RPMS $$BLD_DIR/RPMS/i386 $$BLD_DIR/RPMS/noarch $$BLD_DIR/SRPMS $$BLD_DIR/SPECS ;\
163
 
        rpmbuild --define "_topdir $$BLD_DIR" -ts --nodeps $(RELEASE_STRING).tar.bz2  ;\
164
 
        cp $$BLD_DIR/SRPMS/*rpm .       ;\
165
 
        rm -rf $$BLD_DIR
166
 
 
167
 
  CLEAN_LIST += $(RELEASE_NAME)*.rpm
168
 
  CLEAN_LIST += $(RELEASE_STRING).tar.bz2
169
 
  CLEAN_LIST += $(RELEASE_STRING).zip
170
 
  CLEAN_LIST += $(shell find . -name .\#\* )
171
 
  CLEAN_LIST += $(shell find . -name core )
172
 
  CLEAN_LIST += $(shell find . -name .\*.swp )
173
 
  CLEAN_LIST += $(shell find . -name \*.pyc )
174
 
  CLEAN_LIST += testResults.xml
175
 
  CLEAN_LIST += tmp/
176
 
  CLEAN_LIST += rpm/
177
 
  CLEAN_LIST += build/VC*/*/Debug build/VC*/*/Release build/VC*/*/*.plg build/VC*/*.ncb build/VC*/*.opt
178
 
 
179
 
  .PHONY: all clean clean_list distclean distclean_list \
180
 
                install install_list 
181
 
 
182
 
# Here is a list of variables that are assumed Local to each Makefile. You can
183
 
#   safely stomp on these values without affecting the build.
184
 
#       MODULES
185
 
#       FILES
186
 
#       TARGETS
187
 
#       SOURCES