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 datarootdir = @datarootdir@
37 includedir = @includedir@
39 man1dir = $(mandir)/man1
40 man2dir = $(mandir)/man2
45 OBJECTS = cmdset.o command.o cmdutil.o syntax.o \
46 get.o set.o timer.o bp.o info.o show.o cmdgui.o cmdconf.o \
47 cmduc.o cmdstat.o cmdmem.o \
48 cmdpars.o cmdlex.o newcmd.o
50 ifeq ($(WINSOCK_AVAIL), 1)
51 OBJECTS += newcmdwin32.o
53 OBJECTS += newcmdposix.o
56 DEVEL = $(shell test -e $(top_builddir)/devel && echo yes)
58 # Compiling entire program or any subproject
59 # ------------------------------------------
65 # Compiling and installing everything and runing test
66 # ---------------------------------------------------
67 install: all installdirs
70 # Deleting all the installed files
71 # --------------------------------
75 # Performing self-test
76 # --------------------
82 # Performing installation test
83 # ----------------------------
87 # Creating installation directories
88 # ---------------------------------
92 # Creating dependencies
93 # ---------------------
96 Makefile.dep: $(srcdir)/*.cc $(srcdir)/*.h
97 $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) $(addprefix $(srcdir)/, $(OBJECTS:.o=.cc)) >Makefile.dep
100 include $(srcdir)/clean.mk
102 cmdpars.cc: cmdpars.y
105 cmdlex.cc: cmdlex.l cmdpars.h
111 cmdlib: $(top_builddir)/libcmd.a
113 $(top_builddir)/libcmd.a: $(OBJECTS)
114 ar -rcu $*.a $(OBJECTS)
118 $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
129 $(BISON_PLUS_PLUS) -d -o $*.cc $<
133 $(LEX) --c++ -o $*.cc $<
137 # Remaking configuration
138 # ----------------------
140 @if [ -f $(top_builddir)/devel ]; then\
141 $(MAKE) -f conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" freshconf;\
144 # End of cmd.src/Makefile.in