Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 156431 | Differences between
and this patch

Collapse All | Expand All

(-)suspend.org/AUTHORS (+5 lines)
Line 0 Link Here
1
Rafael J. Wysocki <rjw@sisk.pl>
2
Pavel Machek <pavel@suse.cz>
3
Stefan Seyfried <seife@suse.de>
4
Tim Dijkstra <newsuser@famdijkstra.org>
5
Luca Tettamanti <kronos.it@gmail.com>
(-)suspend.org/bootsplash.c (+1 lines)
Lines 9-14 Link Here
9
 *
9
 *
10
 */
10
 */
11
11
12
#include "config.h"
12
#include <stdio.h>
13
#include <stdio.h>
13
#include <fcntl.h>
14
#include <fcntl.h>
14
#include <unistd.h>
15
#include <unistd.h>
(-)suspend.org/config_parser.c (+1 lines)
Lines 9-14 Link Here
9
 *
9
 *
10
 */
10
 */
11
11
12
#include "config.h"
12
#include <sys/types.h>
13
#include <sys/types.h>
13
#include <sys/stat.h>
14
#include <sys/stat.h>
14
#include <fcntl.h>
15
#include <fcntl.h>
(-)suspend.org/configure.ac (+234 lines)
Line 0 Link Here
1
#
2
# configure.ac
3
#
4
# Copyright (C) 2007 Alon Bar-Lev <alon.barlev@gmail.com>
5
#
6
# This file is released under the GPLv2.
7
#
8
9
AC_PREREQ([2.60])
10
AC_INIT([suspend], [0.6_beta1])
11
AM_INIT_AUTOMAKE([${PACKAGE_NAME}], [${PACKAGE_VERSION}])
12
AM_CONFIG_HEADER([config.h])
13
AC_CONFIG_SRCDIR([suspend.c])
14
15
AC_CANONICAL_HOST
16
17
AC_ARG_ENABLE(
18
	[debug],
19
	[AC_HELP_STRING([--enable-debug], [Enable debug mode])],
20
	,
21
	[enable_debug="no"]
22
)
23
AC_ARG_ENABLE(
24
	[minimal],
25
	[AC_HELP_STRING([--enable-minimal], [Enable minimal build])],
26
	,
27
	[enable_minimal="no"]
28
)
29
AC_ARG_ENABLE(
30
	[compress],
31
	[AC_HELP_STRING([--enable-compress], [Enable compress support])],
32
	,
33
	[enable_compress="no"]
34
)
35
AC_ARG_ENABLE(
36
	[encrypt],
37
	[AC_HELP_STRING([--enable-encrypt], [Enable encryption support])],
38
	,
39
	[enable_encrypt="no"]
40
)
41
AC_ARG_ENABLE(
42
	[create-device],
43
	[AC_HELP_STRING([--enable-create-device], [Enable create required devices, use only if you don't have udev])],
44
	,
45
	[enable_create_device="no"]
46
)
47
AC_ARG_ENABLE(
48
	[resume-static],
49
	[AC_HELP_STRING([--disable-resume-static], [Build resume as dynamic module])],
50
	,
51
	[enable_resume_static="yes"]
52
)
53
AC_ARG_ENABLE(
54
	[splashy],
55
	[AC_HELP_STRING([--enable-splashy], [Enable splashy support])],
56
	,
57
	[enable_splashy="no"]
58
)
59
AC_ARG_WITH(
60
	[devdir],
61
	[AC_HELP_STRING([--with-devdir=DIR], [Use if --enable-create-device, put devices in this directory, default /dev])],
62
	[devdir="${withval}"],
63
	[devdir="/dev"]
64
)
65
AC_ARG_WITH(
66
	[initramfsdir],
67
	[AC_HELP_STRING([--with-initramfsdir=DIR], [Put initramfs binaries in this directory, default LIBDIR/suspend])],
68
	[initramfsdir="${withval}"],
69
	[initramfsdir="\$(libdir)/suspend"]
70
)
71
AC_ARG_WITH(
72
	[libgcrypt-prefix],
73
	[AC_HELP_STRING([--with-libgcrypt-prefix=DIR], [Define libgcrypt prefix, default /usr])],
74
	,
75
	[with_libgcrypt_prefix="/usr" ]
76
)
77
AC_ARG_WITH(
78
	[directfb-prefix],
79
	[AC_HELP_STRING([--with-directfb-prefix=DIR], [Define directfb prefix, default /usr])],
80
	,
81
	[with_directfb_prefix="/usr" ]
82
)
83
AC_ARG_WITH(
84
	[resume-device],
85
	[AC_HELP_STRING([--with-resume-device=DEVICE], [Define resume device (REQUIRED ONLY FOR BUILDING INITRAMFS DURING MAKE)])],
86
	[RESUME_DEVICE="${withval}"]
87
)
88
AC_ARG_WITH(
89
	[boot-dir],
90
	[AC_HELP_STRING([--with-bootdir=DIR], [Define boot directory, default /boot (REQUIRED ONLY FOR BUILDING INITRAMFS DURING MAKE)])],
91
	[bootdir="${withval}"],
92
	[bootdir="/boot" ]
93
)
94
95
96
AC_PROG_CC
97
AC_PROG_INSTALL
98
AC_PROG_LIBTOOL		# We are using libtool so it auto-find static dependencies
99
PKG_PROG_PKG_CONFIG
100
AC_CHECK_PROGS([M4], [m4])
101
if test "${enable_create_device}" = "yes"; then
102
	AC_CHECK_PROGS([MKNOD], [mknod])
103
	test -z "${MKNOD}" && AC_MSG_ERROR([mknod required for creating devices])
104
fi
105
106
case "${host}" in
107
	i?86-*)		ARCH="x86";;
108
	x86_*-*)	ARCH="x86";;
109
	ppc-*)		ARCH="ppc";;
110
esac
111
112
if test "${ARCH}" = "x86"; then
113
	AC_DEFINE([CONFIG_ARCH_X86], [1], [Define if x86 arch])
114
115
	PKG_CHECK_MODULES(
116
		[LIBPCI],
117
		[libpci >= 2.2.4],
118
		,
119
		[
120
			if test -z "${LIBPCI_LIBS}"; then
121
				AC_CHECK_LIB(
122
					[pci],
123
					[pci_init],
124
					[LIBPCI_LIBS="-lpci"],
125
					[
126
					#force rescan
127
					unset ac_cv_lib_pci_pci_init
128
					AC_CHECK_LIB(
129
						[pci],
130
						[pci_init],
131
						[LIBPCI_LIBS="-lpci -lz"],
132
						[AC_MSG_ERROR([Required pciutils >= 2.2.4 not found])],
133
						[-lz]
134
					)]
135
				)
136
			fi
137
		]
138
	)
139
140
	if test -z "${LIBX86_LIBS}"; then
141
		AC_ARG_VAR([LIBX86_CFLAGS], [C compiler flags for libx86])
142
		AC_ARG_VAR([LIBX86_LIBS], [linker flags for libx86])
143
		AC_CHECK_LIB(
144
			[x86],
145
			[LRMI_common_init],
146
			[LIBX86_LIBS="-lx86"],
147
			[AC_MSG_ERROR([Required libx86 was not found])]
148
		)
149
	fi
150
elif test "${ARCH}" = "ppc"; then
151
	AC_DEFINE([CONFIG_ARCH_PPC], [1], [Define if ppc arch])
152
fi
153
154
if test "${enable_compress}" = "yes"; then
155
	AC_DEFINE([CONFIG_COMPRESS], [1], [Define if x86 arch])
156
	if test -z "${LZO_LIBS}"; then
157
		AC_ARG_VAR([LZO_CFLAGS], [C compiler flags for lzo])
158
		AC_ARG_VAR([LZO_LIBS], [linker flags for lzo])
159
		AC_CHECK_LIB(
160
			[lzo2],
161
			[lzo1x_1_compress],
162
			[LZO_LIBS="-llzo2"],
163
			[AC_CHECK_LIB(
164
				[lzo],
165
				[lzo1x_1_compress],
166
				[LZO_LIBS="-llzo"],
167
				[AC_MSG_ERROR([Required lzo library not found])]
168
			)]
169
		)
170
	fi
171
fi
172
173
if test "${enable_encrypt}" = "yes"; then
174
	AC_DEFINE([CONFIG_ENCRYPT], [1], [Define if encryption enabled])
175
176
	AC_MSG_CHECKING([for libgcrypt])
177
	if ! test -x "${with_libgcrypt_prefix}/bin/libgcrypt-config"; then
178
		AC_MSG_ERROR([Cannot locate libgcrypt])
179
	else
180
		AC_MSG_RESULT([found])
181
		LIBGCRYPT_CFLAGS=`"${with_libgcrypt_prefix}/bin/libgcrypt-config" --cflags`
182
		LIBGCRYPT_LIBS=`"${with_libgcrypt_prefix}/bin/libgcrypt-config" --libs`
183
	fi
184
fi
185
186
if test "${enable_splashy}" = "yes"; then
187
	AC_DEFINE([CONFIG_SPLASHY], [1], [Define if splashy enabled])
188
189
	if test -z "${SPLASHY_LIBS}"; then
190
		AC_ARG_VAR([SPLASHY_CFLAGS], [C compiler flags for libsplashy])
191
		AC_ARG_VAR([SPLASHY_LIBS], [linker flags for libsplashy])
192
		AC_CHECK_LIB(
193
			[splashy],
194
			[splashy_open],
195
			[SPLASHY_LIBS="-lsplashy"],
196
			[AC_MSG_ERROR([Required libsplashy was not found])]
197
		)
198
	fi
199
fi
200
201
AC_HEADER_STDC
202
AC_CHECK_HEADERS([ \
203
	inttypes.h \
204
	stdint.h \
205
])
206
207
AC_SUBST([devdir])
208
AC_SUBST([initramfsdir])
209
AC_SUBST([bootdir])
210
AC_SUBST([LIBX86_CFLAGS])
211
AC_SUBST([LIBX86_LIBS])
212
AC_SUBST([LZO_CFLAGS])
213
AC_SUBST([LZO_LIBS])
214
AC_SUBST([LIBGCRYPT_CFLAGS])
215
AC_SUBST([LIBGCRYPT_LIBS])
216
AC_SUBST([SPLASHY_CFLAGS])
217
AC_SUBST([SPLASHY_LIBS])
218
AC_SUBST([RESUME_DEVICE])
219
AM_CONDITIONAL([ENABLE_DEBUG], [test "${enable_debug}" = "yes"])
220
AM_CONDITIONAL([ENABLE_MINIMAL], [test "${enable_minimal}" = "yes"])
221
AM_CONDITIONAL([ARCH_X86], [test "${ARCH}" = "x86"])
222
AM_CONDITIONAL([ARCH_PPC], [test "${ARCH}" = "ppc"])
223
AM_CONDITIONAL([ENABLE_ENCRYPT], [test "${enable_encrypt}" = "yes"])
224
AM_CONDITIONAL([ENABLE_RESUME_STATIC], [test "${enable_resume_static}" = "yes"])
225
AM_CONDITIONAL([ENABLE_CREATE_DEVICE], [test "${enable_create_device}" = "yes"])
226
AM_CONDITIONAL([ENABLE_SPLASHY], [test "${enable_splashy}" = "yes"])
227
AC_CONFIG_FILES([
228
	Makefile
229
	doc/Makefile
230
	scripts/Makefile
231
	scripts/suse-10.1/Makefile
232
])
233
AC_OUTPUT
234
(-)suspend.org/dmidecode.c (+1 lines)
Lines 11-16 Link Here
11
 *	Licensed under the GNU General Public license v2.
11
 *	Licensed under the GNU General Public license v2.
12
 */
12
 */
13
13
14
#include "config.h"
14
#include <stdio.h>
15
#include <stdio.h>
15
#include <unistd.h>
16
#include <unistd.h>
16
#include <fcntl.h>
17
#include <fcntl.h>
(-)suspend.org/doc/Makefile.am (+10 lines)
Line 0 Link Here
1
#
2
# Makefile.am
3
#
4
# Copyright (C) 2007 Alon Bar-Lev <alon.barlev@gmail.com>
5
#
6
# This file is released under the GPLv2.
7
#
8
9
dist_noinst_DATA=installation-on-SUSE-10.1.txt
10
(-)suspend.org/encrypt.c (+2 lines)
Lines 9-14 Link Here
9
 *
9
 *
10
 */
10
 */
11
11
12
#include "config.h"
13
12
#ifdef CONFIG_ENCRYPT
14
#ifdef CONFIG_ENCRYPT
13
#include <sys/types.h>
15
#include <sys/types.h>
14
#include <sys/stat.h>
16
#include <sys/stat.h>
(-)suspend.org/keygen.c (+1 lines)
Lines 9-14 Link Here
9
 *
9
 *
10
 */
10
 */
11
11
12
#include "config.h"
12
#include <sys/types.h>
13
#include <sys/types.h>
13
#include <sys/stat.h>
14
#include <sys/stat.h>
14
#include <fcntl.h>
15
#include <fcntl.h>
(-)suspend.org/loglevel.c (+1 lines)
Lines 4-9 Link Here
4
 * (c) 2007 Tim Dijkstra
4
 * (c) 2007 Tim Dijkstra
5
 */
5
 */
6
6
7
#include "config.h"
7
#include <unistd.h>
8
#include <unistd.h>
8
#include <stdio.h>
9
#include <stdio.h>
9
#include <errno.h>
10
#include <errno.h>
(-)suspend.org/Makefile (-157 lines)
Lines 1-157 Link Here
1
#CONFIG_COMPRESS=yes
2
#CONFIG_ENCRYPT=yes
3
#CONFIG_SPLASHY=yes
4
#CONFIG_UDEV=yes
5
#CONFIG_RESUME_DYN=yes
6
7
PREFIX=/usr/local
8
SUSPEND_DIR=$(PREFIX)/sbin
9
RESUME_DIR=$(PREFIX)/lib/suspend
10
CONFIG_DIR=/etc
11
RESUME_DEVICE=<path_to_resume_device_file>
12
BOOT_DIR=/boot
13
CONFIGFILE=suspend.conf
14
CFLAGS := -O2 -Wall
15
16
###############################################################
17
18
ARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ -e s/ppc.*/ppc/)
19
20
CC_FLAGS=-I/usr/local/include -DS2RAM $(CFLAGS)
21
LD_FLAGS=-L/usr/local/lib
22
23
BINARIES=s2disk s2both s2ram swap-offset resume
24
BINARIES_MIN=s2disk swap-offset
25
26
S2RAM_OBJ=vt.o config_parser.o
27
SWSUSP_OBJ=vt.o md5.o encrypt.o config_parser.o loglevel.o splash.o bootsplash.o
28
29
S2RAM_LD_FLAGS = $(LD_FLAGS)
30
SWSUSP_LD_FLAGS = $(LD_FLAGS)
31
ifeq ($(ARCH), x86)
32
S2RAM_OBJ += s2ram-x86.o whitelist.o dmidecode.o radeontool.o vbetool/vbetool.o
33
S2RAM_LD_FLAGS += -lx86 -lpci -lz
34
endif
35
ifeq ($(ARCH), ppc)
36
S2RAM_OBJ += s2ram-ppc.o
37
endif
38
39
ifndef CONFIG_RESUME_DYN
40
STATIC_LD_FLAGS = -static
41
endif
42
43
ifdef CONFIG_COMPRESS
44
CC_FLAGS	+= -DCONFIG_COMPRESS
45
SWSUSP_LD_FLAGS	+= -llzo2
46
endif
47
48
ifdef CONFIG_ENCRYPT
49
BINARIES	+= suspend-keygen 
50
BINARIES_MIN	+= suspend-keygen 
51
CC_FLAGS	+= -DCONFIG_ENCRYPT
52
GCRYPT_CC_FLAGS	= $(shell libgcrypt-config --cflags)
53
SWSUSP_CC_FLAGS	+= $(GCRYPT_CC_FLAGS)
54
GCRYPT_LD_FLAGS = $(shell libgcrypt-config --libs)
55
SWSUSP_LD_FLAGS += $(GCRYPT_LD_FLAGS)
56
INSTALL_KEYGEN	= install-keygen
57
endif
58
59
ifndef CONFIG_UDEV
60
SNAPSHOT=$(DESTDIR)/dev/snapshot
61
endif
62
63
ifdef CONFIG_SPLASHY
64
SWSUSP_OBJ	+= splashy_funcs.o 
65
CC_FLAGS	+= -DCONFIG_SPLASHY
66
SWSUSP_LD_FLAGS	+= -lsplashy
67
ifndef CONFIG_RESUME_DYN
68
STATIC_LD_FLAGS += -lsplashycnf \
69
		$(shell directfb-config  --libs --input=keyboard \
70
		--imageprovider=jpeg,gif,png\
71
		--font=ft2,default) \
72
		$(shell pkg-config --static --libs glib-2.0)
73
STATIC_CC_FLAGS=$(shell directfb-config --cflags)\
74
		$(shell pkg-config --static --cflags glib-2.0)
75
else
76
SWSUSP_LD_FLAGS += -lgcc_s
77
endif
78
endif
79
80
81
82
all: $(BINARIES) 
83
84
clean: 
85
	rm -f $(BINARIES) suspend-keygen suspend.keys *.o vbetool/*.o
86
87
#### Rules for objects
88
s2ram-x86.o: %.o : %.c %.h
89
	$(CC) $(CC_FLAGS) -c $< -o $@
90
91
s2ram-both.o: s2ram.c s2ram.h
92
	$(CC) $(CC_FLAGS) -DCONFIG_BOTH -c $< -o $@
93
94
md5.o encrypt.o: %.o : %.c %.h md5.h
95
	$(CC) $(CC_FLAGS) -DHAVE_INTTYPES_H -DHAVE_STDINT_H -c $< -o $@
96
97
# Simple objects with header
98
config_parser.o vt.o bootsplash.o splash.o splashy_funcs.o vbetool/vbetool.o s2ram-ppc.o: %.o : %.c %.h
99
	$(CC) $(CC_FLAGS) -c $< -o $@
100
101
# Simple object without header
102
dmidecode.o radeontool.o : %.o: %.c
103
	$(CC) $(CC_FLAGS) -c $< -o $@
104
105
#### Rules for binaries
106
s2disk:	$(SWSUSP_OBJ) suspend.c
107
	$(CC) -g $(CC_FLAGS)  $^ -o $@ $(SWSUSP_LD_FLAGS)
108
109
s2ram:	$(S2RAM_OBJ) s2ram.c s2ram-main.c
110
	$(CC) -g $(CC_FLAGS) -include s2ram-$(ARCH).h $^ -o $@ $(S2RAM_LD_FLAGS)
111
112
s2both:	$(SWSUSP_OBJ) $(S2RAM_OBJ) s2ram-both.o suspend.c 
113
	$(CC) -g $(CC_FLAGS) -include s2ram-$(ARCH).h -DCONFIG_BOTH  $^ -o $@ $(SWSUSP_LD_FLAGS) $(S2RAM_LD_FLAGS)
114
115
resume:	resume.c $(SWSUSP_OBJ)
116
	$(CC) $(CC_FLAGS) $(STATIC_CC_FLAGS) $^ -o $@ $(SWSUSP_LD_FLAGS) $(STATIC_LD_FLAGS) 
117
swap-offset: swap-offset.c
118
	$(CC) $(CC_FLAGS) $< -o $@ $(LD_FLAGS)
119
120
suspend-keygen:	 keygen.c md5.o encrypt.h 
121
	$(CC) $(CC_FLAGS) $(GCRYPT_CC_FLAGS) -DHAVE_INTTYPES_H -DHAVE_STDINT_H md5.o $< -o $@ $(LD_FLAGS) $(GCRYPT_LD_FLAGS)
122
123
124
125
126
#### Install targets
127
$(SNAPSHOT):
128
	mknod $(SNAPSHOT) c 10 231;
129
130
install-conf: conf/$(CONFIGFILE)
131
	if [ -f $(DESTDIR)$(CONFIG_DIR)/$(CONFIGFILE) ]; then \
132
		install --mode=644 conf/$(CONFIGFILE) \
133
			$(DESTDIR)$(CONFIG_DIR)/$(CONFIGFILE).new;\
134
	else \
135
		install -D --mode=644 conf/$(CONFIGFILE) \
136
			$(DESTDIR)$(CONFIG_DIR)/$(CONFIGFILE); \
137
	fi
138
139
install-resume:
140
	install -D --mode=755 resume $(DESTDIR)$(RESUME_DIR)/resume
141
142
install-% : %
143
	install -D --mode=755 $< $(DESTDIR)$(SUSPEND_DIR)/$<
144
145
# Some convenience targets
146
install-resume-new-initrd:	resume conf/$(CONFIGFILE)
147
	BOOT_DIR=$(DESTDIR)$(BOOT_DIR) ./scripts/create-resume-initrd.sh $(RESUME_DEVICE)
148
149
install-resume-on-initrd:	resume 
150
	./scripts/install-resume.sh
151
152
install-minimal: $(patsubst %,install-%,$(BINARIES_MIN)) $(SNAPSHOT) install-conf
153
154
install: $(patsubst %,install-%,$(BINARIES)) $(SNAPSHOT) install-conf
155
156
157
.PHONY: clean install install-minimal install-resume-on-initrd install-resume-new-initrd
(-)suspend.org/Makefile.am (+161 lines)
Line 0 Link Here
1
#
2
# Makefile.am
3
#
4
# Copyright (C) 2007 Alon Bar-Lev <alon.barlev@gmail.com>
5
#
6
# This file is released under the GPLv2.
7
#
8
AUTOMAKE_OPTIONS=foreign dist-bzip2
9
10
SUBDIRS=\
11
	doc \
12
	scripts
13
noinst_LIBRARIES=\
14
	libsuspend-common.a
15
sbin_PROGRAMS=\
16
	s2disk \
17
	swap-offset
18
dist_noinst_DATA= \
19
	conf/suspend.conf
20
sysconf_DATA=#required in order to create dir
21
if !ENABLE_MINIMAL
22
sbin_PROGRAMS+=\
23
	s2ram \
24
	s2both
25
if ENABLE_ENCRYPT
26
sbin_PROGRAMS+=\
27
	suspend-keygen
28
endif
29
initramfs_PROGRAMS=\
30
	resume
31
dist_doc_DATA=\
32
	TODO \
33
	README* \
34
	HOWTO \
35
	COPYING*
36
endif
37
38
if ENABLE_CREATE_DEVICE
39
dev_DATA=
40
install-data-hook:
41
	$(MKNOD) $(DESTDIR)$(devdir)/snapshot c 10 231
42
endif
43
44
install-data-local:
45
	if [ -f $(DESTDIR)$(sysconfdir)/suspend.conf ]; then \
46
		$(INSTALL_DATA) $(srcdir)/conf/suspend.conf $(DESTDIR)$(sysconfdir)/suspend.conf.new; \
47
	else \
48
		$(INSTALL_DATA) $(srcdir)/conf/suspend.conf $(DESTDIR)$(sysconfdir)/suspend.conf; \
49
	fi
50
51
AM_CFLAGS=\
52
	-D_LARGEFILE64_SOURCE \
53
	-DS2RAM \
54
	$(LZO_CFLAGS) \
55
	$(LIBGCRYPT_CFLAGS)
56
57
common_s2disk_libs=\
58
	$(LZO_LIBS) \
59
	$(LIBGCRYPT_LIBS)
60
common_s2ram_libs=
61
62
if ENABLE_SPLASHY
63
AM_CFLAGS+=\
64
	${SPLASHY_CFLAGS}
65
common_s2disk_libs+=\
66
	${SPLASHY_LIBS}
67
endif
68
69
libsuspend_common_a_SOURCES=\
70
	swsusp.h \
71
	vt.h vt.c \
72
	config_parser.h config_parser.c \
73
	md5.h md5.c \
74
	encrypt.h encrypt.c \
75
	loglevel.h loglevel.c \
76
	splash.h splash.c \
77
	splashy_funcs.h splashy_funcs.c \
78
	bootsplash.h bootsplash.c \
79
	whitelist.h whitelist.c \
80
	s2ram.h s2ram.c
81
82
if ARCH_X86
83
libsuspend_common_a_SOURCES+=\
84
	s2ram-x86.h s2ram-x86.c \
85
	dmidecode.c \
86
	radeontool.c \
87
	vbetool/vbetool.h vbetool/vbetool.c
88
AM_CFLAGS+=\
89
	$(LIBX86_CFLAGS) \
90
	$(LIBPCI_CFLAGS)
91
common_s2ram_libs+=\
92
	$(LIBX86_LIBS) \
93
	$(LIBPCI_LIBS)
94
endif
95
if ARCH_PPC
96
libsuspend_common_a_SOURCES+=\
97
	s2ram-ppc.h s2ram-ppc.c
98
endif
99
100
resume_CFLAGS=\
101
	$(AM_CFLAGS) \
102
	-D_GNU_SOURCE
103
resume_SOURCES=\
104
	resume.c
105
resume_LDADD=\
106
	libsuspend-common.a
107
if ENABLE_RESUME_STATIC
108
resume_LDADD+=\
109
	$(common_s2disk_libs)
110
resume_LDFLAGS=\
111
	$(AM_LDFLAGS) \
112
	-all-static
113
else
114
resume_LDADD+=\
115
	$(common_s2disk_libs)
116
endif
117
118
s2disk_SOURCES=\
119
	suspend.c
120
s2disk_LDADD=\
121
	libsuspend-common.a \
122
	$(common_s2disk_libs)
123
124
s2both_SOURCES=\
125
	suspend.c
126
s2both_CFLAGS=\
127
	$(AM_CFLAGS) \
128
	-DCONFIG_BOTH
129
s2both_LDADD=\
130
	libsuspend-common.a \
131
	$(common_s2ram_libs) \
132
	$(common_s2disk_libs)
133
134
s2ram_SOURCES=\
135
	s2ram-main.c
136
s2ram_LDADD=\
137
	libsuspend-common.a \
138
	$(common_s2ram_libs)
139
140
swap_offset_SOURCES=\
141
	swap-offset.c
142
143
suspend_keygen_SOURCES=\
144
	keygen.c
145
suspend_keygen_LDADD=\
146
	libsuspend-common.a \
147
	$(LIBGCRYPT_LIBS)
148
149
#
150
# Misc functions
151
#
152
install-resume-new-initrd:      resume
153
	@if test -z "$(RESUME_DEVICE)"; then \
154
		echo "Please specify --with-resume-device"; \
155
		false; \
156
	else \
157
		BOOT_DIR=$(DESTDIR)$(bootdir) ./scripts/create-resume-initrd.sh $(RESUME_DEVICE); \
158
	fi
159
160
install-resume-on-initrd:       resume
161
	BOOT_DIR=$(DESTDIR)$(bootdir) ./scripts/install-resume.sh
(-)suspend.org/radeontool.c (+1 lines)
Lines 17-22 Link Here
17
 *                                  by Stefan Seyfried <seife@suse.de>
17
 *                                  by Stefan Seyfried <seife@suse.de>
18
 */
18
 */
19
19
20
#include "config.h"
20
#include <stdio.h>
21
#include <stdio.h>
21
#include <stdlib.h>
22
#include <stdlib.h>
22
#include <unistd.h>
23
#include <unistd.h>
(-)suspend.org/resume.c (-3 / +1 lines)
Lines 9-17 Link Here
9
 *
9
 *
10
 */
10
 */
11
11
12
#define _GNU_SOURCE
12
#include "config.h"
13
#define _LARGEFILE64_SOURCE
14
15
#include <sys/types.h>
13
#include <sys/types.h>
16
#include <sys/stat.h>
14
#include <sys/stat.h>
17
#include <sys/ioctl.h>
15
#include <sys/ioctl.h>
(-)suspend.org/s2ram.c (+1 lines)
Lines 5-10 Link Here
5
 * Distribute under GPLv2.
5
 * Distribute under GPLv2.
6
 */
6
 */
7
7
8
#include "config.h"
8
#include <stdio.h>
9
#include <stdio.h>
9
#include <stdlib.h>
10
#include <stdlib.h>
10
#include <getopt.h>
11
#include <getopt.h>
(-)suspend.org/s2ram.h (+7 lines)
Lines 5-10 Link Here
5
 * Distribute under GPLv2.
5
 * Distribute under GPLv2.
6
 */
6
 */
7
7
8
#ifdef CONFIG_ARCH_X86
9
#include "s2ram-x86.h"
10
#endif
11
#ifdef CONFIG_ARCH_PPC
12
#include "s2ram-ppc.h"
13
#endif
14
8
/* from radeontool.c */
15
/* from radeontool.c */
9
void radeon_cmd_light(int);
16
void radeon_cmd_light(int);
10
void map_radeon_cntl_mem(void);
17
void map_radeon_cntl_mem(void);
(-)suspend.org/s2ram-main.c (+1 lines)
Lines 5-10 Link Here
5
 * Distribute under GPLv2.
5
 * Distribute under GPLv2.
6
 */
6
 */
7
7
8
#include "config.h"
8
#include <stdio.h>
9
#include <stdio.h>
9
#include <stdlib.h>
10
#include <stdlib.h>
10
#include <getopt.h>
11
#include <getopt.h>
(-)suspend.org/s2ram-ppc.c (+1 lines)
Lines 6-11 Link Here
6
 * Distribute under GPLv2.
6
 * Distribute under GPLv2.
7
 */
7
 */
8
8
9
#include "config.h"
9
#include <errno.h>
10
#include <errno.h>
10
#include <fcntl.h>
11
#include <fcntl.h>
11
#include <unistd.h>
12
#include <unistd.h>
(-)suspend.org/s2ram-x86.c (+1 lines)
Lines 6-11 Link Here
6
 * Distribute under GPLv2.
6
 * Distribute under GPLv2.
7
 */
7
 */
8
8
9
#include "config.h"
9
#include <stdio.h>
10
#include <stdio.h>
10
#include <stdlib.h>
11
#include <stdlib.h>
11
#include <errno.h>
12
#include <errno.h>
(-)suspend.org/scripts/Makefile.am (+14 lines)
Line 0 Link Here
1
#
2
# Makefile.am
3
#
4
# Copyright (C) 2007 Alon Bar-Lev <alon.barlev@gmail.com>
5
#
6
# This file is released under the GPLv2.
7
#
8
9
SUBDIRS=\
10
	suse-10.1
11
12
dist_noinst_SCRIPTS=\
13
	create-resume-initrd.sh \
14
	install-resume.sh
(-)suspend.org/scripts/suse-10.1/Makefile.am (+14 lines)
Line 0 Link Here
1
#
2
# Makefile.am
3
#
4
# Copyright (C) 2007 Alon Bar-Lev <alon.barlev@gmail.com>
5
#
6
# This file is released under the GPLv2.
7
#
8
9
dist_noinst_SCRIPTS=\
10
	modify-system-files.sh
11
12
dist_noinst_DATA=\
13
	do_acpi_sleep.patch \
14
	mkinitrd.patch
(-)suspend.org/splash.c (+1 lines)
Lines 9-14 Link Here
9
 *
9
 *
10
 */
10
 */
11
11
12
#include "config.h"
12
#include <stdio.h>
13
#include <stdio.h>
13
#include <stdlib.h>
14
#include <stdlib.h>
14
#include <unistd.h>
15
#include <unistd.h>
(-)suspend.org/splashy_funcs.c (+2 lines)
Lines 9-14 Link Here
9
 *
9
 *
10
 */
10
 */
11
11
12
#include "config.h"
13
12
#ifdef CONFIG_SPLASHY
14
#ifdef CONFIG_SPLASHY
13
#include <string.h>
15
#include <string.h>
14
#include <stdio.h>
16
#include <stdio.h>
(-)suspend.org/suspend.c (-2 / +1 lines)
Lines 9-16 Link Here
9
 *
9
 *
10
 */
10
 */
11
11
12
#define _LARGEFILE64_SOURCE
12
#include "config.h"
13
14
#include <sys/types.h>
13
#include <sys/types.h>
15
#include <sys/stat.h>
14
#include <sys/stat.h>
16
#include <sys/ioctl.h>
15
#include <sys/ioctl.h>
(-)suspend.org/swap-offset.c (+1 lines)
Lines 9-14 Link Here
9
 *
9
 *
10
 */
10
 */
11
11
12
#include "config.h"
12
#include <stdio.h>
13
#include <stdio.h>
13
#include <string.h>
14
#include <string.h>
14
#include <fcntl.h>
15
#include <fcntl.h>
(-)suspend.org/vt.c (+1 lines)
Lines 6-11 Link Here
6
 * (C) 2006 Stefan Seyfried <seife@suse.de>
6
 * (C) 2006 Stefan Seyfried <seife@suse.de>
7
 */
7
 */
8
8
9
#include "config.h"
9
#include <unistd.h>
10
#include <unistd.h>
10
#include <sys/ioctl.h>
11
#include <sys/ioctl.h>
11
#include <sys/kd.h>
12
#include <sys/kd.h>
(-)suspend.org/whitelist.c (+1 lines)
Lines 3-8 Link Here
3
 * and all the workarounds
3
 * and all the workarounds
4
 */
4
 */
5
5
6
#include "config.h"
6
#include <stdlib.h>
7
#include <stdlib.h>
7
#include "whitelist.h"
8
#include "whitelist.h"
8
9

Return to bug 156431