home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 15 / AACD15.ISO / AACD / System / MorphOS / Developer / emulinclude / makefile < prev    next >
Encoding:
Makefile  |  2000-11-02  |  3.5 KB  |  121 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 -r includenew/emul/* 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. #
  71. # Keep the order as includenew/ overloads
  72. # the normal includes
  73. #
  74. CREATEINCLUDE:
  75.     ./geninclude.sh ./include ./includegcc
  76.     ./geninclude.sh ./include3rd ./includegcc
  77.     ./geninclude.sh ./includenew ./includegcc
  78.     cp includenew/emul/* includegcc/emul
  79.  
  80. CREATEINCLUDENEW:
  81.     ./geninclude.sh ./includenew ./includegcc
  82.     cp includenew/emul/* includegcc/emul
  83.  
  84. CREATEINCLUDE3RD:
  85.     ./geninclude.sh ./include3rd ./includegcc
  86.  
  87. CREATEINLINE:
  88.     ./geninline.sh ./include/fd ./include/clib ./includegcc/ppcinline
  89.     ./geninline.sh ./include3rd/fd ./include3rd/clib ./includegcc/ppcinline
  90.     ./geninline.sh ./includenew/fd ./includenew/clib ./includegcc/ppcinline
  91.  
  92.  
  93. CREATEINLINENEW:
  94.     ./geninline.sh ./includenew/fd ./includenew/clib ./includegcc/ppcinline
  95.     ./geninline.sh ./includenew/powerup/fd ./includenew/powerup/clib ./includegcc/ppcinline
  96.  
  97. CREATEINLINE3RD:
  98.     ./geninline.sh ./include3rd/fd ./include3rd/clib ./includegcc/ppcinline
  99.  
  100. CREATESTUBS:
  101.     rm -rf /t/amigalib
  102.     mkdir /t/amigalib
  103.     ./genstubs.sh ./include/fd ./include /t/amigalib
  104.     ./mergelibs.sh /t/amigalib ../lib/libamigastubs.a
  105.     rm -rf /t/amigalib
  106.     ./genstubs.sh ./include3rd/fd ./include3rd ../lib
  107.     ./genstubs.sh ./includenew/fd ./includenew ../lib
  108.  
  109. CREATESTUBSNEW:
  110.     ./genstubs.sh ./includenew/fd ./includenew ../lib
  111.  
  112. CREATESTUBS3RD:
  113.     ./genstubs.sh ./include3rd/fd ./include3rd ../lib
  114.  
  115. FIXPROTOS:
  116.     mkdir /t/fixclib
  117.     ./add_struct_decl.sh ./includegcc/clib /t/fixclib
  118.     cp /t/fixclib/* ./includegcc/clib
  119.     rm -rf /t/fixclib
  120.  
  121.