home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / octa21fs.zip / octave / makerules < prev    next >
Text File  |  2000-01-15  |  1KB  |  62 lines

  1. # Definitionen und Regeln fuer alle makefiles
  2. # (c) Klaus Gebhardt, 1994
  3.  
  4. include i:/project/c/makeversions
  5.  
  6. CC = gcc
  7.  
  8. AR = ar
  9. ARFLAGS = r
  10. RANLIB = $(AR) s
  11.  
  12. LDFLAGS = -L.
  13.  
  14. %.o : %.f
  15.     f2c -A -a $<
  16.     $(CC) $(CFLAGS) -c $(patsubst %.f,%.c,$<) -o $@
  17.     @rm $(patsubst %.f,%.c,$<)
  18.  
  19. %.o : %.cc ; $(CC) $(CFLAGS) -c $< -o $@
  20. %.o : %.c ; $(CC) $(CFLAGS) -c $< -o $@
  21.  
  22. %.o : %.s ; $(CC) -mprobe -c -x assembler-with-cpp -I. $<
  23. %l.o : %.s ; $(CC) -mprobe -DLONG_DOUBLE -c -x assembler-with-cpp -I. $< -o $@
  24.  
  25. %.obj : %.f
  26.     f2c -A -a $<
  27.     $(CC) $(CFLAGS) -c $(patsubst %.f,%.c,$<) -o $@ -Zomf
  28.     @rm $(patsubst %.f,%.c,$<)
  29.  
  30. %.obj : %.cc ; $(CC) $(CFLAGS) -c $< -o $@ -Zomf
  31. %.obj : %.c ; $(CC) $(CFLAGS) -c $< -o $@ -Zomf
  32.  
  33. %.obj : %.s ; $(CC) -mprobe -c -x assembler-with-cpp -I. $< -Zomf
  34. %l.obj : %.s ; $(CC) -mprobe -DLONG_DOUBLE -c -x assembler-with-cpp -I. $< -o $@ -Zomf
  35.  
  36. %.a : $(OBJECTS)
  37.     rm -f $@
  38.     $(AR) $(ARFLAGS) $@ $(OBJECTS)
  39.     $(RANLIB) $@
  40.  
  41. %.lib : %.a
  42.     emxomf -l $<
  43.  
  44. %.res : %.rc
  45.     rc -r $<
  46.  
  47. all : $(LIBRARY) $(EXEC)
  48.  
  49. install : all
  50. ifdef LIBRARY
  51.     cp $(LIBRARY) $(LIBDIR)
  52. endif
  53. ifdef INCLUDES
  54.     cp $(INCLUDES) $(INCLDIR)
  55. endif
  56. ifdef INFO
  57.     cp $(INFO) $(INFODIR)
  58. endif
  59.  
  60. clean :
  61.     rm -f *.a *.lib *.o *.obj *.exe *.dll
  62.