1 | ######################################################################## |
---|
2 | # SCCS_data: @(#) WcMakeC.tmpl 1.5 92/12/09 14:20:31 |
---|
3 | # |
---|
4 | # Wcl Makefile Client Template |
---|
5 | # |
---|
6 | # LOCAL_LIBRARIES |
---|
7 | # CLIENT, CLASS, SRCS, OBJS, |
---|
8 | # APPDEFS, APPDEF_DEFS |
---|
9 | # all need to be set before including this. |
---|
10 | # |
---|
11 | |
---|
12 | # Build and install client and man page |
---|
13 | # |
---|
14 | |
---|
15 | .c.o: |
---|
16 | rm -f $@ |
---|
17 | $(CC) -c $(CFLAGS_PROG) $*.c |
---|
18 | |
---|
19 | all:: $(CLIENT) |
---|
20 | |
---|
21 | $(CLIENT): $(OBJS) $(DEPLIBS) |
---|
22 | rm -f $@ |
---|
23 | $(LD) -o $@ $(OBJS) $(LDFLAGS_PROG) |
---|
24 | |
---|
25 | install:: $(CLIENT) |
---|
26 | cp $(CLIENT) $(DESTDIR)$(BINDIR) |
---|
27 | chown $(OWNER) $(DESTDIR)$(BINDIR)/$(CLIENT) |
---|
28 | chmod $(INSTBINFLAGS) $(DESTDIR)$(BINDIR)/$(CLIENT) |
---|
29 | |
---|
30 | install.man:: $(CLIENT).man |
---|
31 | cp $(CLIENT).$(PGMMANSRCSUFFIX) \ |
---|
32 | $(DESTDIR)$(PGMMANDIR)/$(CLIENT).$(PGMMANSUFFIX) |
---|
33 | chown $(OWNER) $(DESTDIR)$(PGMMANDIR)/$(CLIENT).$(PGMMANSUFFIX) |
---|
34 | chmod $(INSTMANFLAGS) $(DESTDIR)$(PGMMANDIR)/$(CLIENT).$(PGMMANSUFFIX) |
---|
35 | |
---|
36 | scoman: |
---|
37 | rm -f $(CLIENT).C.z |
---|
38 | nroff -man $(CLIENT).$(PGMMANSRCSUFFIX) > $(CLIENT).C |
---|
39 | pack -f $(CLIENT).C |
---|
40 | |
---|
41 | clean:: |
---|
42 | rm -f $(CLIENT) $(OBJS) |
---|
43 | |
---|
44 | install:: |
---|
45 | if [ -d $(DESTDIR)$(XAPPLOADDIR)/$(CLIENT) ]; then \ |
---|
46 | set +x; \ |
---|
47 | else (set -x; mkdir $(DESTDIR)$(XAPPLOADDIR)/$(CLIENT) ; \ |
---|
48 | chmod 555 $(DESTDIR)$(XAPPLOADDIR)/$(CLIENT) ) ; \ |
---|
49 | fi |
---|
50 | |
---|
51 | install:: $(CLASS) |
---|
52 | cp $(CLASS) $(DESTDIR)$(XAPPLOADDIR) |
---|
53 | chown $(OWNER) $(DESTDIR)$(XAPPLOADDIR)/$(CLASS) |
---|
54 | chmod $(INSTAPPDEFFLAGS) $(DESTDIR)$(XAPPLOADDIR)/$(CLASS) |
---|
55 | |
---|
56 | install:: $(APPDEFS) |
---|
57 | for i in $(APPDEFS); do \ |
---|
58 | (set -x; cp $$i $(DESTDIR)$(XAPPLOADDIR)/$(CLIENT)) ; \ |
---|
59 | done |
---|
60 | ( cd $(DESTDIR)$(XAPPLOADDIR)/$(CLIENT) ; \ |
---|
61 | chown $(OWNER) * ; chmod $(INSTAPPDEFFLAGS) * ) |
---|
62 | |
---|
63 | includes:: |
---|
64 | @echo Done including in $(CLIENT) |
---|