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