blob: ab41e6bc288dc59e14b5d8a2570b0ccecdb98e59 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
CCFLAGS = -fPIC -pipe -Wall -Werror -g
CFLAGS = $(GTK_CFLAGS) $(SOUP_CFLAGS) -I.
CC = gcc $(ARCHOPTS) $(CCFLAGS)
CCSLOW = gcc -O0 $(CCFLAGS)
# ----------------------------------------------------------------------------
OBJECTS = hardinfo.o shell.o util.o iconcache.o loadgraph.o \
menu.o stock.o callbacks.o expr.o report.o binreloc.o \
vendor.o socket.o syncmanager.o remote.o xmlrpc-server.o \
xmlrpc-client.o ssh-conn.o egg-markdown.o markdown-text-view.o \
help-viewer.o
BENCHMARK_OBJECTS = fbench.o sha1.o blowfish.o md5.o nqueens.o fftbench.o guibench.o
MODULES = computer.so devices.so benchmark.so network.so
all: hardinfo
hardinfo: $(OBJECTS) $(MODULES)
$(CC) $(CCFLAGS) -o hardinfo -Wl,-export-dynamic $(OBJECTS) $(GTK_LIBS) \
$(SOUP_LIBS)
$(BENCHMARK_OBJECTS):
$(CCSLOW) $(CCFLAGS) $(CFLAGS) -c $*.c -o $@
benchmark.so: benchmark.c $(BENCHMARK_OBJECTS)
$(CC) $(CCFLAGS) $(CFLAGS) -o $@ -shared $< $(GTK_FLAGS) $(GTK_LIBS) $(BENCHMARK_OBJECTS)
%.so: %.c
$(CC) $(CCFLAGS) $(CFLAGS) -o $@ -shared $< $(GTK_FLAGS) $(GTK_LIBS)
clean:
rm -rf .xvpics pixmaps/.xvpics *.o *.so hardinfo report
find . -name \*~ -exec rm -v {} \;
find . -name x86 -type l -exec rm -v {} \;
dist-clean: clean
rm -rf Makefile debian/hardinfo/ config.h arch/this
package: dist-clean
@echo "Creating tar.gz..."
cd .. && tar czf $(PACKAGE).tar.gz $(PACKAGE)/* && cd $(PACKAGE)
@echo "Creating tar.bz2..."
cd .. && tar cjf $(PACKAGE).tar.bz2 $(PACKAGE)/* && cd $(PACKAGE)
deb: dist-clean
@echo "Creating deb..."
dpkg-buildpackage -rfakeroot -k${USER}
install: all
rm -rf ${DESTDIR}${LIBDIR}/hardinfo/modules ${DESTDIR}/usr/share/hardinfo/pixmaps
install -d ${DESTDIR}/usr/bin
install -d ${DESTDIR}/usr/local
install -d ${DESTDIR}/usr/share/applications
install -d ${DESTDIR}${LIBDIR}/hardinfo/modules
install -d ${DESTDIR}/usr/share/hardinfo/pixmaps
install -d ${DESTDIR}/usr/share/hardinfo/doc
install -m 644 hardinfo.desktop ${DESTDIR}/usr/share/applications
install -m 755 hardinfo ${DESTDIR}/usr/bin/hardinfo
install -m 755 ${MODULES} ${DESTDIR}${LIBDIR}/hardinfo/modules
install -m 644 pixmaps/* ${DESTDIR}/usr/share/hardinfo/pixmaps
install -m 644 doc/*.hlp ${DESTDIR}/usr/share/hardinfo/doc || true
install -m 644 doc/*.png ${DESTDIR}/usr/share/hardinfo/doc || true
install -m 644 benchmark.conf ${DESTDIR}/usr/share/hardinfo
install -m 644 benchmark.data ${DESTDIR}/usr/share/hardinfo
installer:
makepackage
|