eaf7843b4ae349ce1c8d1e33eb226bcaca955363
[fw/sdcc] / sim / ucsim / gui.src / Makefile.in
1 #
2 # uCsim gui.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
16 DEFS            = $(subs -DHAVE_CONFIG_H,,@DEFS@)
17 CPPFLAGS        = @CPPFLAGS@ -I. -I$(PRJDIR)
18 CFLAGS          = @CFLAGS@ -Wall
19 CXXFLAGS        = @CXXFLAGS@ -Wall
20 M_OR_MM         = @M_OR_MM@
21
22 LIBS            = @LIBS@ @CURSES_LIBS@ -L$(PRJDIR)
23
24 curses_ok       = @curses_ok@
25
26 prefix          = @prefix@
27 exec_prefix     = @exec_prefix@
28 bindir          = @bindir@
29 libdir          = @libdir@
30 datadir         = @datadir@
31 includedir      = @includedir@
32 mandir          = @mandir@
33 man1dir         = $(mandir)/man1
34 man2dir         = $(mandir)/man2
35 infodir         = @infodir@
36 srcdir          = @srcdir@
37
38 PKGS            = serio.src portmon.src
39
40 LOBJECTS        = event.o \
41                   view.o frame.o bg.o label.o \
42                   group.o win.o desk.o app.o
43
44
45 # Compiling entire program or any subproject
46 # ------------------------------------------
47 all: gui.src
48
49 libs: guilib
50
51 ifeq ($(curses_ok),yes)
52 gui.src: checkconf guilib
53 else
54 gui.src: checkconf guilib
55 endif
56         @for pkg in $(PKGS); do\
57           $(MAKE) -C $$pkg $$pkg ;\
58         done
59
60 a: a.o
61         $(CXX) $(LDFLAGS) $(LIBS) a.o -o $@
62
63
64 # Compiling and installing everything and runing test
65 # ---------------------------------------------------
66 install:
67         @for pkg in $(PKGS); do\
68           cd $$pkg && $(MAKE) install ; cd ..;\
69         done
70
71
72 # Deleting all the installed files
73 # --------------------------------
74 uninstall:
75         @for pkg in $(PKGS); do\
76           cd $$pkg && $(MAKE) uninstall ; cd ..;\
77         done
78
79
80 # Performing self-test
81 # --------------------
82 check:
83         @for pkg in $(PKGS); do\
84           cd $$pkg && $(MAKE) check ; cd ..;\
85         done
86
87
88 # Performing installation test
89 # ----------------------------
90 installcheck:
91         @for pkg in $(PKGS); do\
92           cd $$pkg && $(MAKE) installcheck ; cd ..;\
93         done
94
95
96 # Creating installation directories
97 # ---------------------------------
98 installdirs:
99         @for pkg in $(PKGS); do\
100           cd $$pkg && $(MAKE) installdirs ; cd ..;\
101         done
102
103
104 # Creating dependencies
105 # ---------------------
106 dep: Makefile.dep
107
108 Makefile.dep: *.cc *.h
109         $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) *.cc >Makefile.dep
110
111 include Makefile.dep
112 include clean.mk
113
114 #parser.cc: parser.y
115
116 #plex.cc: plex.l
117
118 # My rules
119 # --------
120 ifeq ($(curses_ok),yes)
121 guilib: libgui.a
122 else
123 guilib:
124 endif
125
126 libgui.a: $(LOBJECTS)
127         ar -rcu $*.a $(LOBJECTS)
128         $(RANLIB) $*.a
129
130 .cc.o:
131         $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< -o $@
132
133
134 # Remaking configuration
135 # ----------------------
136 checkconf:
137         @if [ -f $(PRJDIR)/devel ]; then\
138           $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
139         fi
140
141 # End of gui.src/Makefile