Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 122 lines (103 sloc) 5.763 kB
7183c5b from CVS
graziano obertelli authored
1 # Makefile for eucalyptus/util
2 #
054a11a @gholms Update GPL+BSD file headers
gholms authored
3 # Copyright 2009-2012 Eucalyptus Systems, Inc.
4 #
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; version 3 of the License.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see http://www.gnu.org/licenses/.
16 #
17 # Please contact Eucalyptus Systems, Inc., 6755 Hollister Ave., Goleta
18 # CA 93117, USA or visit http://www.eucalyptus.com/licenses/ if you need
19 # additional information or have any questions.
20 #
21 # This file may incorporate work covered under the following copyright
22 # and permission notice:
23 #
24 # Software License Agreement (BSD License)
25 #
26 # Copyright (c) 2008, Regents of the University of California
27 # All rights reserved.
28 #
29 # Redistribution and use of this software in source and binary forms,
30 # with or without modification, are permitted provided that the
31 # following conditions are met:
32 #
33 # Redistributions of source code must retain the above copyright
34 # notice, this list of conditions and the following disclaimer.
35 #
36 # Redistributions in binary form must reproduce the above copyright
37 # notice, this list of conditions and the following disclaimer
38 # in the documentation and/or other materials provided with the
39 # distribution.
40 #
41 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
42 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
43 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
44 # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
45 # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
46 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
47 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
48 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
49 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
50 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
51 # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
52 # POSSIBILITY OF SUCH DAMAGE. USERS OF THIS SOFTWARE ACKNOWLEDGE
53 # THE POSSIBLE PRESENCE OF OTHER OPEN SOURCE LICENSED MATERIAL,
54 # COPYRIGHTED MATERIAL OR PATENTED MATERIAL IN THIS SOFTWARE,
55 # AND IF ANY SUCH MATERIAL IS DISCOVERED THE PARTY DISCOVERING
56 # IT MAY INFORM DR. RICH WOLSKI AT THE UNIVERSITY OF CALIFORNIA,
57 # SANTA BARBARA WHO WILL THEN ASCERTAIN THE MOST APPROPRIATE REMEDY,
58 # WHICH IN THE REGENTS' DISCRETION MAY INCLUDE, WITHOUT LIMITATION,
59 # REPLACEMENT OF THE CODE SO IDENTIFIED, LICENSING OF THE CODE SO
60 # IDENTIFIED, OR WITHDRAWAL OF THE CODE CAPABILITY TO THE EXTENT
61 # NEEDED TO COMPLY WITH ANY SUCH LICENSES OR RIGHTS.
7183c5b from CVS
graziano obertelli authored
62
63 include ../Makedefs
64
d413f64 @juphoff debug/unit-test tweaks
juphoff authored
65 #DEBUGS = -DDEBUG # -DDEBUG1
2b1baaf @juphoff handle message property for top-level XML fault node, add timestamps
juphoff authored
66 CC += -g
26de356 @dmitrii Implemented euca-generate-fault inside log.c
dmitrii authored
67 all: utf8.o log.o config.o fault.o misc.o wc.o hash.o data.o sensor.o euca_auth.o euca_axis.o ipc.o windows-bundle.o euca_rootwrap euca_mountwrap euca-generate-fault
7183c5b from CVS
graziano obertelli authored
68
054a11a @gholms Update GPL+BSD file headers
gholms authored
69 build: all
d78b0da front-end components (CLC/CC) can now run as non-root (as specified i…
root authored
70
a86fc84 debugging euca_imager
Dmitrii Zagorodnov authored
71 euca_rootwrap: euca_rootwrap.c
d78b0da front-end components (CLC/CC) can now run as non-root (as specified i…
root authored
72 $(CC) $(CFLAGS) $(INCLUDES) -o euca_rootwrap euca_rootwrap.c
7183c5b from CVS
graziano obertelli authored
73
a86fc84 debugging euca_imager
Dmitrii Zagorodnov authored
74 euca_mountwrap: euca_mountwrap.c
aa6b61f bunch of contortions to get 'mount' to work as non-root
root authored
75 $(CC) $(CFLAGS) $(INCLUDES) -o euca_mountwrap euca_mountwrap.c
76
d8ff497 @dmitrii config- and logging-related enhancements in C-land
dmitrii authored
77 test: test.c ipc.o log.o misc.o
78 $(CC) $(CFLAGS) $(INCLUDES) -o test test.c ipc.o log.o misc.o data.o -lpthread $(LIBS) $(LDFLAGS)
7183c5b from CVS
graziano obertelli authored
79
6f1473e @juphoff add log.o dependency for test_*
juphoff authored
80 test_misc: misc.c log.o ../storage/diskutil.o ipc.o
72448ac @dmitrii merged in testing, resolved conflicts
dmitrii authored
81 $(CC) $(CFLAGS) $(INCLUDES) -D_UNIT_TEST -o test_misc misc.c log.o ../storage/diskutil.o ipc.o $(LIBS) $(LDFLAGS)
1d06483 @dmitrii fixing how imager deals with empty SSH key file
dmitrii authored
82
6f1473e @juphoff add log.o dependency for test_*
juphoff authored
83 test_wc: wc.c misc.o log.o ../storage/diskutil.o ipc.o
d413f64 @juphoff debug/unit-test tweaks
juphoff authored
84 $(CC) $(CFLAGS) $(INCLUDES) $(DEBUGS) -D_UNIT_TEST -o test_wc wc.c misc.o log.o ../storage/diskutil.o ipc.o $(LIBS) $(LDFLAGS)
84005cf @juphoff add Dmitrii's wc.c for fault-log string substitutions
juphoff authored
85
6e2be76 @juphoff add & use Alexey Vatchenko's utf8-to-wchar routines
juphoff authored
86 test_fault: fault.c misc.o log.o wc.o ../storage/diskutil.o ipc.o utf8.o
26de356 @dmitrii Implemented euca-generate-fault inside log.c
dmitrii authored
87 $(CC) $(CFLAGS) $(INCLUDES) `xslt-config --cflags` $(DEBUGS) -D_UNIT_TEST -o test_fault fault.c misc.o log.o wc.o ../storage/diskutil.o ipc.o utf8.o -lpthread -lxml2 $(LDFLAGS)
88
89 euca-generate-fault: fault.c misc.o log.o wc.o ../storage/diskutil.o ipc.o utf8.o
90 $(CC) $(CFLAGS) $(INCLUDES) `xslt-config --cflags` $(DEBUGS) -DEUCA_GENERATE_FAULT -o euca-generate-fault fault.c misc.o log.o wc.o ../storage/diskutil.o ipc.o utf8.o -lpthread -lxml2 $(LDFLAGS)
90762ea @juphoff checkpoint
juphoff authored
91
954083c @dmitrii added data getting and setting (via merge), unit test, generating bog…
dmitrii authored
92 test_sensor: sensor.c sensor.h misc.o log.o ipc.o ../storage/diskutil.o
93 $(CC) $(CFLAGS) $(INCLUDES) $(DEBUG) -D_UNIT_TEST -o test_sensor sensor.c misc.o log.o ../storage/diskutil.o ipc.o $(LIBS) $(LDFLAGS)
94
1d06483 @dmitrii fixing how imager deals with empty SSH key file
dmitrii authored
95 ../storage/diskutil.o:
96 make -C ../storage
97
9ecfdf3 @juphoff refactor test_fault
juphoff authored
98 %.o: %.c %.h
d413f64 @juphoff debug/unit-test tweaks
juphoff authored
99 $(CC) -c -std=gnu99 $(CFLAGS) $(INCLUDES) $(DEBUGS) `xslt-config --cflags` $<
7183c5b from CVS
graziano obertelli authored
100
101 clean:
26de356 @dmitrii Implemented euca-generate-fault inside log.c
dmitrii authored
102 rm -rf *~ *.o test test_fault euca-generate-fault test_misc test_wc euca_rootwrap euca_mountwrap test_sensor
7183c5b from CVS
graziano obertelli authored
103
104 distclean:
aa5d41a @juphoff 'make distclean' should remove eucalyptus-config.h rather than config.h
juphoff authored
105 rm -rf eucalyptus-config.h
7183c5b from CVS
graziano obertelli authored
106
26de356 @dmitrii Implemented euca-generate-fault inside log.c
dmitrii authored
107 install: all
ffd9155 @juphoff delete some test faults, add real ones, tweak installation
juphoff authored
108 $(INSTALL) -m 0755 euca_rootwrap $(DESTDIR)$(usrdir)/lib/eucalyptus/
109 $(INSTALL) -m 0755 euca_mountwrap $(DESTDIR)$(usrdir)/lib/eucalyptus/
26de356 @dmitrii Implemented euca-generate-fault inside log.c
dmitrii authored
110 $(INSTALL) -m 0755 euca-generate-fault $(DESTDIR)$(usrdir)/sbin/
ffd9155 @juphoff delete some test faults, add real ones, tweak installation
juphoff authored
111 $(INSTALL) -d $(DESTDIR)$(usrdir)/share/eucalyptus/faults/en_US/
112 $(INSTALL) -m 0644 faults/en_US/common.xml $(DESTDIR)$(usrdir)/share/eucalyptus/faults/en_US/
113 $(INSTALL) -m 0644 -v faults/en_US/????.xml $(DESTDIR)$(usrdir)/share/eucalyptus/faults/en_US/
114 $(INSTALL) -d $(DESTDIR)$(etcdir)/eucalyptus/faults/en_US/
7183c5b from CVS
graziano obertelli authored
115
116 deploy:
117
116504e Added uninstall target.
graziano authored
118 uninstall:
ffd9155 @juphoff delete some test faults, add real ones, tweak installation
juphoff authored
119 $(RM) -f $(DESTDIR)$(usrdir)/lib/eucalyptus/euca_rootwrap
120 $(RM) -f $(DESTDIR)$(usrdir)/lib/eucalyptus/euca_mountwrap
121 $(RM) -f $(DESTDIR)$(usrdir)/share/eucalyptus/faults/en_US/*.xml
Something went wrong with that request. Please try again.