mingw-cross-env-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mingw-cross-env-list] SDL_gfx .mk file


From: Stefan Pietzonke
Subject: [Mingw-cross-env-list] SDL_gfx .mk file
Date: Sun, 21 Aug 2011 13:16:25 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20110702 Icedove/3.0.11

Hi!
I need the SDL_gfx library in my project.
I started to make a sdl_gfx.mk file.
Now I need some help:

- how do I generate the hash for the sdl_gfx library?
- how to write a $(PKG)_UPDATE section?
- and $(PKG)_BUILD?

Here is the file: (sdl_gfx.mk)

# SDL_gfx
PKG             := sdl_gfx
$(PKG)_IGNORE   :=
$(PKG)_VERSION  := 2.0.22
$(PKG)_CHECKSUM :=
$(PKG)_SUBDIR   := SDL_gfx-$($(PKG)_VERSION)
$(PKG)_FILE     := SDL_gfx-$($(PKG)_VERSION).tar.gz
$(PKG)_WEBSITE  := http:///www.ferzkopp.net/joomla/content/view/19/14/
$(PKG)_URL := http://www.ferzkopp.net/Software/SDL_gfx-2.0/$($(PKG)_FILE)
$(PKG)_DEPS     := gcc sdl jpeg libpng tiff image

define $(PKG)_UPDATE

endef

define $(PKG)_BUILD
    $(SED) -i 's,^\(Requires:.*\),\1 libpng,' '$(1)/SDL_gfx.pc.in'
    echo 'Libs.private: -ltiff -ljpeg -lz' >> '$(1)/SDL_gfx.pc.in'
    cd '$(1)' && ./configure \
        --host='$(TARGET)' \
        --disable-shared \
        --prefix='$(PREFIX)/$(TARGET)' \
        --with-sdl-prefix='$(PREFIX)/$(TARGET)' \
        --disable-sdltest \
        --disable-jpg-shared \
        --disable-png-shared \
        --disable-tif-shared \
        LIBS='-lz'
$(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=

    '$(TARGET)-gcc' \
        -W -Wall -Werror -ansi -pedantic \
        '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-sdl_gfx.exe' \
        `'$(TARGET)-pkg-config' SDL_gfx --cflags --libs`
endef


cu

Stefan Pietzonke




reply via email to

[Prev in Thread] Current Thread [Next in Thread]