2 # ucsim cmd.src/Makefile
4 # (c) Drotos Daniel, Talker Bt. 1997
18 BISON_PLUS_PLUS = @BISON_PLUS_PLUS@
20 top_builddir = @top_builddir@
21 top_srcdir = @top_srcdir@
23 DEFS = $(subs -DHAVE_CONFIG_H,,@DEFS@)
24 CPPFLAGS = @CPPFLAGS@ -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) \
25 -I$(top_srcdir)/sim.src -I$(top_srcdir)/gui.src
26 CFLAGS = @CFLAGS@ -Wall
27 CXXFLAGS = @CXXFLAGS@ -Wall
29 WINSOCK_AVAIL = @WINSOCK_AVAIL@
32 exec_prefix = @exec_prefix@
36 includedir = @includedir@
38 man1dir = $(mandir)/man1
39 man2dir = $(mandir)/man2
44 OBJECTS = cmdset.o command.o cmdutil.o syntax.o \
45 get.o set.o timer.o bp.o info.o show.o cmdgui.o cmdconf.o \
46 cmduc.o cmdstat.o cmdmem.o \
47 cmdpars.o cmdlex.o newcmd.o
49 ifeq ($(WINSOCK_AVAIL), 1)
50 OBJECTS += newcmdwin32.o
52 OBJECTS += newcmdposix.o
55 DEVEL = $(shell ( bash -c "test -e $(top_builddir)devel && echo yes" ))
57 # Compiling entire program or any subproject
58 # ------------------------------------------
64 # Compiling and installing everything and runing test
65 # ---------------------------------------------------
66 install: all installdirs
69 # Deleting all the installed files
70 # --------------------------------
74 # Performing self-test
75 # --------------------
81 # Performing installation test
82 # ----------------------------
86 # Creating installation directories
87 # ---------------------------------
91 # Creating dependencies
92 # ---------------------
95 Makefile.dep: $(srcdir)/*.cc $(srcdir)/*.h
96 $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) $(addprefix $(srcdir)/, $(OBJECTS:.o=.cc)) >Makefile.dep
99 include $(srcdir)/clean.mk
101 cmdpars.cc: cmdpars.y
104 cmdlex.cc: cmdlex.l cmdpars.h
110 cmdlib: $(top_builddir)libcmd.a
112 $(top_builddir)libcmd.a: $(OBJECTS)
113 ar -rcu $*.a $(OBJECTS)
117 $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
128 $(BISON_PLUS_PLUS) -d -o $*.cc $<
132 $(LEX) --c++ -o $*.cc $<
136 # Remaking configuration
137 # ----------------------
139 @if [ -f $(top_builddir)devel ]; then\
140 $(MAKE) -f conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" freshconf;\
143 # End of cmd.src/Makefile.in