home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / D / SVGALIB / SVGALIB1.TAR / svgalib / demos / makefile < prev    next >
Encoding:
Makefile  |  1995-02-21  |  872 b   |  48 lines

  1.  
  2. CC     = gcc
  3. OPTIMIZE = -fomit-frame-pointer -O2 -s
  4. CFLAGS     = $(DEFINES) $(OPTIMIZE)
  5. LFLAGS   = -N
  6.  
  7. PROGS    = fun testgl speedtest mousetest vgatest scrolltest testlinear \
  8.        keytest testaccel accel
  9. PROGS_O  = fun.o testgl.o speedtest.o mousetest.o vgatest.o scrolltest.o \
  10.        testlinear.o keytest.o testaccel.o accel.o
  11. LIBS     = -lvgagl -lvga
  12.  
  13. all:    progs
  14.  
  15. progs : $(PROGS)
  16.  
  17. objs:    $(PROGS_O)
  18.  
  19. .c.o:
  20.     $(CC) $(CFLAGS) -c -o $*.o $<
  21.  
  22. .c.s:
  23.     $(CC) $(CFLAGS) -S -o $*.s $<
  24.  
  25. .o:
  26.     $(CC) $(CFLAGS) $(LFLAGS) -o $* $*.o $(LIBS)
  27.     chmod a+rs,go-w $*
  28.  
  29. testaccel: testaccel.o
  30.     $(CC) $(CFLAGS) $(LFLAGS) -o testaccel testaccel.o $(LIBS) -lm
  31.     chmod a+rs,go-w testaccel
  32.  
  33. clean        :    cleanbin
  34.     rm -f *.o *~
  35.  
  36. cleanbin    :
  37.     rm -f $(PROGS)
  38.  
  39. dep        :
  40.     rm -f .depend
  41.     make .depend
  42.  
  43. .depend:
  44.     echo '# Program dependencies' >.depend
  45.     gcc -MM $(patsubst %.o,%.c,$(PROGS_O)) >>.depend
  46.  
  47. include .depend
  48.