some changes to the make files
[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     = @exec_prefix@
21 bindir          = @bindir@
22 libdir          = @libdir@
23 datadir         = @datadir@
24 includedir      = @includedir@
25 mandir          = @mandir@
26 man1dir         = $(mandir)/man1
27 man2dir         = $(mandir)/man2
28 infodir         = @infodir@
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 # 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         $(INSTALL) -d $(bindir)
82
83
84 # Creating dependencies
85 # ---------------------
86 dep: Makefile.dep
87
88 Makefile.dep: $(SOURCES) *.h $(PRJDIR)/*.h
89         $(CPP) $(CPPFLAGS) $(M_OR_MM) $(SOURCES) >Makefile.dep
90
91 include Makefile.dep
92 include clean.mk
93
94 # My rules
95 # --------
96 $(TARGET): $(OBJECTS) $(SLIBOBJS)
97         $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(SLIBOBJS) $(LIBDIRS) $(LIBS)
98
99 .c.o:
100         $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
101
102 $(SLIBOBJS):%.o:$(SLIB)/%.c
103         $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
104
105 # Remaking configuration
106 # ----------------------
107 checkconf:
108         @if [ -f $(PRJDIR)/devel ]; then\
109           $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
110         fi
111
112 # End of cpp/Makefile