daily pastebin goal
11%
SHARE
TWEET

ASCIIpOrtal Makefile

a guest Oct 1st, 2012 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Makefile by kaw, fixed by Epicoder
  2.  
  3. # Requires PDCSDL, set PDCSDLDIR to point to a compiled version.
  4. # this version should dl and compile it for you /Epicoder
  5.  
  6. PDCSVER=3.4
  7. PDCSDLDIR = ./PDCurses-$(PDCSVER)
  8.  
  9. PACKAGENAME = asciiportal-linuxarm
  10. WINDOWSZIP = asciiportal.zip
  11.  
  12. GPPOPTS = -O2
  13.  
  14. all: asciiportal
  15.  
  16. clean:
  17.         rm -f *.o
  18.         rm -f asciiportal
  19.  
  20. fullclean: clean
  21.         rm -rf $(PACKAGENAME)
  22.         rm -f $(PACKAGENAME).tar.gz
  23.         rm -rf $(PDCSDLDIR)
  24.  
  25. package: fullclean asciiportal
  26.         strip asciiportal
  27.         upx asciiportal
  28.         mkdir $(PACKAGENAME)
  29.         unzip -d $(PACKAGENAME) $(WINDOWSZIP)
  30.         cp Makefile $(PACKAGENAME)/source
  31.         rm $(PACKAGENAME)/*.exe
  32.         rm $(PACKAGENAME)/*.bat
  33.         rm $(PACKAGENAME)/*.dll
  34.         cp asciiportal $(PACKAGENAME)/
  35.         tar cvfz $(PACKAGENAME).tar.gz $(PACKAGENAME)
  36.  
  37. %.o: %.cpp $(PDCSDLDIR)
  38.         g++ -I $(PDCSDLDIR) -c $(GPPOPTS) $<
  39.  
  40. asciiportal: ap_input.o ap_draw.o ap_play.o ap_sound.o main.o menu.o $(PDCSDLDIR)/sdl1/libpdcurses.a
  41.         g++ $^ -lSDL -lSDL_mixer -static-libgcc -static-libstdc++ -o $@
  42.  
  43. $(PDCSDLDIR)/sdl1/libpdcurses.a: $(PDCSDLDIR)
  44.         cd `dirname $@` && make
  45.  
  46. $(PDCSDLDIR): PDCurses-$(PDCSVER).tar.gz
  47.         tar xvfz $<
  48.  
  49. PDCurses-$(PDCSVER).tar.gz:
  50.         wget http://sourceforge.net/projects/pdcurses/files/pdcurses/$(PDCSVER)/PDCurses-$(PDCSVER).tar.gz/download-O$@
  51.         if [[ ! -f $@ ]]; then echo "Download of $@ failed, please provide file."; exit; fi
RAW Paste Data
Top