fixes of curses lib detection
[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
21 CFLAGS          = @CFLAGS@ -Wall
22 CXXFLAGS        = @CXXFLAGS@ -Wall
23 M_OR_MM         = @M_OR_MM@
24
25 LIBS            = @LIBS@ -L$(PRJDIR) -lsim -lcmd -lutil
26
27 prefix          = @prefix@
28 exec_prefix     = @exec_prefix@
29 bindir          = @bindir@
30 libdir          = @libdir@
31 datadir         = @datadir@
32 includedir      = @includedir@
33 mandir          = @mandir@
34 man1dir         = $(mandir)/man1
35 man2dir         = $(mandir)/man2
36 infodir         = @infodir@
37 srcdir          = @srcdir@
38
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 \
42                   arith_inst.o
43
44 AVRASM          = tavrasm
45 TEST_OBJ        = test_bit.hex test_dis.hex test_mov.hex test_jmp.hex \
46                   test_arith.hex
47
48
49 # Compiling entire program or any subproject
50 # ------------------------------------------
51 all: checkconf otherlibs avr.src
52
53 tests: $(TEST_OBJ)
54
55
56 # Compiling and installing everything and runing test
57 # ---------------------------------------------------
58 install: all installdirs
59         $(INSTALL) -s savr $(bindir)
60
61
62 # Deleting all the installed files
63 # --------------------------------
64 uninstall:
65         rm -f $(bindir)/savr
66
67
68 # Performing self-test
69 # --------------------
70 check:
71
72
73 # Performing installation test
74 # ----------------------------
75 installcheck:
76
77
78 # Creating installation directories
79 # ---------------------------------
80 installdirs:
81         test -d $(bindir) || $(INSTALL) -d $(bindir)
82
83
84 # Creating dependencies
85 # ---------------------
86 dep: Makefile.dep
87
88 Makefile.dep: *.cc *.h
89         $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) *.cc >Makefile.dep
90
91 include Makefile.dep
92 include clean.mk
93
94 #parser.cc: parser.y
95
96 #plex.cc: plex.l
97
98 # My rules
99 # --------
100 .SUFFIXES: .asm .hex
101
102 avr.src: savr
103
104 savr: $(OBJECTS) $(PRJDIR)/*.a
105         $(CXX) $(CXXFLAGS) -o savr $(OBJECTS) $(LIBS)
106
107 otherlibs:
108         cd $(PRJDIR)/cmd.src && $(MAKE) all
109         cd $(PRJDIR)/sim.src && $(MAKE) all
110
111 .cc.o:
112         $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
113
114 .asm.hex:
115         $(AVRASM) -l $< -o $@ -e $<.lst
116
117
118 # Remaking configuration
119 # ----------------------
120 checkconf:
121         @if [ -f $(PRJDIR)/devel ]; then\
122           $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
123         fi
124
125 # End of avr.src/Makefile.in