b85db47ad14d9c6b0ca72d0c0d4199f8ce118c7f
[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 STRIP           = @STRIP@
15
16 PRJDIR          = ../..
17 SLIB            = $(PRJDIR)/support/Util
18
19 srcdir          = @srcdir@
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$(PRJDIR) -I$(PRJDIR)/support -I$(SLIB)
33 CFLAGS          = @CFLAGS@
34 M_OR_MM         = @M_OR_MM@
35 LDFLAGS         = @LDFLAGS@
36
37 LIBS            = @LIBS@
38 LIBDIRS         =
39
40 SLIBOBJS                = NewAlloc.o
41
42 OBJECTS         = sdcdb.o symtab.o simi.o $(PRJDIR)/src/SDCCset.o \
43                   break.o cmd.o $(PRJDIR)/src/SDCChasht.o \
44                   $(PRJDIR)/support/Util/SDCCerr.o
45 SOURCES         = $(patsubst %.o,%.c,$(OBJECTS))
46
47 TARGET          = $(PRJDIR)/bin/sdcdb
48
49
50 # Compiling entire program or any subproject
51 # ------------------------------------------
52 all: checkconf $(TARGET)
53
54 # Compiling and installing everything and runing test
55 # ---------------------------------------------------
56 install: all installdirs
57         $(INSTALL) $(TARGET) $(bindir)/sdcdb
58         $(STRIP) $(bindir)/sdcdb
59         cp $(PRJDIR)/debugger/mcs51/sdcdb.el $(bindir)/sdcdb.el
60         cp $(PRJDIR)/debugger/mcs51/sdcdbsrc.el $(bindir)/sdcdbsrc.el
61
62
63 # Deleting all the installed files
64 # --------------------------------
65 uninstall:
66         rm -f $(bindir)/sdcdb
67         rm -f $(bindir)/sdcdb.el
68         rm -f $(bindir)/sdcdbsrc.el
69
70 # Performing self-test
71 # --------------------
72 check:
73
74
75 # Performing installation test
76 # ----------------------------
77 installcheck:
78
79
80 # Creating installation directories
81 # ---------------------------------
82 installdirs:
83         $(INSTALL) -d $(bindir)
84
85
86 # Creating dependencies
87 # ---------------------
88 dep: Makefile.dep
89
90 Makefile.dep: $(SOURCES) *.h $(PRJDIR)/*.h
91         $(CPP) $(CPPFLAGS) $(M_OR_MM) $(SOURCES) >Makefile.dep
92
93 include Makefile.dep
94 include clean.mk
95
96 # My rules
97 # --------
98 $(TARGET): $(OBJECTS) $(SLIBOBJS)
99         $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(SLIBOBJS) $(LIBDIRS) $(LIBS)
100
101 .c.o:
102         $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
103
104 $(SLIBOBJS):%.o:$(SLIB)/%.c
105         $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
106
107 # Remaking configuration
108 # ----------------------
109 checkconf:
110         @if [ -f $(PRJDIR)/devel ]; then\
111           $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
112         fi
113
114 # End of cpp/Makefile