2 # uCsim avr.src/Makefile
4 # (c) Drotos Daniel, Talker Bt. 1997
18 DEFS = $(subs -DHAVE_CONFIG_H,,@DEFS@)
19 CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR) \
20 -I$(PRJDIR)/cmd.src -I$(PRJDIR)/sim.src
21 CFLAGS = @CFLAGS@ -Wall
22 CXXFLAGS = @CXXFLAGS@ -Wall
25 LIBS = @LIBS@ -L$(PRJDIR) -lsim -lcmd -lutil
28 exec_prefix = @exec_prefix@
32 includedir = @includedir@
34 man1dir = $(mandir)/man1
35 man2dir = $(mandir)/man2
39 OBJECTS = savr.o glob.o \
40 simavr.o avr.o port.o \
41 inst.o bit_inst.o jump_inst.o move_inst.o logic_inst.o \
45 TEST_OBJ = test_bit.hex test_dis.hex test_mov.hex test_jmp.hex \
49 # Compiling entire program or any subproject
50 # ------------------------------------------
51 all: checkconf otherlibs avr.src tests
56 # Compiling and installing everything and runing test
57 # ---------------------------------------------------
58 install: all installdirs
59 $(INSTALL) -s savr $(bindir)
62 # Deleting all the installed files
63 # --------------------------------
68 # Performing self-test
69 # --------------------
73 # Performing installation test
74 # ----------------------------
78 # Creating installation directories
79 # ---------------------------------
81 test -d $(bindir) || $(INSTALL) -d $(bindir)
84 # Creating dependencies
85 # ---------------------
88 Makefile.dep: *.cc *.h
89 $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) *.cc >Makefile.dep
104 savr: $(OBJECTS) $(PRJDIR)/*.a
105 $(CXX) $(CXXFLAGS) -o savr $(OBJECTS) $(LIBS)
108 cd $(PRJDIR)/cmd.src && $(MAKE) all
109 cd $(PRJDIR)/sim.src && $(MAKE) all
112 $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
115 $(AVRASM) -l $< -o $@ -e $<.lst
118 # Remaking configuration
119 # ----------------------
121 @if [ -f $(PRJDIR)/devel ]; then\
122 $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
125 # End of avr.src/Makefile.in