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 datarootdir = @datarootdir@
38 includedir = @includedir@
40 man1dir = $(mandir)/man1
41 man2dir = $(mandir)/man2
46 OBJECTS = sxa.o glob.o \
51 #TEST_OBJ = test_bit.hex test_dis.hex test_mov.hex test_jmp.hex \
55 # Compiling entire program or any subproject
56 # ------------------------------------------
57 all: checkconf otherlibs xa.src tests
62 # Compiling and installing everything and runing test
63 # ---------------------------------------------------
64 install: all installdirs
65 $(INSTALL) sxa$(EXEEXT) $(DESTDIR)$(bindir)/sxa$(EXEEXT)
66 $(STRIP) $(DESTDIR)$(bindir)/sxa$(EXEEXT)
69 # Deleting all the installed files
70 # --------------------------------
72 rm -f $(DESTDIR)$(bindir)/sxa$(EXEEXT)
75 # Performing self-test
76 # --------------------
80 # Performing installation test
81 # ----------------------------
85 # Creating installation directories
86 # ---------------------------------
88 test -d $(DESTDIR)$(bindir) || $(INSTALL) -d $(DESTDIR)$(bindir)
91 # Creating dependencies
92 # ---------------------
95 Makefile.dep: $(srcdir)/*.cc $(srcdir)/*.h
96 $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) $(filter %.cc,$^) >Makefile.dep
99 include $(srcdir)/clean.mk
107 sxa$(EXEEXT): $(OBJECTS) $(top_builddir)/*.a
108 $(CXX) $(CXXFLAGS) -o $@ $(OBJECTS) $(LIBS)
111 $(MAKE) -C $(top_builddir)/cmd.src all
112 $(MAKE) -C $(top_builddir)/sim.src all
115 $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
118 $(XAASM) -l $< -o $@ -e $<.lst
121 # Remaking configuration
122 # ----------------------
124 @if [ -f $(top_builddir)/devel ]; then\
125 $(MAKE) -f $(srcdir)/conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" freshconf;\
128 # End of xa.src/Makefile.in