home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 15 / AACD15.ISO / AACD / System / MorphOS / Developer / emulexamples / library / skeleton / makefile < prev    next >
Encoding:
Makefile  |  2000-11-02  |  2.9 KB  |  109 lines

  1.  
  2. SHELL    =    /bin/sh
  3.  
  4. ##############################################################################
  5.  
  6. TARGET        =    PPC
  7. CODETYPE    =    PPC
  8. VERSION        =    0
  9.  
  10. ##############################################################################
  11.  
  12. #-I/ade/ppc-amigaos/include/
  13. #-Iinclude:
  14. # -I/ade/include   -I../../../emulinclude/includenew/
  15. G_IPATH        =    -I../../../emulinclude/includegcc/ -I../../../include/
  16. G_DEFINES    =    -D$(CODETYPE)
  17. G_OPTFLAGS    =    -O2            \
  18.             -fomit-frame-pointer    \
  19.             -fverbose-asm        \
  20.             -mstrict-align        \
  21.             -mno-prototype        \
  22.             -mcpu=604        \
  23.             -mregnames        \
  24.             -Wformat        \
  25.             -Wunused        \
  26.             -Wuninitialized        \
  27.             -Wconversion        \
  28.             -Wstrict-prototypes    \
  29.             -Werror-implicit-function-declaration
  30.  
  31.  
  32. APATH        =    -iinclude/
  33. AFLAGS        =    -M4000
  34.  
  35. ##############################################################################
  36.  
  37. all:    ppcexample.library.elf    \
  38.     lib_inline.h
  39.  
  40. ##############################################################################
  41.  
  42. .SUFFIXES: .o$(TARGET) .asm
  43.  
  44. .c.o$(TARGET):
  45.     ppc-amigaos-gcc $(G_CFLAGS) $(G_OPTFLAGS) $(G_DEBUG) $(G_DEFINES) $(G_IPATH) -S -o $*.s $*.c
  46.     ppc-amigaos-as -v -o$*.o$(TARGET) $*.s
  47.  
  48. .s.o$(TARGET):
  49.     ppc-amigaos-as -o$*.o$(TARGET) $*.s
  50.  
  51.  
  52. .asm.o$(TARGET):
  53.     basm $(AFLAGS) $(APATH) -o$*.o$(TARGET) $*.asm
  54.  
  55. ##############################################################################
  56. ##############################################################################
  57. ##############################################################################
  58. ##############################################################################
  59. ##############################################################################
  60. ##############################################################################
  61. ##############################################################################
  62. #
  63. # amiga Emulation
  64. #
  65.  
  66. LIB        =    ../../../lib
  67.  
  68. SRC        =
  69.  
  70. GLOBAL        =    libdata.h
  71.  
  72. lib.o$(TARGET):            $(SRC)lib.c            $(GLOBAL)
  73. libend.o$(TARGET):        $(SRC)libend.c
  74. libfunctions.o$(TARGET):    $(SRC)libfunctions.c        $(GLOBAL)
  75. libfunctable.o$(TARGET):    $(SRC)libfunctable.c        $(GLOBAL)
  76.  
  77. OBJS        =    lib.o$(TARGET)\
  78.             libfunctions.o$(TARGET)\
  79.             libfunctable.o$(TARGET)\
  80.             libend.o$(TARGET)
  81.  
  82. lib_inline.h:    lib.fd lib_protos.h
  83.         ../../../emultools/fd2inline/fd2inline --new --powerup lib.fd lib_protos.h $@
  84.  
  85. #####################################################################
  86. #
  87. # Link Project
  88. #
  89.  
  90. #####################################################################
  91. #
  92. # Project ppcexample.library.library
  93. #
  94.  
  95. ppcexample.library.elf:    $(OBJS)            \
  96.             $(LIB)/libsyscall.a
  97.         ppc-amigaos-ld -v -L./lib -r $(OBJS) $(LIB)/libsyscall.a -o ppcexample.library.elf -lm
  98.  
  99.  
  100. BUMP:
  101.     bumprev2 VERSION=$(VERSION) FILE=$(SRC)ppcexample.library_VERSION TAG=ppcexample.library ADD="© 2000 by Ralph Schmidt, written by Ralph Schmidt"
  102.  
  103.  
  104. DUMP:
  105.     ppc-amigaos-objdump --section-headers --all-headers --reloc --disassemble-all ppcexample.library.elf >ppcexample.library.elf.dump
  106.  
  107. ##############################################################################
  108. .PHONY: all
  109.