9ba4c00a83cd9304d15080892c16fb95ee49bf96
[fw/sdcc] / sim / ucsim / gui.src / obsolete / portmon.src / Makefile.in
1 #
2 # uCsim gui.src/portmon.src/Makefile
3 #
4 # (c) Drotos Daniel, Talker Bt. 1999
5 #
6
7 SHELL           = /bin/sh
8 CXX             = @CXX@
9 CPP             = @CPP@
10 CXXCPP          = @CXXCPP@
11 RANLIB          = @RANLIB@
12 INSTALL         = @INSTALL@
13
14 PRJDIR          = ../..
15 PKGDIR          = ../
16
17 DEFS            = $(subs -DHAVE_CONFIG_H,,@DEFS@)
18 CPPFLAGS        = @CPPFLAGS@ -I. -I$(PRJDIR) -I$(PKGDIR)
19 CFLAGS          = @CFLAGS@ -Wall
20 CXXFLAGS        = @CXXFLAGS@ -Wall
21 M_OR_MM         = @M_OR_MM@
22
23 LIBS            = -L$(PRJDIR) -L$(PKGDIR) -lgui @CURSES_LIBS@ -lutil @LIBS@
24
25 curses_ok       = @curses_ok@
26
27 prefix          = @prefix@
28 exec_prefix     = @exec_prefix@
29 bindir          = @bindir@
30 libdir          = @libdir@
31 datadir         = @datadir@
32 includedir      = @includedir@
33 mandir          = @mandir@
34 man1dir         = $(mandir)/man1
35 man2dir         = $(mandir)/man2
36 infodir         = @infodir@
37 srcdir          = @srcdir@
38
39 OBJECTS         = portmon.o \
40                   pmapp.o port.o
41
42
43 # Compiling entire program or any subproject
44 # ------------------------------------------
45 all: checkconf otherlibs portmon.src
46
47
48 # Compiling and installing everything and runing test
49 # ---------------------------------------------------
50 install: all installdirs
51         $(INSTALL) -s portmon $(bindir)
52
53
54 # Deleting all the installed files
55 # --------------------------------
56 uninstall:
57         rm -f $(bindir)/portmon
58
59
60 # Performing self-test
61 # --------------------
62 check:
63
64
65 # Performing installation test
66 # ----------------------------
67 installcheck:
68
69
70 # Creating installation directories
71 # ---------------------------------
72 installdirs:
73         test -d $(bindir) || $(INSTALL) -d $(bindir)
74
75
76 # Creating dependencies
77 # ---------------------
78 dep: Makefile.dep
79
80 Makefile.dep: *.cc *.h $(PRJDIR)/*.h $(PKGDIR)/*.h
81         $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) *.cc >Makefile.dep
82
83 include Makefile.dep
84 include clean.mk
85
86 #parser.cc: parser.y
87
88 #plex.cc: plex.l
89
90 # My rules
91 # --------
92 ifeq ($(curses_ok),yes)
93 portmon.src: portmon
94 else
95 portmon.src:
96 endif
97
98 portmon: $(OBJECTS) $(PRJDIR)/*.a $(PKGDIR)/*.a
99         $(CXX) $(CXXFLAGS) -o portmon $(OBJECTS) $(LIBS)
100
101 ifeq ($(curses_ok),yes)
102 otherlibs:
103         cd $(PRJDIR) && $(MAKE) libs
104         cd $(PKGDIR) && $(MAKE) libs
105 else
106 otherlibs:
107 endif
108
109 .cc.o:
110         $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< -o $@
111
112 .y.cc:
113         rm -f $*.cc $*.h
114         $(YACC) -d $<
115         mv y.tab.c $*.cc
116         mv y.tab.h $*.h
117
118 .l.cc:
119         rm -f $*.cc
120         $(LEX) -t $< >$*.cc
121
122
123 # Remaking configuration
124 # ----------------------
125 checkconf:
126         @if [ -f $(PRJDIR)/devel ]; then\
127           $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
128         fi
129
130 # End of gui.src/portmon.src/Makefile.in