-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile.hp.broke
104 lines (81 loc) · 3.08 KB
/
Makefile.hp.broke
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
PREFIX=/opt/tmp/xosd
CC=gcc
VERSION=0.3.0
CFLAGS=$(GTK) $(XMMS) -fPIC -Wall -pipe -I. -DXOSD_VERSION=\"$(VERSION)\" -I/usr/X11R6/include
LFLAGS=-L. -lxosd
SOLFLAGS=-L/usr/X11R6/lib -lXext -lpthread -lXt -lX11
SOURCES=AUTHORS CHANGELOG README LICENSE Makefile testprog.c xosd.c xosd.h xmms_osd.c
#default: testprog libxmms_osd.so osd_cat
#default: all libxmms_osd.sl testprog
#Need 10.20 GNU Pthreads?
all: libxmms_osd.sl
SYS=`uname -r`; echo $$SYS;\
if test "$$SYS" = "B.10.20";\
then \
$(CC) $(CFLAGS) -c -o xosd1020.o xosd1020.c; \
ar cr libxosd.a xosd1020.o; \
ld -b -s -o libxosd.sl xosd1020.o; \
echo "10.20 Libs done"; \
exit;\
else \
echo "Normal Pthread build for 11.00 ...";\
fi
%.o: %.c
$(CC) -c -o $@ $< $(CFLAGS)
libxosd.sl: xosd.o
ar cr libxosd.a xosd.o
ld -b -s -o libxosd.sl xosd.o
GTK =-I/opt/gtk+/include -I/opt/glib/lib/glib/include -I/opt/glib/include -I/usr/include/X11R6
XMMS =-I/opt/xmms/include -I/opt/xmms/include/xmms -I/opt/gtk+/include -I/opt/glib/lib/glib/include -I/opt/glib/include -D_REENTRANT -I/usr/include/X11R6
#Only go through with this on 11.00 Systems ...
libxmms_osd.sl:
MYSYS=`uname -r`; echo $$MYSYS;\
if test "$$MYSYS" = "B.11.00";\
then \
echo "Making XMMS Plugin Library";\
$(CC) $(CFLAGS) -c -o xmms_osd.o xmms_osd.c;ar cr libxmms_osd.a xmms_osd.o;ld -b -s -o libxmms_osd.sl xmms_osd.o;\
$(CC) $(CFLAGS) -c -o xosd.o xosd.c;ar cr libxosd.a xosd.o;ld -b -s -o libxosd.sl xosd.o;\
else \
echo "No XMMS Plugin";\
fi
testprog: testprog.o
$(CC) -o $@ testprog.o $(SOLFLAGS) -lrt libxosd.a
#You still need to link libxosd.a for xosd_init(), etc.
#<stephie>
testprog2: testprog.o libxmms_osd.sl
$(CC) -o $@ testprog.o libxmms_osd.a libxosd.a $(SOLFLAGS) -lrt
#This just seems rather confused to me ...
#<stephie>
#xmms_osd: xmms_osd.o
# $(CC) -shared -o $@ $+ `/opt/gtk+/bin/gtk-config --libs` $(LFLAGS)
# ld -b -s -o libxmms_xosd.sl xmms_osd.o $(SOLFLAGS) $+
#You dont include this obj in either of the libs (you get duplicate symbols)
#<stephie>
#osd_cat.o: xosd.c
# $(CC) -c xosd.c -o osd_cat.o $(CFLAGS)
#This Supposed to produced a binary?? No main() found!?
#<stephie>
#osd_cat: osd_cat.o
# $(CC) -o $@ osd_cat.o $(LFLAGS) -lrt
tar: xosd-$(VERSION).tar.gz
xosd-$(VERSION).tar.gz:
ln -s . xosd-$(VERSION)
tar cfz $@ $(patsubst %, xosd-$(VERSION)/%, $(SOURCES))
rm xosd-$(VERSION)
bindir=/opt/xosd/bin
libdir=/opt/xosd/lib
install:
test -d $(bindir) || mkdirhier $(bindir)
test -d $(libdir) || mkdirhier $(libdir)
bsdinst -c -m 0644 libxosd.a $(libdir)/lib
bsdinst -c -m 0755 libxosd.sl $(libdir)/lib
test -d $(libdir)/Plugins/General || mkdirhier $(libdir)/Plugins/General
bsdinst -c -m 0644 libxmms_osd.a $(libdir)/Plugins/General
bsdinst -c -m 0755 libxmms_osd.sl $(libdir)/Plugins/General
@echo "Copy libxmms_osd to $(HOME)/.xmms/Plugins/General"
# rm -f $(HOME)/.xmms/Plugins/General/libxmms_osd.so
# cp -a libxmms_osd.so $(HOME)/.xmms/Plugins/General
# cp -a osd_cat $(PREFIX)/bin
clean:
rm -f *~ *.o xosd testprog libxosd.sl libxmms_osd.a libxmms_osd.sl libxosd.a osd_cat
rm -f xosd-$(VERSION).tar.gz