2 # uCsim xa.src/Makefile
4 # (c) Drotos Daniel, Talker Bt. 1997
17 top_builddir = @top_builddir@
18 top_srcdir = @top_srcdir@
22 DEFS = $(subs -DHAVE_CONFIG_H,,@DEFS@)
23 CPPFLAGS = @CPPFLAGS@ -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) \
24 -I$(top_srcdir)/cmd.src -I$(top_srcdir)/sim.src \
25 -I$(top_srcdir)/gui.src
26 CFLAGS = @CFLAGS@ -Wall
27 CXXFLAGS = @CXXFLAGS@ -Wall
30 LIBS = @LIBS@ -L$(top_builddir) -lsim -lutil -lguiucsim -lcmd -lsim
33 exec_prefix = @exec_prefix@
37 includedir = @includedir@
39 man1dir = $(mandir)/man1
40 man2dir = $(mandir)/man2
45 OBJECTS = sxa.o glob.o \
50 #TEST_OBJ = test_bit.hex test_dis.hex test_mov.hex test_jmp.hex \
54 # Compiling entire program or any subproject
55 # ------------------------------------------
56 all: checkconf otherlibs xa.src tests
61 # Compiling and installing everything and runing test
62 # ---------------------------------------------------
63 install: all installdirs
64 $(INSTALL) sxa$(EXEEXT) $(DESTDIR)$(bindir)/sxa$(EXEEXT)
65 $(STRIP) $(DESTDIR)$(bindir)/sxa$(EXEEXT)
68 # Deleting all the installed files
69 # --------------------------------
71 rm -f $(DESTDIR)$(bindir)/sxa$(EXEEXT)
74 # Performing self-test
75 # --------------------
79 # Performing installation test
80 # ----------------------------
84 # Creating installation directories
85 # ---------------------------------
87 test -d $(DESTDIR)$(bindir) || $(INSTALL) -d $(DESTDIR)$(bindir)
90 # Creating dependencies
91 # ---------------------
94 Makefile.dep: $(srcdir)/*.cc $(srcdir)/*.h
95 $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) $(filter %.cc,$^) >Makefile.dep
98 include $(srcdir)/clean.mk
106 sxa$(EXEEXT): $(OBJECTS) $(top_builddir)*.a
107 $(CXX) $(CXXFLAGS) -o $@ $(OBJECTS) $(LIBS)
110 $(MAKE) -C $(top_builddir)cmd.src all
111 $(MAKE) -C $(top_builddir)sim.src all
114 $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
117 $(XAASM) -l $< -o $@ -e $<.lst
120 # Remaking configuration
121 # ----------------------
123 @if [ -f $(top_builddir)devel ]; then\
124 $(MAKE) -f $(srcdir)/conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" freshconf;\
127 # End of xa.src/Makefile.in