home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Linux / Enlightenment / imlib_DR-0.2.tar.gz / imlib_DR-0.2.tar / imlib / Imakefile < prev    next >
Makefile  |  1997-05-08  |  2KB  |  76 lines

  1. /* Comment this out if you want to install config files 
  2.  * under /etc/ instead of /etc/X11/Im/ */
  3. /*#define UseEtcX11     /* */
  4.  
  5. /* You shouldn't have to change anything below this line. */
  6. /* ---------------------------------------------------------------- */
  7.  
  8. LIBNAME=Im
  9. LIBREV=1.0
  10.  
  11. #ifdef UseEtcX11
  12. ETCDIR=/etc/X11/$(LIBNAME)
  13. #else
  14. ETCDIR=/etc
  15. #endif /* def UseEtcX11 */
  16.  
  17. CNFDIR = $(ETCDIR)
  18.  
  19. DEFINES = -DSYSTEM_IMRC=\"$(ETCDIR)/imrc\"
  20.  
  21. SRCS = load.c rend.c misc.c colors.c
  22. OBJS = load.o rend.o misc.o colors.o
  23. HDRS = imlib.h
  24.  
  25. CCOPTIONS = -ffast-math
  26. INCLUDES = -I.
  27. SYS_LIBRARIES = $(XLIB)
  28.  
  29. /*#ifdef LinuxArchitecture*/
  30. SHOBJDIR = ./shobj
  31. SHOBJS = $(SHOBJDIR)/load.o $(SHOBJDIR)/rend.o $(SHOBJDIR)/misc.o \
  32.     $(SHOBJDIR)/colors.o
  33. SHCFLAGS = -fPIC
  34.  
  35. SharedLibraryTarget($(LIBNAME),$(LIBREV),$(SHOBJS),.,.)
  36. InstallSharedLibrary($(LIBNAME),$(LIBREV),$(SHLIBDIR))
  37.  
  38. $(SHOBJDIR)/%.o: %.c
  39.     $(CC) $(CFLAGS) $(SHCFLAGS) -o $@ -c $<
  40.     
  41. includes::
  42.     if [ ! -d $(SHOBJDIR) ]; then $(MKDIRHIER) $(SHOBJDIR); fi
  43.  
  44. clean::
  45.     $(RM) $(SHOBJS)
  46.     rm -f libIm.so.1
  47.     rm -f Makefile
  48.     rm -rf sys_conf
  49.     if [ -d $(SHOBJDIR) ]; then rmdir $(SHOBJDIR); fi
  50. /*#endif */
  51. /* LinuxArchitecture */
  52.  
  53. NormalLibraryTarget($(LIBNAME),$(OBJS))
  54. InstallLibrary($(LIBNAME),$(USRLIBDIR))
  55.  
  56. InstallMultiple($(HDRS),$(INCROOT)/X11)
  57.  
  58. /* Install configuration files in the right place. */
  59. CNFSRC = ./sys_conf
  60. CNFS = $(CNFSRC)/imrc 
  61. PALS = $(CNFSRC)/im_palette.pal
  62. CNFFLAGS = -m 0644 -o root -g root
  63. InstallMultipleFlags($(CNFS) $(PALS),$(CNFDIR),$(CNFFLAGS))
  64.  
  65. DependTarget()
  66.  
  67. /* This makes the configuration files
  68.  * look for palettes in the right place. */
  69. includes::
  70.     cp -rf sys_conf.dist sys_conf
  71.     @set -x; \
  72.     for i in $(CNFS); do \
  73.         mv -f $$i $$i~; \
  74.         cat $$i~ | sed -e 's#@ETCDIR@#$(ETCDIR)#g' >$$i; \
  75.     done
  76.