Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: bbbd50612e
Fetching contributors…

Cannot retrieve contributors at this time

120 lines (85 sloc) 3.425 kb
# 32-bits Linux cross-compilation for ASCIIpOrtal.
# This is only meant for releases, use 'make' to compile
# Note that we assume having a cross-compiled PDcurses-sdl.
# Requires lib32-sdl, lib32-sdl_mixer, and a 32 bits-enabled gcc.
include Makefile.common
PORT = linux32
### Customisable variables ###
# Custom base name: everything (binary, tarballs) will be built using this base name.
# Unless heavy changes in the codebase (eg. a mod), you should use DISTNAME instead.
#ASCIIPORTAL := $(ASCIIPORTAL)-mod
# Custom base name for release (tarball). Keeping '-$(PORT)' is generally a good option,
# but feel free to change it.
DISTNAME := $(DISTNAME)-$(PORT)
# Custom C flags: you may define ('-D') or unset ('-U') macros to get your specific
# code to work.
CXXFLAGS := $(CXXFLAGS) -m32 -I/usr/include/xcurses `sdl-config --cflags` -U__NOSDL__ -U__NOSOUND__ -U__DINGOO__ -U__GP2X__
# Custom link flags.
#LINKFLAGS := $(LINKFLAGS) `sdl-config --libs` -L/usr/lib32 -l SDL_mixer -l pdcurses
LINKFLAGS := $(LINKFLAGS) -m32 -L/usr/lib32 -lSDL -lpthread -lSDL_mixer -lpdcurses
# Additional files to be included in release tarball.
#FILES_INCLUDE_DIST := $(FILES_INCLUDE_DIST) custom_readme.txt example.dll foo/bar.xml
### Required variables ###
# C++ compiler. You might want to change this for cross-compilation.
CXX = g++
# Tarball name for release. You should not edit anything excepted the extension,
# see DISTNAME above.
#TARBALL = $(DISTNAME).zip
TARBALL = $(DISTNAME).tar.xz
# Final executable name. Same thing, you should only edit the extension.
#EXE_NAME = $(ASCIIPORTAL).exe
EXE_NAME = $(ASCIIPORTAL)
### Custom variables ###
# This is where you can manage additional variables. See 'Makefile.mingw32' for
# an example (downloading SDL dlls for windows).
### Required targets ###
# Dummy target if called directly
wrong-way:
@echo
@echo "[*] This Makefile is not intended to be run directly."
@echo "[*] Instead, call the main Makefile with the proper target!"
@echo "[*] In most cases, a simple 'make' should work though."
# Targets called by the main Makefile:
$(PORT):
$(MAKE) -f Makefile.$(PORT) clean execlean
$(MAKE) -f Makefile.$(PORT) $(EXE_NAME)
$(MAKE) -f Makefile.$(PORT) clean
dist:
$(MAKE) -f Makefile.$(PORT) clean execlean distclean saveclean
$(MAKE) -f Makefile.$(PORT) $(TARBALL)
$(MAKE) -f Makefile.$(PORT) clean execlean
all:
$(MAKE) -f Makefile.$(PORT) dist
# This is supposed to work out-of-the-box
%.o: src/%.cpp
$(CXX) -c $(CXXFLAGS) $<
# Replace by OBJECTS_NOSOUND if needed
$(EXE_NAME): $(OBJECTS)
$(CXX) $^ $(LINKFLAGS) -o $@
@echo
@echo "[*] $(EXE_NAME) successfully built."
# You might want to add additional targets here (see 'Makefile.mingw32')
$(TARBALL): $(EXE_NAME)
mkdir $(DISTNAME)
cp -r $(EXE_NAME) $(FILES_INCLUDE_DIST) $(DISTNAME)
# zip -r $@ $(DISTNAME) # zip is bad, but anyway...
# tar czf $@ $(DISTNAME) # tar.gz
# tar cjf $@ $(DISTNAME) # tar.bz2
tar cJf $@ $(DISTNAME) # tar.xz
rm -rf $(DISTNAME)
ls $(TARBALL)
@echo
@echo "[*] $(TARBALL) successfully generated."
# This is supposed to clean anything you've added/compiled, excepted the
# main executable
clean:
$(MAKE) clean
# Clean the generated executable
execlean:
rm -f $(EXE_NAME)
# Clean the generated tarball
distclean:
rm -f $(TARBALL)
### Custom targets ###
# This is for targets you would need somewhere. Again, see 'Makefile.mingw32'
# for an example
Jump to Line
Something went wrong with that request. Please try again.