Root/svgalib/Makefile

Source at commit 1b3135c created 9 years 6 months ago.
By Xiangfu Liu, new package: SDL-widgets: a GUI toolkit on top of the SDL libraries
1#
2# Copyright (C) 2011 David Kuehling <dvdkhlng TA gmx TOD de>
3#
4# License GPLv2 or later. NO WARRANTY.
5#
6# OpenWRT package for the SVGAlib
7
8# On the nanonote you might need export SVGALIB_DEFAULT_MODE=54
9# for applications to work correctly.
10
11include $(TOPDIR)/rules.mk
12
13PKG_NAME:=svgalib
14PKG_VERSION:=1.4.3
15PKG_RELEASE:=2
16PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17PKG_SOURCE_URL:=http://www.svgalib.org/
18PKG_MD5SUM:=7d2778e3beebc07dd7c74668f6887c6f
19PKG_INSTALL:=1
20#PKG_FIXUP:=libtool
21
22#PKG_BUILD_DEPENDS:= libtool/host
23
24include $(INCLUDE_DIR)/package.mk
25
26
27define Package/svgalib/Default
28  SECTION:=libs
29  CATEGORY:=Libraries
30  TITLE:=Linux SVGA Library
31  URL:=http://www.svgalib.org/
32endef
33
34define Package/svgalib/Default/description
35SVGAlib is a low-level graphics library for Linux.
36This package compiles a portable version that only contains the Linux
37framebuffer driver.
38endef
39
40define Package/svgalib
41$(call Package/svgalib/Default)
42  TITLE +=
43  DEPENDS:=
44endef
45
46define Package/svgalib/description
47$(call Package/svgalib/Default/description)
48endef
49
50
51define Package/svgalib-demo
52$(call Package/svgalib/Default)
53  TITLE += (demo programs)
54  DEPENDS:=svgalib
55endef
56
57define Package/svgalib-demo/description
58$(call Package/svgalib/Default/description)
59This package contains the demo programs.
60endef
61
62TARGET_CFLAGS +=
63
64#TARGET_LDFLAGS += -Wl,-rpath -Wl,$(STAGING_DIR)/usr/lib
65
66# Nothing todo. Makefile.cfg adapted via patch
67define Build/Configure
68endef
69
70#MAKE_FLAGS += -j2
71
72SVGALIB_BUILD_TARGETS = \
73    shared \
74    static
75
76SVGALIB_INSTALL_TARGETS = \
77    installstaticlib \
78    installsharedlib \
79    installheaders \
80    installconfig
81
82ifdef CONFIG_PACKAGE_svgalib-demo
83SVGALIB_BUILD_TARGETS += demoprogs
84define SVGALIB_COMPILE_DEMO
85    $(INSTALL_DIR) $(PKG_BUILD_DIR)/tmp-install/usr/lib
86    $(call Build/Compile/Default,installsharedlib DESTDIR=$(PKG_BUILD_DIR)/tmp-install)
87    $(call Build/Compile/Default,demoprogs LDFLAGS+="-L$(PKG_BUILD_DIR)/tmp-install/usr/lib")
88endef
89else
90SVGALIB_COMPILE_DEMO:=
91endif
92
93define Build/Compile
94    $(call Build/Compile/Default,shared static)
95    $(call SVGALIB_COMPILE_DEMO)
96endef
97
98define Build/Install
99    $(INSTALL_DIR) $(PKG_INSTALL_DIR)/etc/
100    $(INSTALL_DIR) $(PKG_INSTALL_DIR)/usr/lib
101    $(call Build/Install/Default,\
102        installstaticlib installsharedlib installheaders installconfig)
103endef
104
105define Build/InstallDev
106    $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib
107    $(CP) \
108        $(PKG_INSTALL_DIR)/usr/include/* \
109        $(1)/usr/include/
110    $(CP) \
111        $(PKG_INSTALL_DIR)/usr/lib/*.{a,so*} \
112        $(1)/usr/lib/
113endef
114
115
116define Package/svgalib/install
117    $(INSTALL_DIR) $(1)/usr/lib
118    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/*.so* \
119        $(1)/usr/lib/
120    $(INSTALL_DIR) $(1)/etc/vga
121    $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/vga/* \
122        $(1)/etc/vga/
123endef
124
125define Package/svgalib-demo/install
126    $(INSTALL_DIR) $(1)/usr/bin
127    $(INSTALL_BIN) $$$$(find $(PKG_BUILD_DIR)/demos -executable -type f) \
128        $(1)/usr/bin/
129    $(INSTALL_BIN) $(PKG_BUILD_DIR)/threeDKit/{plane,wrapdemo} \
130        $(1)/usr/bin/
131endef
132
133$(eval $(call BuildPackage,svgalib))
134$(eval $(call BuildPackage,svgalib-demo))
135
136
137# The following comments configure the Emacs editor. Just ignore them.
138# Local Variables:
139# compile-command: "cd ~/src/nanonote/svgalib-1.4.3 && ~/bin/quilt-export target && make -C ~/h/src/qi/openwrt-xburst package/svgalib/compile -j2 V=99"
140# End:
141

Archive Download this file



interactive