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