-
Notifications
You must be signed in to change notification settings - Fork 3
/
makefile
58 lines (40 loc) · 1.4 KB
/
makefile
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
#=======================================================================
#HermuitGUI makefile
#===================
VERSION=1
AR=ar rcs
CD=cd
CP=cp -a
LN=ln -sfn
MD=mkdir -p
MV=mv
RM=rm -rf
STRIP=strip
CHMOD=chmod
all: libhgui.so libhgui.a hguidemo/hguidemo
libhgui.so: hgui.c hgui.h
$(CC) -c hgui.c -fpic -o hgui.so.o -lX11 # -DHGUI_SELECTWIDGETS -DHGUI_BUTTONS # -DDEBUG # -DUSE_XFT -lXft
$(CC) hgui.so.o -shared -o libhgui.so -lX11 #-lm
libhgui.a: hgui.c hgui.h
$(CC) -c hgui.c -o hgui.a.o -lX11 #-lm
$(AR) libhgui.a hgui.a.o
hguidemo/hguidemo: hguidemo/hguidemo.c hgui.c hgui.h hguidemo/robodance.anim
make -C hguidemo
install: /usr/lib/libhgui.so /usr/lib/libhgui.a /usr/include/hgui.h
/usr/lib/libhgui.so: ./libhgui.so
$(CP) libhgui.so /usr/lib/libhgui.so.$(VERSION)
$(STRIP) /usr/lib/libhgui.so.$(VERSION) #not a standard thing for GNU but it's a bit smaller this way
$(CHMOD) 0755 /usr/lib/libhgui.so.$(VERSION)
$(CD) /usr/lib/ ; $(LN) libhgui.so.$(VERSION) libhgui.so
/usr/lib/libhgui.a: ./libhgui.a
$(CP) libhgui.a /usr/lib/
/usr/include/hgui.h: ./hgui.h
$(CP) hgui.h /usr/include/hgui.h
clean:
$(RM) hgui.so.o libhgui.so hgui.a.o libhgui.a hgui.o
make -C hguidemo clean
uninstall:
$(RM) /usr/lib/libhgui.so /usr/lib/libhgui.so.$(VERSION) /usr/lib/libhgui.a
$(RM) /usr/include/hgui.h
purge: clean uninstall
#=======================================================================