Removing unnecessary output of make process
[fw/sdcc] / sim / ucsim / avr.src / Makefile.in
1 #
2 # uCsim avr.src/Makefile
3 #
4 # (c) Drotos Daniel, Talker Bt. 1997
5 #
6
7 STARTYEAR       = 1997
8
9 SHELL           = /bin/sh
10 CXX             = @CXX@
11 CPP             = @CPP@
12 CXXCPP          = @CXXCPP@
13 RANLIB          = @RANLIB@
14 INSTALL         = @INSTALL@
15
16 PRJDIR          = ..
17
18 DEFS            = $(subs -DHAVE_CONFIG_H,,@DEFS@)
19 CPPFLAGS        = @CPPFLAGS@ -I. -I$(PRJDIR) \
20                   -I$(PRJDIR)/cmd.src -I$(PRJDIR)/sim.src -I$(PRJDIR)/gui.src
21 CFLAGS          = @CFLAGS@ -Wall
22 CXXFLAGS        = @CXXFLAGS@ -Wall
23 M_OR_MM         = @M_OR_MM@
24 PICOPT          = @PICOPT@
25 SHAREDLIB       = @SHAREDLIB@
26
27 LIBS            = @LIBS@ -L$(PRJDIR) -lsim -lutil -lsim -lcmd -lguiucsim
28 DL              = @DL@
29 dl_ok           = @dl_ok@
30
31 prefix          = @prefix@
32 exec_prefix     = @exec_prefix@
33 bindir          = @bindir@
34 libdir          = @libdir@
35 datadir         = @datadir@
36 includedir      = @includedir@
37 mandir          = @mandir@
38 man1dir         = $(mandir)/man1
39 man2dir         = $(mandir)/man2
40 infodir         = @infodir@
41 srcdir          = @srcdir@
42
43 OBJECTS_SHARED  = glob.o \
44                   simavr.o avr.o port.o \
45                   inst.o bit_inst.o jump_inst.o move_inst.o logic_inst.o \
46                   arith_inst.o
47 OBJECTS_EXE     = savr.o
48 OBJECTS         = $(OBJECTS_SHARED) $(OBJECTS_EXE)
49
50 enable_dlso     = @enable_dlso@
51 dlso_ok         = @dlso_ok@
52
53 AVRASM          = tavrasm
54 TEST_OBJ        = test_bit.hex test_dis.hex test_mov.hex test_jmp.hex \
55                   test_arith.hex test_call.hex
56
57
58 # Compiling entire program or any subproject
59 # ------------------------------------------
60 all: checkconf otherlibs avr.src
61
62
63 # Compiling and installing everything and runing test
64 # ---------------------------------------------------
65 install: all installdirs
66         $(INSTALL) -s savr $(bindir)
67
68
69 # Deleting all the installed files
70 # --------------------------------
71 uninstall:
72         rm -f $(bindir)/savr
73
74
75 # Performing self-test
76 # --------------------
77 check: $(TEST_OBJ)
78
79 test:
80
81
82 # Performing installation test
83 # ----------------------------
84 installcheck:
85
86
87 # Creating installation directories
88 # ---------------------------------
89 installdirs:
90         test -d $(bindir) || $(INSTALL) -d $(bindir)
91
92
93 # Creating dependencies
94 # ---------------------
95 dep: Makefile.dep
96
97 Makefile.dep: *.cc *.h
98         $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) *.cc >Makefile.dep
99
100 include Makefile.dep
101 include clean.mk
102
103 #parser.cc: parser.y
104
105 #plex.cc: plex.l
106
107 # My rules
108 # --------
109 .SUFFIXES: .asm .hex
110
111 avr.src: savr shared_lib
112
113 savr: $(OBJECTS) $(PRJDIR)/*.a
114         $(CXX) $(CXXFLAGS) $(OBJECTS) $(LIBS) -o savr
115
116 ifeq ($(dlso_ok),yes)
117 shared_lib: $(PRJDIR)/savr.so
118 else
119 shared_lib:
120         @$(PRJDIR)/mkecho $(PRJDIR) "No AVR shared lib made."
121         @$(PRJDIR)/mkecho $(PRJDIR) "(SHAREDLIB="$(SHAREDLIB)",dl_ok="$(dl_ok)",enable_dlso="$(enable_dlso)")"
122 endif
123
124 $(PRJDIR)/savr.so: $(OBJECTS_SHARED)
125         $(CXX) -shared $(OBJECTS_SHARED) -o $(PRJDIR)/savr.so
126
127 otherlibs:
128         cd $(PRJDIR)/cmd.src && $(MAKE) all
129         cd $(PRJDIR)/sim.src && $(MAKE) all
130
131 .cc.o:
132         $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
133
134 .asm.hex:
135         $(AVRASM) -l $< -o $@ -e $<.lst
136
137
138 # Remaking configuration
139 # ----------------------
140 checkconf:
141         @if [ -f $(PRJDIR)/devel ]; then\
142           $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
143         fi
144
145 # End of avr.src/Makefile.in