source: trunk/third/nmh/zotnet/tws/Makefile.in @ 12544

Revision 12544, 2.0 KB checked in by danw, 26 years ago (diff)
use CPPFLAGS
Line 
1#
2# Makefile for zotnet/tws subdirectory
3#
4# $Id: Makefile.in,v 1.2 1999-02-23 17:00:50 danw Exp $
5#
6
7SHELL = /bin/sh
8
9top_srcdir = @top_srcdir@
10srcdir     = @srcdir@
11VPATH      = @srcdir@
12
13CC         = @CC@
14CFLAGS     = @CFLAGS@
15DEFS       = @DEFS@
16INCLUDES   = -I../.. -I$(srcdir) -I$(top_srcdir)
17
18COMPILE = $(CC) -c $(CPPFLAGS) $(DEFS) $(INCLUDES) $(CFLAGS)
19
20AWK = @AWK@
21# LEX = @LEX@
22LEX = lex
23SED = sed
24
25.SUFFIXES:
26.SUFFIXES: .c .o
27
28.c.o:
29        $(COMPILE) $<
30
31# header files
32HDRS = tws.h
33
34# source files
35SRCS = dtime.c lexstring.c
36
37# object files
38OBJS = dtimep.o dtime.o lexstring.o
39
40# auxiliary files
41AUX = Makefile.in dtimep.lex lexedit.sed dtimep.c-lexed
42
43# all files in this directory included in the distribution
44DIST = $(HDRS) $(SRCS) $(AUX)
45
46# ========= DEPENDENCIES FOR BUILDING ==========
47
48all: $(OBJS)
49
50# This will bomb if lex is really flex, so check
51# file and use pre-generated version if necessary
52dtimep.c: $(srcdir)/dtimep.lex $(srcdir)/lexedit.sed
53        $(LEX) -nt $(srcdir)/dtimep.lex | $(SED) -f $(srcdir)/lexedit.sed > $@
54        -@len=`wc -l $@ | $(AWK) ' { print $$1 } '`; \
55        if [ $$len -gt 500 ]; \
56          then exit 0; \
57        else \
58          echo "LEX FAILED: using pre-lexed $@"; \
59          cp $(srcdir)/$@-lexed $@; \
60        fi
61
62# This needs to be generated by lex, not flex
63dtimep.c-lexed: $(srcdir)/dtimep.lex $(srcdir)/lexedit.sed
64        $(LEX) -nt $(srcdir)/dtimep.lex | $(SED) -f $(srcdir)/lexedit.sed > $(srcdir)/$@
65
66install:
67
68uninstall:
69
70# ========== DEPENDENCIES FOR CLEANUP ==========
71
72mostlyclean:
73        rm -f *.o *~
74
75clean: mostlyclean
76        rm -f dtimep.c
77
78distclean: clean
79        rm -f Makefile
80
81realclean: distclean
82        rm -f dtimep.c-lexed
83
84superclean: realclean
85
86# ========== DEPENDENCIES FOR MAINTENANCE ==========
87
88subdir = zotnet/tws
89
90Makefile: Makefile.in ../../config.status
91        cd ../.. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
92 
93distdir = ../../`cat ../../distname`/$(subdir)
94nmhdist: $(DIST)
95        @echo "Copying distribution files in $(subdir)"
96        @for file in $(DIST); do \
97          cp -p $(srcdir)/$$file $(distdir); \
98        done
99
Note: See TracBrowser for help on using the repository browser.