This commit was manufactured by cvs2svn to create branch 'uc'.
[gnokii.git] / gnokiid / Makefile
1
2 #
3 # Makefile for the GNOKII tool suite.
4 #
5 # Copyright (C) 1999 Hugh Blemings & Pavel Janík ml.
6 #               2000 Karel Zak
7 #
8
9 TOPDIR=..
10 include $(TOPDIR)/Makefile.global
11
12 CFLAGS  += $(PTHREAD_CFLAGS)
13 LDFLAGS += $(PTHREAD_LIBS)
14
15 OBJS =  gnokiid.o
16
17 all: gnokiid
18
19 gnokiid: $(OBJS) $(TOPDIR)/common/COMMON.o $(TOPDIR)/common/DATA.o
20
21 $(TOPDIR)/common/COMMON.o: 
22         $(MAKE) -C $(TOPDIR)/common COMMON.o
23
24 $(TOPDIR)/common/DATA.o:
25         $(MAKE) -C $(TOPDIR)/common DATA.o
26
27 $(TOPDIR)/common/libmygnokii.so:
28         $(MAKE) -C $(TOPDIR)/common makelib
29
30 makelib: $(OBJS) $(TOPDIR)/common/libmygnokii.so
31         $(CC) $(LDFLAGS) -L$(TOPDIR)/common -lmygnokii $(OBJS) -o gnokiidlib
32
33 clean:
34         $(RM) $(OBJS) *~ depend gnokiid gnokiidlib *.exe core *.bak
35
36 install: all
37         $(INSTALL) -d $(sbindir)
38         $(INSTALL) gnokiid $(sbindir)
39         $(INSTALL) gnokiidlib $(sbindir)/gnokiid
40
41 install-strip: all
42         $(INSTALL) -d $(sbindir)
43         $(INSTALL) -s gnokiid $(sbindir)
44         $(INSTALL) -s gnokiidlib $(sbindir)/gnokiid
45         @echo "done"
46
47 install-suid: all
48         @if [ -z "/bin/grep -e '^gnokii:' /etc/group" ]; then \
49                 /usr/sbin/groupadd gnokii; \
50         fi
51         $(INSTALL) -d $(sbindir)
52         $(INSTALL) -o root -g gnokii -m 4750 gnokiid $(sbindir)
53         $(INSTALL) -o root -g gnokii -m 4750 gnokiidlib $(sbindir)/gnokiid
54         @echo "done"
55
56 install-ss: all
57         @if [ -z "/bin/grep -e '^gnokii:' /etc/group" ]; then \
58                 /usr/sbin/groupadd gnokii; \
59         fi
60         $(INSTALL) -d $(sbindir)
61         $(INSTALL) -o root -g gnokii -m 4750 -s gnokiid $(sbindir)
62         $(INSTALL) -o root -g gnokii -m 4750 -s gnokiidlib $(sbindir)/gnokiid
63         @echo "done"
64
65 depend dep:
66         $(CC) $(CFLAGS) -MM *.c >depend
67
68 ifeq (depend,$(wildcard depend))
69 include depend
70 endif
71
72 .PHONY: all install clean dep depend