2 # uCsim xa.src/Makefile
4 # (c) Drotos Daniel, Talker Bt. 1997
21 DEFS = $(subs -DHAVE_CONFIG_H,,@DEFS@)
22 CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR) \
23 -I$(PRJDIR)/cmd.src -I$(PRJDIR)/sim.src -I$(PRJDIR)/gui.src
24 CFLAGS = @CFLAGS@ -Wall
25 CXXFLAGS = @CXXFLAGS@ -Wall
28 LIBS = @LIBS@ -L$(PRJDIR) -lsim -lutil -lguiucsim -lcmd -lsim
31 exec_prefix = @exec_prefix@
35 includedir = @includedir@
37 man1dir = $(mandir)/man1
38 man2dir = $(mandir)/man2
42 OBJECTS = sxa.o glob.o \
47 #TEST_OBJ = test_bit.hex test_dis.hex test_mov.hex test_jmp.hex \
51 # Compiling entire program or any subproject
52 # ------------------------------------------
53 all: checkconf otherlibs xa.src tests
58 # Compiling and installing everything and runing test
59 # ---------------------------------------------------
60 install: all installdirs
61 $(INSTALL) sxa$(EXEEXT) $(DESTDIR)$(bindir)/sxa$(EXEEXT)
62 $(STRIP) $(DESTDIR)$(bindir)/sxa$(EXEEXT)
65 # Deleting all the installed files
66 # --------------------------------
68 rm -f $(DESTDIR)$(bindir)/sxa$(EXEEXT)
71 # Performing self-test
72 # --------------------
76 # Performing installation test
77 # ----------------------------
81 # Creating installation directories
82 # ---------------------------------
84 test -d $(DESTDIR)$(bindir) || $(INSTALL) -d $(DESTDIR)$(bindir)
87 # Creating dependencies
88 # ---------------------
91 Makefile.dep: *.cc *.h
92 $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) *.cc >Makefile.dep
103 sxa$(EXEEXT): $(OBJECTS) $(PRJDIR)/*.a
104 $(CXX) $(CXXFLAGS) -o $@ $(OBJECTS) $(LIBS)
107 cd $(PRJDIR)/cmd.src && $(MAKE) all
108 cd $(PRJDIR)/sim.src && $(MAKE) all
111 $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
114 $(XAASM) -l $< -o $@ -e $<.lst
117 # Remaking configuration
118 # ----------------------
120 @if [ -f $(PRJDIR)/devel ]; then\
121 $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
124 # End of xa.src/Makefile.in