Initial revision
[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
17 srcdir          = @srcdir@
18 prefix          = @prefix@
19 exec_prefix     = ${prefix}
20 bindir          = ${exec_prefix}/bin
21 libdir          = ${exec_prefix}/lib
22 datadir         = ${prefix}/share
23 includedir      = ${prefix}/include
24 mandir          = ${prefix}/man
25 man1dir         = $(mandir)/man1
26 man2dir         = $(mandir)/man2
27 infodir         = ${prefix}/info
28
29 STD_INC         = @sdcc_include_dir@
30 CPPFLAGS        = @CPPFLAGS@ -I. -I$(PRJDIR) -I$(PRJDIR)/support
31 CFLAGS          = @CFLAGS@
32 M_OR_MM         = @M_OR_MM@
33 LDFLAGS         = @LDFLAGS@
34 LIBS            = -lgc @LIBS@
35 LIBDIRS         = -L$(PRJDIR)/support/gc
36
37
38 OBJECTS         = sdcdb.o symtab.o simi.o $(PRJDIR)/src/SDCCset.o \
39                   break.o cmd.o $(PRJDIR)/src/SDCChasht.o
40 SOURCES         = $(patsubst %.o,%.c,$(OBJECTS))
41
42 TARGET          = $(PRJDIR)/bin/sdcdb
43
44
45 # Compiling entire program or any subproject
46 # ------------------------------------------
47 all: checkconf $(TARGET)
48
49 $(PRJDIR)/support/gc/libgc.a:
50         cd $(PRJDIR)/support/gc && $(MAKE)
51
52 # Compiling and installing everything and runing test
53 # ---------------------------------------------------
54 install: all installdirs
55         $(INSTALL) -s $(TARGET) $(bindir)/sdcdb
56         cp $(PRJDIR)/sdcdb/sdcdb.el $(bindir)/sdcdb.el
57         cp $(PRJDIR)/sdcdb/sdcdbsrc.el $(bindir)/sdcdbsrc.el
58
59
60 # Deleting all the installed files
61 # --------------------------------
62 uninstall:
63         rm -f $(bindir)/sdcdb
64
65
66 # Performing self-test
67 # --------------------
68 check:
69
70
71 # Performing installation test
72 # ----------------------------
73 installcheck:
74
75
76 # Creating installation directories
77 # ---------------------------------
78 installdirs:
79         $(INSTALL) -d $(bindir)
80
81
82 # Creating dependencies
83 # ---------------------
84 dep: Makefile.dep
85
86 Makefile.dep: $(SOURCES) *.h $(PRJDIR)/*.h
87         $(CPP) $(CPPFLAGS) $(M_OR_MM) $(SOURCES) >Makefile.dep
88
89 include Makefile.dep
90 include clean.mk
91
92 # My rules
93 # --------
94 $(TARGET): $(OBJECTS)
95         $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBDIRS) $(LIBS)
96
97 .c.o:
98         $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
99
100
101 # Remaking configuration
102 # ----------------------
103 checkconf:
104         @if [ -f $(PRJDIR)/devel ]; then\
105           $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
106         fi
107
108 # End of cpp/Makefile