|
Automake C++
jedi1 - 09-01-2008 17:55
Wie ktos moze, jak poprawnie zrobic makefile.am i configure.ac, zeby zrobic instalator, ktory wrzuci do usr/local/bin skrypt shella a do /usr/share/games/folder moja binarke wraz z zaleznymi plikami, ewentualnie same zaleznosci do folderu /usr/share/games/folder
moje pliki configure i makefile.am
# -*- Autoconf -*- # Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61) AC_INIT(main, 0.1, piotrg@gmail.com) AC_CONFIG_SRCDIR([src/main.cpp]) AC_CONFIG_HEADER([config.h]) AM_INIT_AUTOMAKE
# Checks for programs. AC_PROG_CXX AC_PROG_CC
# Checks for libraries. AM_PATH_ALLEGRO(, , AC_MSG_ERROR(project requires Allegro to be installed)) AC_CHECK_LIB(SDL_mixer, main, LIBS="$LIBS -lSDL_mixer", AC_MSG_ERROR([*** SDL_mixer library not found!]) )
# Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([string.h])
# Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_C_INLINE
# Checks for library functions. AC_FUNC_MALLOC AC_CHECK_FUNCS([memset])
AC_OUTPUT(\ Makefile \ src/Makefile \ )
bin_PROGRAMS = main main_SOURCES = bazooka.cpp bazooka.h beast.cpp beast.h bullet.cpp bullet.h character.cpp character.h dataDefines.h fly.cpp fly.h fred.cpp fred.h freeza.cpp freeza.h game.cpp game.h main.cpp mappyal.c mappyal.h menu.cpp menu.h mine.cpp mine.h mk.cpp mk.h monster.cpp monster.h player.cpp player.h rabbit.cpp rabbit.h spritecache.cpp spritecache.h stage.cpp stage.h
INCLUDES = -I$(top_srcdir)/src $(all_includes) main_LDFLAGS = $(all_libraries) AM_CFLAGS = $(allegro_CFLAGS) AM_CXXFLAGS = $(allegro_CFLAGS) main_LDADD = $(allegro_LIBS)
zbyshek - 10-01-2008 15:53
Umieść w Makefile coś takiego: cp "ścieka do krypt shella" /usr/local/bin cp "ścieżka do moja binarke wraz z zależnymi plikami" /usr/share/games/folder
oczywiście jeszcze nadaj odpowiednie prawa plikom - chmod
Pozdrawiam
jedi1 - 10-01-2008 18:31
dzieki, ale niezbyt o to mi chodzilo, tak jest jak recznie robie makefile, a mi chodzi o makefile generowany przez automake
zanotowane.pldoc.pisz.plpdf.pisz.plminister.pev.pl
|