Guest User

Untitled

a guest
Oct 31st, 2017
396
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 2.42 KB | None | 0 0
  1. # --- tgcs-car for GP2X makefile
  2. #  rerofumi <rero2@yuumu.org>
  3. #
  4. # - GP2X crosscompile with Cygwin
  5. SDCARD = PANDORA1
  6. # I expect these sources to be compiled on the Pandora itself.  I did.
  7. GPTOOLCHAIN = /media/$(SDCARD)/appdata/cdevtools/init/gcc
  8. GPCC     = $(GPTOOLCHAIN)/gcc
  9. GPCXX    = $(GPTOOLCHAIN)/g++
  10. # GPSTRIP  = $(GPTOOLCHAIN)/mipsel-linux-strip
  11. GPCFLAGS = -DNOTPSP -D__GP2X__ -D__GP2X_SCREEN__
  12. GPLIBS   = `/mnt/utmp/cdevtools/usr/lib --libs` -lSDL_mixer -lm \
  13.             -lSDL_image -lpng -lz -ljpeg -lmad -lvorbisidec -lmikmod
  14. GPINCLUDE = -I/mnt/utmp/cdevtools/usr/lib
  15. GPSDLCONFIG = /mnt/utmp/cdevtools/usr/bin --libs
  16. GPSTATIC =
  17.  
  18. # --- source code target
  19. PCOBJS = bootmain.o debug.o input.o sound.o \
  20.         grp_screen.o grp_texture.o grp_sprite.o
  21.  
  22. GP2XOBJS = bootmain.o debug.o input.o sound.o \
  23.           gp2x_grp_screen.o grp_texture.o grp_sprite.o
  24.  
  25. # - your apprication object
  26. APPOBJS = gamemain.o puz_base.o puz_disp.o puz_trial.o
  27.  
  28.  
  29. #
  30. TARGET = tailtale
  31.  
  32. CFLAGS = `/mnt/utmp/cdevtools/usr/lib --libs` -O2 -Wall #-DDEBUG -g
  33.  
  34.  
  35.  
  36. # ----- suffix
  37. %.o: %.c
  38.     $(CC) $(CFLAGS) $(INCLUDE) -c $<
  39.  
  40.  
  41. # ----- target
  42. #   (pc) = windows with cygwin
  43. #   gp   = GP2X crosscompile with cygwin
  44. #   mac  = MacOSX(tiger)
  45. #
  46. all : pc
  47.  
  48. pc : CC = $(PCCC)
  49. pc : OBJS = $(PCOBJS) $(APPOBJS)
  50. pc : LIBS += $(PCLIBS)
  51. pc : LIBS += $(shell $(PCSDLCONFIG) --libs)
  52. pc : CFLAGS += $(PCCFLAGS)
  53. pc : CFLAGS += $(shell $(PCSDLCONFIG) --cflags)
  54. pc : INCLUDE = $(PCINCLUDE)
  55. pc : pcobjs
  56.     $(CC) -o $(TARGET) $(OBJS) $(LIBS)
  57.  
  58. pcobjs : $(PCOBJS) $(APPOBJS)
  59.  
  60.  
  61. gp : CC = $(GPCC)
  62. gp : OBJS = $(GP2XOBJS) $(APPOBJS)
  63. gp : LIBS += $(GPLIBS)
  64. gp : LIBS += $(shell $(GPSDLCONFIG) --libs)
  65. gp : CFLAGS += $(GPCFLAGS)
  66. gp : CFLAGS += $(shell $(GPSDLCONFIG) --cflags)
  67. gp : INCLUDE = $(GPINCLUDE)
  68. gp : gpobjs
  69.     $(GPCXX) $(GPSTATIC) -o $(TARGET) $(OBJS) $(LIBS)
  70.     $(GPSTRIP) $(TARGET)
  71.  
  72. gpobjs : $(GP2XOBJS) $(APPOBJS)
  73.  
  74.  
  75. clean :
  76.     rm -rf *.o $(TARGET) $(TARGET)% $(TARGET).exe $(TARGET) *~
  77.  
  78. bootmain.o : bootmain.c bootmain.h debug.h
  79. debug.o : debug.c debug.h
  80. psp_debug.o : psp_debug.c debug.h
  81. grp_screen.o : grp_screen.c grp_screen.h grp_texture.h
  82. psp_grp_screen.o : psp_grp_screen.c grp_screen.h grp_texture.h
  83. input.o : input.c
  84. sound.o : sound.h
  85. grp_texture.o : grp_texture.c grp_texture.h
  86. grp_sprite.o : grp_sprite.c grp_sprite.h
  87. gamemain.o : gamemain.c gamemain.h grp_screen.h input.h sound.h debug.h \
  88.              grp_texture.h grp_sprite.h
Add Comment
Please, Sign In to add comment