Get debugger working with --disable-boehm-gc flag
[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 DISABLE_GC      = @DISABLE_GC@
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
32 CFLAGS          = @CFLAGS@
33 M_OR_MM         = @M_OR_MM@
34 LDFLAGS         = @LDFLAGS@
35
36 ifeq ($(DISABLE_GC),1)
37 LIBS            = @LIBS@
38 LIBDIRS         =
39 else
40 LIBS            = -lgc @LIBS@
41 LIBDIRS         = -L$(PRJDIR)/support/gc
42 endif
43
44
45 OBJECTS         = sdcdb.o symtab.o simi.o $(PRJDIR)/src/SDCCset.o \
46                   break.o cmd.o $(PRJDIR)/src/SDCChasht.o \
47                   $(PRJDIR)/src/SDCCerr.o
48 SOURCES         = $(patsubst %.o,%.c,$(OBJECTS))
49
50 TARGET          = $(PRJDIR)/bin/sdcdb
51
52
53 # Compiling entire program or any subproject
54 # ------------------------------------------
55 all: checkconf $(TARGET)
56
57 $(PRJDIR)/support/gc/libgc.a:
58         cd $(PRJDIR)/support/gc && $(MAKE)
59
60 # Compiling and installing everything and runing test
61 # ---------------------------------------------------
62 install: all installdirs
63         $(INSTALL) -s $(TARGET) $(bindir)/sdcdb
64         cp $(PRJDIR)/debugger/mcs51/sdcdb.el $(bindir)/sdcdb.el
65         cp $(PRJDIR)/debugger/mcs51/sdcdbsrc.el $(bindir)/sdcdbsrc.el
66
67
68 # Deleting all the installed files
69 # --------------------------------
70 uninstall:
71         rm -f $(bindir)/sdcdb
72
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 $(bindir)
88
89
90 # Creating dependencies
91 # ---------------------
92 dep: Makefile.dep
93
94 Makefile.dep: $(SOURCES) *.h $(PRJDIR)/*.h
95         $(CPP) $(CPPFLAGS) $(M_OR_MM) $(SOURCES) >Makefile.dep
96
97 include Makefile.dep
98 include clean.mk
99
100 # My rules
101 # --------
102 $(TARGET): $(OBJECTS)
103         $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBDIRS) $(LIBS)
104
105 .c.o:
106         $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
107
108
109 # Remaking configuration
110 # ----------------------
111 checkconf:
112         @if [ -f $(PRJDIR)/devel ]; then\
113           $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
114         fi
115
116 # End of cpp/Makefile