home *** CD-ROM | disk | FTP | other *** search
/ Serving the Web / ServingTheWeb1995.disc1of1.iso / linux / slacksrce / d / libc / libc-4.6 / libc-4 / libc-linux / elf / crt / Makefile < prev    next >
Encoding:
Makefile  |  1994-11-11  |  2.5 KB  |  102 lines

  1. #
  2. # Makefile for crt0.o of Linux
  3. #
  4. #
  5.  
  6. LD=true
  7. MV=true
  8. override STATIC_SHARED=false
  9. override SHARED=false
  10. override DEBUG=false
  11.  
  12. TOPDIR=../..
  13.  
  14. include $(TOPDIR)/Makeconfig
  15. include $(TOPDIR)/Makerules
  16.  
  17. CFLAGS=
  18. DEBUG_CFLAGS=
  19.  
  20. PROFILE_CFLAGS=
  21. CHECKER_CFLAGS=
  22. CC = $(REALCC)
  23. SED=sed
  24.  
  25. CRT_CFLAGS=-DGENERATE_SHARED_ELF_CXX_CODE=1
  26.  
  27. ifeq ($(ELF),true)
  28.  
  29. crt: $(ELF_SHARED_DIR)/crtbegin.o $(ELF_SHARED_DIR)/crtend.o \
  30.     $(ELF_SHARED_DIR)/crtbeginS.o $(ELF_SHARED_DIR)/crtendS.o
  31.  
  32. asm: crtbegin.s crtend.s crtbeginS.s crtendS.s
  33.  
  34. $(ELF_SHARED_DIR)/crtbeginS.o: crtstuff.c
  35.     $(CC) -DIN_GCC -DPOSIX  -O2 -fomit-frame-pointer -I. \
  36.         -fpic $(CRT_CFLAGS) \
  37.         -Iconfig -DCRT_BEGIN -finhibit-size-directive \
  38.         -fno-inline-functions -g0 -c $< -o $@
  39.  
  40. $(ELF_SHARED_DIR)/crtendS.o: crtstuff.c
  41.     $(CC) -DIN_GCC -DPOSIX  -O2 -fomit-frame-pointer -I. \
  42.         -fpic $(CRT_CFLAGS) \
  43.         -Iconfig -DCRT_END -finhibit-size-directive \
  44.         -fno-inline-functions -g0 -c $< -o $@
  45.  
  46. $(ELF_SHARED_DIR)/crtbegin.o: crtstuff.c
  47.     $(CC) -DIN_GCC -DPOSIX  -O2 -fomit-frame-pointer -I. \
  48.         $(CRT_CFLAGS) \
  49.         -Iconfig -DCRT_BEGIN -finhibit-size-directive \
  50.         -fno-inline-functions -g0 -c $< -o $@
  51.  
  52. $(ELF_SHARED_DIR)/crtend.o: crtstuff.c
  53.     $(CC) -DIN_GCC -DPOSIX  -O2 -fomit-frame-pointer -I. \
  54.         $(CRT_CFLAGS) \
  55.         -Iconfig -DCRT_END -finhibit-size-directive \
  56.         -fno-inline-functions -g0 -c $< -o $@
  57.  
  58. crtbeginS.s: crtstuff.c
  59.     $(CC) -DIN_GCC -DPOSIX  -O2 -fomit-frame-pointer -I. \
  60.         -fpic $(CRT_CFLAGS) \
  61.         -Iconfig -DCRT_BEGIN -finhibit-size-directive \
  62.         -fno-inline-functions -g0 -S $< -o $@
  63.  
  64. crtendS.s: crtstuff.c
  65.     $(CC) -DIN_GCC -DPOSIX  -O2 -fomit-frame-pointer -I. \
  66.         -fpic $(CRT_CFLAGS) \
  67.         -Iconfig -DCRT_END -finhibit-size-directive \
  68.         -fno-inline-functions -g0 -S $< -o $@
  69.  
  70. # That is an ugly hack to work around the gas bug.
  71. crtbegin.s: crtstuff.c
  72.     $(RM) -rf tmp.s
  73.     $(CC) -DIN_GCC -DPOSIX  -O2 -fomit-frame-pointer -I. \
  74.         $(CRT_CFLAGS) \
  75.         -Iconfig -DCRT_BEGIN -finhibit-size-directive \
  76.         -fno-inline-functions -g0 -S $< -o tmp.s
  77.     $(SED) -e 's/^[     ]*\(call[     ]*__do_global_dtors_aux\)[     ]*$$/    \1@PLT/' tmp.s > $@
  78.     $(RM) -rf tmp.s
  79.  
  80. # That is an ugly hack to work around the gas bug.
  81. crtend.s: crtstuff.c
  82.     $(RM) -rf tmp.s
  83.     $(CC) -DIN_GCC -DPOSIX  -O2 -fomit-frame-pointer -I. \
  84.         $(CRT_CFLAGS) \
  85.         -Iconfig -DCRT_END -finhibit-size-directive \
  86.         -fno-inline-functions -g0 -S $< -o tmp.s
  87.     $(SED) -e 's/^[     ]*\(call[     ]*__do_global_ctors_aux\)[     ]*$$/    \1@PLT/' tmp.s > $@
  88.     $(RM) -rf tmp.s
  89.  
  90. else
  91.  
  92. lib::
  93.     @true
  94.  
  95. endif
  96.  
  97. realclean clean:
  98.     $(RM) -f core *.s *.o *.a tmp_make foo
  99.  
  100. depend:
  101.     @echo No dependency in `pwd`.
  102.