1#
2# ${R_HOME}/src/library/graphics/src/Makefile
3
4pkg = graphics
5
6VPATH = @srcdir@
7srcdir = @srcdir@
8top_srcdir = @top_srcdir@
9
10top_builddir = ../../../..
11subdir = src/library/$(pkg)/src
12R_HOME = $(top_builddir)
13R_SHARE_DIR = $(R_HOME)/share
14R_INCLUDE_DIR = $(R_HOME)/include
15
16SOURCES_C = init.c base.c graphics.c par.c plot.c plot3d.c stem.c
17
18DEPENDS = $(SOURCES_C:.c=.d)
19OBJECTS = $(SOURCES_C:.c=.o)
20
21PKG_CFLAGS = $(C_VISIBILITY)
22
23SHLIB = $(pkg)@SHLIB_EXT@
24
25# need Defn.h etc, and config.h
26PKG_CPPFLAGS =-I../../../include -I$(top_srcdir)/src/include -DHAVE_CONFIG_H \
27  -I$(top_srcdir)/src/main
28
29
30all: Makedeps
31	@$(MAKE) shlib
32
33Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
34	@cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
35
36Makedeps: Makefile $(DEPENDS)
37	@cat $(DEPENDS) >> Makefile
38	@touch $@
39
40shlib: $(SHLIB)
41	@$(MKINSTALLDIRS) \
42	  $(top_builddir)/library/$(pkg)/libs@R_ARCH@
43	@$(SHELL) $(top_srcdir)/tools/copy-if-change $(SHLIB) \
44	  $(top_builddir)/library/$(pkg)/libs@R_ARCH@/$(SHLIB)
45
46include $(R_HOME)/etc${R_ARCH}/Makeconf
47include $(top_srcdir)/share/make/shlib.mk
48## override to use LTO for linking with --enable-lto=R
49LTO = @LTO@
50
51mostlyclean: clean
52clean:
53	@-rm -Rf .libs _libs
54	@-rm -f Makedeps *.d *.o *$(SHLIB_EXT)
55distclean: clean
56	@-rm -f Makefile
57maintainer-clean: distclean
58
59## Automagically generated dependencies:
60