deal with relocated SDCCerr.c
[fw/sdcc] / debugger / mcs51 / Makefile.in
1 #
2 #
3 #
4
5 VERSION         = @VERSION@
6 VERSIONHI       = @VERSIONHI@
7 VERSIONLO       = @VERSIONLO@
8 VERSIONP        = @VERSIONP@
9
10 SHELL           = /bin/sh
11 CC              = @CC@
12 CPP             = @CPP@
13 INSTALL         = @INSTALL@
14
15 PRJDIR          = ../..
16 SLIB            = $(PRJDIR)/support/Util
17
18 srcdir          = @srcdir@
19 prefix          = @prefix@
20 exec_prefix     = ${prefix}
21 bindir          = ${exec_prefix}/bin
22 libdir          = ${exec_prefix}/lib
23 datadir         = @datadir@
24 includedir      = ${prefix}/include
25 mandir          = ${prefix}/man
26 man1dir         = $(mandir)/man1
27 man2dir         = $(mandir)/man2
28 infodir         = ${prefix}/info
29
30 STD_INC         = @sdcc_include_dir@
31 CPPFLAGS        = @CPPFLAGS@ -I. -I$(PRJDIR) -I$(PRJDIR)/support -I$(SLIB)
32 CFLAGS          = @CFLAGS@
33 M_OR_MM         = @M_OR_MM@
34 LDFLAGS         = @LDFLAGS@
35
36 LIBS            = @LIBS@
37 LIBDIRS         =
38
39 SLIBOBJS                = NewAlloc.o
40
41 OBJECTS         = sdcdb.o symtab.o simi.o $(PRJDIR)/src/SDCCset.o \
42                   break.o cmd.o $(PRJDIR)/src/SDCChasht.o \
43                   $(PRJDIR)/support/Util/SDCCerr.o
44 SOURCES         = $(patsubst %.o,%.c,$(OBJECTS))
45
46 TARGET          = $(PRJDIR)/bin/sdcdb
47
48
49 # Compiling entire program or any subproject
50 # ------------------------------------------
51 all: checkconf $(TARGET)
52
53 # Compiling and installing everything and runing test
54 # ---------------------------------------------------
55 install: all installdirs
56         $(INSTALL) -s $(TARGET) $(bindir)/sdcdb
57         cp $(PRJDIR)/debugger/mcs51/sdcdb.el $(bindir)/sdcdb.el
58         cp $(PRJDIR)/debugger/mcs51/sdcdbsrc.el $(bindir)/sdcdbsrc.el
59
60
61 # Deleting all the installed files
62 # --------------------------------
63 uninstall:
64         rm -f $(bindir)/sdcdb
65
66
67 # Performing self-test
68 # --------------------
69 check:
70
71
72 # Performing installation test
73 # ----------------------------
74 installcheck:
75
76
77 # Creating installation directories
78 # ---------------------------------
79 installdirs:
80         $(INSTALL) -d $(bindir)
81
82
83 # Creating dependencies
84 # ---------------------
85 dep: Makefile.dep
86
87 Makefile.dep: $(SOURCES) *.h $(PRJDIR)/*.h
88         $(CPP) $(CPPFLAGS) $(M_OR_MM) $(SOURCES) >Makefile.dep
89
90 include Makefile.dep
91 include clean.mk
92
93 # My rules
94 # --------
95 $(TARGET): $(OBJECTS) $(SLIBOBJS)
96         $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(SLIBOBJS) $(LIBDIRS) $(LIBS)
97
98 .c.o:
99         $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
100
101 $(SLIBOBJS):%.o:$(SLIB)/%.c
102         $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
103
104 # Remaking configuration
105 # ----------------------
106 checkconf:
107         @if [ -f $(PRJDIR)/devel ]; then\
108           $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
109         fi
110
111 # End of cpp/Makefile