home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 15 / AACD15.ISO / AACD / System / MorphOS / Developer / emulexamples / libnixppc / makefile next >
Encoding:
Makefile  |  2000-11-02  |  2.3 KB  |  89 lines

  1.  
  2. SHELL    =    /bin/sh
  3.  
  4. ##############################################################################
  5.  
  6. TARGET        =    PPC
  7. CODETYPE    =    PPC
  8. VERSION        =    0
  9.  
  10. ##############################################################################
  11.  
  12. G_IPATH        =    -I../../emulinclude/includestd/ -I../../include/
  13. G_DEFINES    =    -D$(CODETYPE)
  14. G_OPTFLAGS    =    -O2            \
  15.             -fomit-frame-pointer    \
  16.             -fverbose-asm        \
  17.             -mstrict-align        \
  18.             -mno-prototype        \
  19.             -mcpu=604e        \
  20.             -mregnames        \
  21.             -Wformat        \
  22.             -Wunused        \
  23.             -Wuninitialized        \
  24.             -Wconversion        \
  25.             -Wstrict-prototypes    \
  26.             -Werror-implicit-function-declaration
  27.  
  28. G_OPTFLAGS =  -O2 -funroll-loops -mcpu=604e -mstrict-align -Wall -I. -I../emulinclude/includegcc/ -I../include/ -I../emulinclude/includestd/ -mmultiple
  29.  
  30.  
  31. APATH        =    -iinclude/
  32. AFLAGS        =    -M4000
  33.  
  34. ##############################################################################
  35.  
  36. all:    test.elf
  37.  
  38. ##############################################################################
  39.  
  40. .SUFFIXES: .o$(TARGET) .asm
  41.  
  42. .c.o$(TARGET):
  43.     ppc-amigaos-gcc $(G_CFLAGS) $(G_OPTFLAGS) $(G_DEBUG) $(G_DEFINES) $(G_IPATH) -S -o $*.s $*.c
  44.     ppc-amigaos-as -v -o$*.o$(TARGET) $*.s
  45.  
  46. .s.o$(TARGET):
  47.     ppc-amigaos-as -o$*.o$(TARGET) $*.s
  48.  
  49.  
  50. .asm.o$(TARGET):
  51.     basm $(AFLAGS) $(APATH) -o$*.o$(TARGET) $*.asm
  52.  
  53. ##############################################################################
  54. ##############################################################################
  55. ##############################################################################
  56. ##############################################################################
  57. ##############################################################################
  58. ##############################################################################
  59. ##############################################################################
  60. #
  61. # amiga Emulation
  62. #
  63.  
  64. LIB        =    ../../lib/
  65.  
  66. SRC        =
  67.  
  68. GLOBAL        =    
  69.  
  70. test.o$(TARGET):    test.c    $(GLOBAL)
  71.  
  72. OBJS        =    test.o$(TARGET)
  73.  
  74.  
  75. #####################################################################
  76. #
  77. # Link Project
  78. #
  79.  
  80. test.elf:    $(OBJS)
  81.         ppc-amigaos-ld -v -L$(LIB) -r $(LIB)startup.o $(LIB)__nocommandline.o $(OBJS) -o test.elf -lsyscall -lc -lm
  82.         protect test.elf +e
  83.  
  84. DUMP:
  85.     ppc-amigaos-objdump --section-headers --all-headers --reloc --disassemble-all test.elf >test.elf.dump
  86.  
  87. ##############################################################################
  88. .PHONY: all
  89.