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
31 LIBS = @LIBS@ -L$(top_builddir) -lsim -lucsimutil -lguiucsim -lcmd -lsim
34 exec_prefix = @exec_prefix@
38 datarootdir = @datarootdir@
39 includedir = @includedir@
41 man1dir = $(mandir)/man1
42 man2dir = $(mandir)/man2
47 OBJECTS = sxa.o glob.o \
52 #TEST_OBJ = test_bit.hex test_dis.hex test_mov.hex test_jmp.hex \
56 # Compiling entire program or any subproject
57 # ------------------------------------------
58 all: checkconf otherlibs xa.src tests
63 # Compiling and installing everything and runing test
64 # ---------------------------------------------------
65 install: all installdirs
66 $(INSTALL) sxa$(EXEEXT) $(DESTDIR)$(bindir)/sxa$(EXEEXT)
67 $(STRIP) $(DESTDIR)$(bindir)/sxa$(EXEEXT)
70 # Deleting all the installed files
71 # --------------------------------
73 rm -f $(DESTDIR)$(bindir)/sxa$(EXEEXT)
76 # Performing self-test
77 # --------------------
81 # Performing installation test
82 # ----------------------------
86 # Creating installation directories
87 # ---------------------------------
89 test -d $(DESTDIR)$(bindir) || $(INSTALL) -d $(DESTDIR)$(bindir)
92 # Creating dependencies
93 # ---------------------
96 Makefile.dep: $(srcdir)/*.cc $(srcdir)/*.h
97 $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) $(filter %.cc,$^) >Makefile.dep
100 include $(srcdir)/clean.mk
108 sxa$(EXEEXT): $(OBJECTS) $(top_builddir)/*.a
109 $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS)
112 $(MAKE) -C $(top_builddir)/cmd.src all
113 $(MAKE) -C $(top_builddir)/sim.src all
116 $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
119 $(XAASM) -l $< -o $@ -e $<.lst
122 # Remaking configuration
123 # ----------------------
125 @if [ -f $(top_builddir)/devel ]; then\
126 $(MAKE) -f $(srcdir)/conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" freshconf;\
129 # End of xa.src/Makefile.in