home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Exec 5 / CD_Magazyn_EXEC_nr_5.iso / Programy / MorphOS / morphosdev-150201.lha / emulinclude / makefile < prev    next >
Encoding:
Makefile  |  2001-02-14  |  3.8 KB  |  133 lines

  1.  
  2. SHELL   =       /bin/sh
  3. MAKE    =       make
  4.  
  5. ##############################################################################
  6.  
  7.  
  8. G_IPATH         =       -I../include/
  9. G_DEFINES       =       -D$(CODETYPE) -DROMEMUL
  10. G_OPTFLAGS      =       -O2 -fomit-frame-pointer -fverbose-asm -mno-prototype -mcpu=604 -mregnames -Wformat -Wunused -Wuninitialized -Wconversion -Wstrict-prototypes -Werror-implicit-function-declaration
  11.  
  12.  
  13. IPATH           =       IDIR=PowerUP:NewKernel/include IDIR=include:
  14. DEFINES         =       DEFINE=$(CODETYPE)
  15. OPTFLAGS        =       OPTIMIZE OPTIMIZESCHEDULE OPTIMIZEGLOBAL
  16. CFLAGS          =       STRINGMERGE NOSTACKCHECK PARMS=REGISTER DATA=FARONLY CODE=NEAR DEFINE=$(CODETYPE)
  17. LINK            =       slink
  18.  
  19.  
  20. APATH           =       -i/include/
  21. AFLAGS          =       -M4000
  22.  
  23. ##############################################################################
  24.  
  25. INCLUDE         =       ../include
  26. PINCLUDE        =       $(INCLUDE)/private/quark/
  27. RINCLUDE        =       $(INCLUDE)/public/quark/
  28.  
  29. ##############################################################################
  30.  
  31. all:    PATCH        \
  32.     CREATE
  33.  
  34. .PHONY: all         \
  35.     PATCH        \
  36.     CREATE        \
  37.     CREATEINCLUDE    \
  38.     CREATEINLINE    \
  39.     
  40.  
  41.  
  42. ##############################################################################
  43.  
  44.  
  45. PATCH:
  46.     mkdir -p include
  47.     cp -r include_h/* include
  48.     patch -d include -p1 <include.diffs
  49.     mkdir -p includenew
  50.     cp -r include_h/* includenew
  51.     patch -E -d includenew -p1 <includenew.diffs
  52.     -grep 'Only in' <includenew.diffs | sed -e s/'Only in '/'rm '/g -e s/include_h/includenew/g -e "s/: /\//g" | sh
  53.     -grep 'Only in' <includenew.diffs | grep -v '\.' | sed -e s/'Only in '/'rm -r '/g -e s/include_h/includenew/g -e "s/: /\//g" | sh
  54.     find ./ -iname \*.orig -exec rm {} \;
  55.  
  56.  
  57.  
  58.  
  59. CREATE:
  60.     ./geninclude.sh ./include ./includegcc
  61.     ./geninclude.sh ./includenew ./includegcc
  62.     cp includenew/emul/*.h includegcc/emul
  63.     ./geninline.sh ./include/fd ./include/clib ./includegcc/ppcinline
  64.     ./geninline.sh ./includenew/fd ./includenew/clib ./includegcc/ppcinline
  65.  
  66.  
  67. CREATEPROTO:
  68.     ./genproto.sh ./include/fd ./includegcc/proto
  69.  
  70. CREATEPROTONEW:
  71.     ./genproto.sh ./includenew/fd ./includegcc/proto
  72.     ./genproto.sh ./includenew/powerup/fd ./includegcc/powerup/proto
  73.  
  74. CREATEPROTO3RD:
  75.     ./genproto.sh ./include3rd/fd ./includegcc/proto
  76.  
  77. #
  78. # Keep the order as includenew/ overloads
  79. # the normal includes
  80. #
  81. CREATEINCLUDE:
  82.     ./geninclude.sh ./include ./includegcc
  83.     ./geninclude.sh ./include3rd ./includegcc
  84.     ./geninclude.sh ./includenew ./includegcc
  85.     cp includenew/emul/*.h includegcc/emul
  86.  
  87. CREATEINCLUDENEW:
  88.     ./geninclude.sh ./includenew ./includegcc
  89.     cp includenew/emul/*.h includegcc/emul
  90.     cp includenew/fd/* includegcc/fd
  91.     cp includenew/clib/* includegcc/clib
  92.  
  93. CREATEINCLUDE3RD:
  94.     ./geninclude.sh ./include3rd ./includegcc
  95.     cp include3rd/fd/* includegcc/fd
  96.     cp include3rd/clib/* includegcc/clib
  97.  
  98. CREATEINLINE:
  99.     ./geninline.sh ./include/fd ./include/clib ./includegcc/ppcinline
  100.     ./geninline.sh ./include3rd/fd ./include3rd/clib ./includegcc/ppcinline
  101.     ./geninline.sh ./includenew/fd ./includenew/clib ./includegcc/ppcinline
  102.  
  103.  
  104. CREATEINLINENEW:
  105.     ./geninline.sh ./includenew/fd ./includenew/clib ./includegcc/ppcinline
  106.     ./geninline.sh ./includenew/powerup/fd ./includenew/powerup/clib ./includegcc/ppcinline
  107.  
  108. CREATEINLINE3RD:
  109.     ./geninline.sh ./include3rd/fd ./include3rd/clib ./includegcc/ppcinline
  110.  
  111. CREATESTUBS:
  112.     rm -rf /t/amigalib
  113.     mkdir /t/amigalib
  114.     ./genstubs.sh ./includegcc/fd ./includegcc /t/amigalib
  115.     ./mergelibs.sh /t/amigalib ../lib/libamigastubs.a
  116.     rm -rf /t/amigalib
  117.  
  118. #./genstubs.sh ./include3rd/fd ./include3rd ../lib
  119. #./genstubs.sh ./includenew/fd ./includenew ../lib
  120.  
  121. CREATESTUBSNEW:
  122.     ./genstubs.sh ./includenew/fd ./includenew ../lib
  123.  
  124. CREATESTUBS3RD:
  125.     ./genstubs.sh ./include3rd/fd ./include3rd ../lib
  126.  
  127. FIXPROTOS:
  128.     mkdir /t/fixclib
  129.     ./add_struct_decl.sh ./includegcc/clib /t/fixclib
  130.     cp /t/fixclib/* ./includegcc/clib
  131.     rm -rf /t/fixclib
  132.  
  133.