Improve setjmp/longjmp for z80-related ports, patch #479 by Janko Stamenović.
[sdcc.git] / sdcc / Makefile.common.in
blob846907942579beede16f7e69fdcdcb47671480e3
4 .DELETE_ON_ERROR:
6 all:
8 # Version
9 PACKAGE         = @PACKAGE@
10 VERSION         = @VERSION@
11 VERSIONHI       = @VERSIONHI@
12 VERSIONLO       = @VERSIONLO@
13 VERSIONP        = @VERSIONP@
15 # Programs
16 SHELL           = /bin/sh
17 CC              = @CCACHE@ @CC@
18 CPP             = @CCACHE@ @CPP@
19 CXX             = @CCACHE@ @CXX@
20 AR              = @AR@
21 RANLIB          = @RANLIB@
22 INSTALL         = @INSTALL@
23 YACC            = @YACC@
24 PYTHON          = @PYTHON@
25 LEX             = @LEX@
26 AWK             = @AWK@
27 STRIP           = @STRIP@
28 MAKEDEP         = @MAKEDEP@
29 MAKEDEP_CXX     = @MAKEDEP_CXX@
30 prefix          = @prefix@
31 exec_prefix     = @exec_prefix@
32 bindir          = @bindir@
33 libdir          = @libdir@
34 datadir         = @datadir@
35 datarootdir     = @datarootdir@
36 includedir      = @includedir@
37 mandir          = @mandir@
38 man1dir         = $(mandir)/man1
39 man2dir         = $(mandir)/man2
40 infodir         = @infodir@
41 docdir          = @docdir@
42 DESTDIR         =
44 include_dir_suffix = @include_dir_suffix@
45 lib_dir_suffix     = @lib_dir_suffix@
47 # Modules to enable/disable
48 OPT_DISABLE_AVR         = @OPT_DISABLE_AVR@
49 OPT_DISABLE_DS390       = @OPT_DISABLE_DS390@
50 OPT_DISABLE_DS400       = @OPT_DISABLE_DS400@
51 OPT_DISABLE_HC08        = @OPT_DISABLE_HC08@
52 OPT_DISABLE_S08         = @OPT_DISABLE_S08@
53 OPT_DISABLE_MCS51       = @OPT_DISABLE_MCS51@
54 OPT_DISABLE_PIC14       = @OPT_DISABLE_PIC14@
55 OPT_DISABLE_PIC16       = @OPT_DISABLE_PIC16@
56 OPT_DISABLE_XA51        = @OPT_DISABLE_XA51@
57 OPT_DISABLE_Z80         = @OPT_DISABLE_Z80@
58 OPT_DISABLE_Z180        = @OPT_DISABLE_Z180@
59 OPT_DISABLE_R2K         = @OPT_DISABLE_R2K@
60 OPT_DISABLE_R2KA        = @OPT_DISABLE_R2KA@
61 OPT_DISABLE_R3KA        = @OPT_DISABLE_R3KA@
62 OPT_DISABLE_SM83        = @OPT_DISABLE_SM83@
63 OPT_DISABLE_TLCS90      = @OPT_DISABLE_TLCS90@
64 OPT_DISABLE_Z80N        = @OPT_DISABLE_Z80N@
65 OPT_DISABLE_R800        = @OPT_DISABLE_R800@
66 OPT_DISABLE_STM8        = @OPT_DISABLE_STM8@
67 OPT_DISABLE_PDK13       = @OPT_DISABLE_PDK13@
68 OPT_DISABLE_PDK14       = @OPT_DISABLE_PDK14@
69 OPT_DISABLE_PDK15       = @OPT_DISABLE_PDK15@
70 OPT_DISABLE_PDK16       = @OPT_DISABLE_PDK16@
71 OPT_DISABLE_MOS6502     = @OPT_DISABLE_MOS6502@
72 OPT_DISABLE_MOS65C02    = @OPT_DISABLE_MOS65C02@
74 OPT_ENABLE_DOC          = @OPT_ENABLE_DOC@
76 OPT_DISABLE_DEVICE_LIB  = @OPT_DISABLE_DEVICE_LIB@
77 OPT_DISABLE_PACKIHX     = @OPT_DISABLE_PACKIHX@
78 OPT_DISABLE_SDBINUTILS  = @OPT_DISABLE_SDBINUTILS@
79 OPT_DISABLE_SDCPP       = @OPT_DISABLE_SDCPP@
80 OPT_DISABLE_UCSIM       = @OPT_DISABLE_UCSIM@
81 OPT_DISABLE_NON_FREE    = @OPT_DISABLE_NON_FREE@
83 SLIB                    = $(top_builddir)/support/util
85 EXEEXT          = @EXEEXT@
86 transform       = @program_transform_name@
88 # Flags
90 DEFS           += $(subs -DHAVE_CONFIG_H,,@DEFS@)
91 CPPFLAGS       += @CPPFLAGS@ $(INCLUDEFLAGS) -I. -I$(top_builddir) -I$(srcdir)/$(SLIB) -I$(srcdir)
92 CFLAGS         += @CFLAGS@ @WALL_FLAG@
93 CXXFLAGS       += @CXXFLAGS@
94 LDFLAGS        += @LDFLAGS@
96 EXTRALIBS      += @LIBS@
98 # Shared settings between all the sub Makefiles
99 # Done here so that we don't have to start a Make from the top levelport
100 # directory.
102 # Library compilation options
103 CLEANSPEC = *.lst *.asm *.sym *~ *.cdb *.dep *.rul
105 OBJ = $(SOURCES:.c=.o) $(CXXSOURCES:.cc=.o)
107 # for historical reasons, dependencies are mixed up, and then split by extension.
108 # (fix later).
109 DEPENDENCIES_ = $(PREBUILD) Makefile $(SOURCES) $(ASSOURCES) $(CXXSOURCES) $(SLIBSOURCES) $(SPECIAL)
110 DEPENDENCIES_CC = $(filter %.c,${DEPENDENCIES_})
111 DEPENDENCIES_CXX = $(filter %.cc,${DEPENDENCIES_})
113 dep: Makefile.dep
114 Makefile.depcc: $(DEPENDENCIES_)
115         ( test -z "${DEPENDENCIES_CC}" || $(MAKEDEP) $(CPPFLAGS) $(filter %.c,$^) ) > $@
117 Makefile.depcxx: $(DEPENDENCIES_)
118         ( test -z "${DEPENDENCIES_CXX}" || $(MAKEDEP_CXX) $(CPPFLAGS) $(filter %.cc,$^) ) > $@
120 Makefile.dep: Makefile.depcc Makefile.depcxx
121         cat Makefile.depcc Makefile.depcxx > $@
123 # don't include Makefile.dep for the listed targets:
124 ifeq "$(findstring $(MAKECMDGOALS),uninstall check installcheck installdirs checkconf \
125                                    clean distclean mostlyclean realclean)" ""
126   -include Makefile.dep
127 endif