Changed a few Makefiles & Fixed 3 bugs.
[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         rm -f $(bindir)/sdcdb.el
66         rm -f $(bindir)/sdcdbsrc.el
67
68
69 # Performing self-test
70 # --------------------
71 check:
72
73
74 # Performing installation test
75 # ----------------------------
76 installcheck:
77
78
79 # Creating installation directories
80 # ---------------------------------
81 installdirs:
82         $(INSTALL) -d $(bindir)
83
84
85 # Creating dependencies
86 # ---------------------
87 dep: Makefile.dep
88
89 Makefile.dep: $(SOURCES) *.h $(PRJDIR)/*.h
90         $(CPP) $(CPPFLAGS) $(M_OR_MM) $(SOURCES) >Makefile.dep
91
92 include Makefile.dep
93 include clean.mk
94
95 # My rules
96 # --------
97 $(TARGET): $(OBJECTS) $(SLIBOBJS)
98         $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(SLIBOBJS) $(LIBDIRS) $(LIBS)
99
100 .c.o:
101         $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
102
103 $(SLIBOBJS):%.o:$(SLIB)/%.c
104         $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
105
106 # Remaking configuration
107 # ----------------------
108 checkconf:
109         @if [ -f $(PRJDIR)/devel ]; then\
110           $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
111         fi
112
113 # End of cpp/Makefile