Added z80 port (links, may not work). mcs51 still works.
[fw/sdcc] / debugger / mcs51 / Makefile
1 # Generated automatically from Makefile.in by configure.
2 #
3 #
4 #
5
6 VERSION         = 2.1.9Ga
7 VERSIONHI       = 2
8 VERSIONLO       = 1
9 VERSIONP        = 9Ga
10
11 SHELL           = /bin/sh
12 CC              = gcc
13 CPP             = gcc -E
14 INSTALL         = /usr/bin/install -c
15
16 PRJDIR          = ../..
17
18 srcdir          = .
19 prefix          = /usr/local
20 exec_prefix     = ${prefix}
21 bindir          = ${exec_prefix}/bin
22 libdir          = ${exec_prefix}/lib
23 datadir         = ${prefix}/share
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        =  -I. -I$(PRJDIR) -I$(PRJDIR)/support
32 CFLAGS          = -ggdb -O2 -pipe
33 M_OR_MM         = -MM
34 LDFLAGS         = 
35 LIBS            = -lgc 
36 LIBDIRS         = -L$(PRJDIR)/support/gc
37
38
39 OBJECTS         = sdcdb.o symtab.o simi.o $(PRJDIR)/src/SDCCset.o \
40                   break.o cmd.o $(PRJDIR)/src/SDCChasht.o
41 SOURCES         = $(patsubst %.o,%.c,$(OBJECTS))
42
43 TARGET          = $(PRJDIR)/bin/sdcdb
44
45
46 # Compiling entire program or any subproject
47 # ------------------------------------------
48 all: checkconf $(TARGET)
49
50 $(PRJDIR)/support/gc/libgc.a:
51         cd $(PRJDIR)/support/gc && $(MAKE)
52
53 # Compiling and installing everything and runing test
54 # ---------------------------------------------------
55 install: all installdirs
56         $(INSTALL) -s $(TARGET) $(bindir)/sdcdb
57         cp $(PRJDIR)/sdcdb/sdcdb.el $(bindir)/sdcdb.el
58         cp $(PRJDIR)/sdcdb/sdcdbsrc.el $(bindir)/sdcdbsrc.el
59
60
61 # Deleting all the installed files
62 # --------------------------------
63 uninstall:
64         rm -f $(bindir)/sdcdb
65
66
67 # Performing self-test
68 # --------------------
69 check:
70
71
72 # Performing installation test
73 # ----------------------------
74 installcheck:
75
76
77 # Creating installation directories
78 # ---------------------------------
79 installdirs:
80         $(INSTALL) -d $(bindir)
81
82
83 # Creating dependencies
84 # ---------------------
85 dep: Makefile.dep
86
87 Makefile.dep: $(SOURCES) *.h $(PRJDIR)/*.h
88         $(CPP) $(CPPFLAGS) $(M_OR_MM) $(SOURCES) >Makefile.dep
89
90 include Makefile.dep
91 include clean.mk
92
93 # My rules
94 # --------
95 $(TARGET): $(OBJECTS)
96         $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBDIRS) $(LIBS)
97
98 .c.o:
99         $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
100
101
102 # Remaking configuration
103 # ----------------------
104 checkconf:
105         @if [ -f $(PRJDIR)/devel ]; then\
106           $(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
107         fi
108
109 # End of cpp/Makefile