File: Makefile.in

package info (click to toggle)
sdcc 3.4.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 60,316 kB
  • ctags: 69,276
  • sloc: ansic: 418,778; cpp: 48,792; makefile: 46,787; sh: 28,453; asm: 11,918; perl: 8,387; yacc: 6,640; lisp: 1,630; lex: 746; python: 660; awk: 495; sed: 89
file content (116 lines) | stat: -rw-r--r-- 2,872 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#
#
#

SHELL		= /bin/sh
CC		= @CC@
CPP		= @CPP@
INSTALL		= @INSTALL@
STRIP           = @STRIP@
MAKEDEP         = @MAKEDEP@

top_builddir	= ../../
top_srcdir	= @srcdir@/../..
SLIB		= $(top_srcdir)/support/util
SDCCLIB		= $(top_srcdir)/src

VPATH           = @srcdir@
srcdir		= @srcdir@

prefix		= @prefix@
exec_prefix     = @exec_prefix@
bindir          = @bindir@

STD_INC		= @sdcc_include_dir@
CPPFLAGS	= @CPPFLAGS@ -I. -I$(top_builddir) -I$(top_srcdir) -I$(SLIB) -DHAVE_CONFIG_H
CFLAGS		= @CFLAGS@ @WALL_FLAG@
LDFLAGS		= @LDFLAGS@

EXEEXT          = @EXEEXT@

LIBS            = @LIBS@ @LIBREADLINE@
LIBDIRS         =

OBJECTS		= sdcdb.o symtab.o simi.o \
		  break.o cmd.o
SLIBOBJS	= NewAlloc.o
SDCCOBJS	= SDCCset.o SDCChasht.o SDCCerr.o

SOURCES		= $(patsubst %.o,%.c,$(OBJECTS))
SLIBSOURCES	= $(patsubst %.o,$(SLIB)/%.c,$(SLIBOBJS))
SDCCSOURCES	= $(patsubst %.o,$(SDCCLIB)/%.c,$(SDCCOBJS))

TARGET		= $(top_builddir)/bin/sdcdb$(EXEEXT)


# Compiling entire program or any subproject
# ------------------------------------------
all: checkconf $(TARGET)

# Compiling and installing everything and runing test
# ---------------------------------------------------
install: all installdirs
	$(INSTALL) $(TARGET) $(DESTDIR)$(bindir)/sdcdb$(EXEEXT)
	$(STRIP) $(DESTDIR)$(bindir)/sdcdb$(EXEEXT)
	cp $(srcdir)/sdcdb.el $(DESTDIR)$(bindir)/sdcdb.el
	cp $(srcdir)/sdcdbsrc.el $(DESTDIR)$(bindir)/sdcdbsrc.el


# Deleting all the installed files
# --------------------------------
uninstall:
	rm -f $(DESTDIR)$(bindir)/sdcdb$(EXEEXT)
	rm -f $(DESTDIR)$(bindir)/sdcdb.el
	rm -f $(DESTDIR)$(bindir)/sdcdbsrc.el

# Performing self-test
# --------------------
check:


# Performing installation test
# ----------------------------
installcheck:


# Creating installation directories
# ---------------------------------
installdirs:
	$(INSTALL) -d $(DESTDIR)$(bindir)


# Creating dependencies
# ---------------------
dep: Makefile.dep

Makefile.dep: $(SOURCES) $(SLIBSOURCES) $(SDCCSOURCES) $(srcdir)/*.h $(top_builddir)/*.h $(top_srcdir)/*.h
	$(MAKEDEP) $(CPPFLAGS) $(filter %.c,$^) >Makefile.dep

ifeq "$(findstring $(MAKECMDGOALS),uninstall installcheck installdirs checkconf \
                                   clean distclean mostlyclean realclean)" ""
  -include Makefile.dep
endif
include $(srcdir)/clean.mk

# My rules
# --------
$(TARGET): $(OBJECTS) $(SLIBOBJS) $(SDCCOBJS)
	$(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(SLIBOBJS) $(SDCCOBJS) $(LIBDIRS) $(LIBS)

.c.o:
	$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<

$(SLIBOBJS):%.o:$(SLIB)/%.c
	$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<

$(SDCCOBJS):%.o:$(SDCCLIB)/%.c
	$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<

# Remaking configuration
# ----------------------
checkconf:
	@if [ -f $(top_builddir)/devel ]; then\
          $(MAKE) -f conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" freshconf;\
        fi

# End of cpp/Makefile