2 # uCsim xa.src/Makefile
4 # (c) Drotos Daniel, Talker Bt. 1997
20 DEFS = $(subs -DHAVE_CONFIG_H,,@DEFS@)
21 CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR) \
22 -I$(PRJDIR)/cmd.src -I$(PRJDIR)/sim.src -I$(PRJDIR)/gui.src
23 CFLAGS = @CFLAGS@ -Wall
24 CXXFLAGS = @CXXFLAGS@ -Wall
27 LIBS = @LIBS@ -L$(PRJDIR) -Wl,--start-group -lutil -lcmd -lsim -lguiucsim -Wl,--end-group
30 exec_prefix = @exec_prefix@
34 includedir = @includedir@
36 man1dir = $(mandir)/man1
37 man2dir = $(mandir)/man2
41 OBJECTS = sxa.o glob.o \
46 #TEST_OBJ = test_bit.hex test_dis.hex test_mov.hex test_jmp.hex \
50 # Compiling entire program or any subproject
51 # ------------------------------------------
52 all: checkconf otherlibs xa.src tests
57 # Compiling and installing everything and runing test
58 # ---------------------------------------------------
59 install: all installdirs
60 $(INSTALL) -s sxa$(EXEEXT) $(bindir)
63 # Deleting all the installed files
64 # --------------------------------
66 rm -f $(bindir)/sxa$(EXEEXT)
69 # Performing self-test
70 # --------------------
74 # Performing installation test
75 # ----------------------------
79 # Creating installation directories
80 # ---------------------------------
82 test -d $(bindir) || $(INSTALL) -d $(bindir)
85 # Creating dependencies
86 # ---------------------
89 Makefile.dep: *.cc *.h
90 $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) *.cc >Makefile.dep
101 sxa$(EXEEXT): $(OBJECTS) $(PRJDIR)/*.a
102 $(CXX) $(CXXFLAGS) -o $@ $(OBJECTS) $(LIBS)
105 cd $(PRJDIR)/cmd.src && $(MAKE) all
106 cd $(PRJDIR)/sim.src && $(MAKE) all
109 $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
112 $(XAASM) -l $< -o $@ -e $<.lst
115 # Remaking configuration
116 # ----------------------
118 @if [ -f $(PRJDIR)/devel ]; then\
119 $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
122 # End of xa.src/Makefile.in