This commit was generated by cvs2svn to compensate for changes in r164,
[gnokii.git] / gnokii / 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
13 CFLAGS  += $(PTHREAD_CFLAGS)
14 LDFLAGS += $(PTHREAD_LIBS)
15
16 ifdef XPM_LIBS
17     LDFLAGS +=$(XPM_LIBS)
18     LDLIBS  +=$(XPM_LIBS)
19 endif
20
21 OBJS =  gnokii.o
22
23 ifdef OWN_GETOPT
24     OBJS += $(TOPDIR)/getopt/libgetopt.a
25 endif
26
27 all: gnokii
28
29 gnokii: $(OBJS) $(TOPDIR)/common/libgnokii.a $(TOPDIR)/common/gsm-filetypes.o
30
31 $(TOPDIR)/common/COMMON.o:
32         $(MAKE) -C $(TOPDIR)/common libgnokii.a
33
34 $(TOPDIR)/common/gsm-filetypes.o:
35         $(MAKE) -C $(TOPDIR)/common gsm-filetypes.o
36
37 $(TOPDIR)/getopt/libgetopt.a:
38         $(MAKE) -C $(TOPDIR)/getopt
39
40 clean:
41         $(RM) $(OBJS) *~ depend gnokii *.exe core *.bak
42
43 install: all
44         $(INSTALL) -d $(bindir)
45         $(INSTALL) gnokii $(bindir)
46
47 install-strip: all
48         $(INSTALL) -d $(bindir)
49         $(INSTALL) -s gnokii $(bindir)
50         @echo "done"
51
52 install-suid: all
53         @if [ -z "/bin/grep -e '^gnokii:' /etc/group" ]; then \
54                 /usr/sbin/groupadd gnokii; \
55         fi
56         $(INSTALL) -d $(bindir)
57         $(INSTALL) -o root -g gnokii -m 0750 gnokii $(bindir)
58         @echo
59
60 install-ss: all
61         @if [ -z "/bin/grep -e '^gnokii:' /etc/group" ]; then \
62                 /usr/sbin/groupadd gnokii; \
63         fi
64         $(INSTALL) -d $(bindir)
65         $(INSTALL) -o root -g gnokii -m 0750 -s gnokii $(bindir)
66         @echo
67
68 depend dep:
69         $(CC) $(CFLAGS) -MM *.c >depend
70
71 ifeq (depend,$(wildcard depend))
72 include depend
73 endif
74
75 .PHONY: all install clean dep depend