You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

52 lines
1.3 KiB

  1. YFLAGS+= -d
  2. LEX=flex
  3. TARGETS= libcuefile.a
  4. OBJS= cd.o cdtext.o time.o cuefile.o
  5. CUE_OBJS= cue_parse.o cue_scan.o cue_print.o
  6. TOC_OBJS= toc_parse.o toc_scan.o toc_print.o
  7. # There are multiple scanners/parsers
  8. # so we need a prefix to aviod conflicts.
  9. # (NOTE: these lines require GNU Make)
  10. # these have been moved to the source files to prepare for automake
  11. # for flex, used %option prefix="cue_yy"
  12. #toc_scan.c: LFLAGS+= -Ptoc_yy
  13. #cue_scan.c: LFLAGS+= -Pcue_yy
  14. # for yacc, used cue_parse_prefix.h with defines
  15. #toc_parse.c: YFLAGS+= -p toc_yy
  16. #cue_parse.c: YFLAGS+= -p cue_yy
  17. all: $(TARGETS)
  18. libcuefile.a: libcuefile.a($(OBJS) $(CUE_OBJS) $(TOC_OBJS))
  19. %.c: %.y
  20. $(YACC) -o $@ $(YFLAGS) $<
  21. install: all
  22. uninstall:
  23. clean:
  24. rm -f $(TARGETS)
  25. rm -f *.o *.a *.core *.output
  26. rm -f toc_scan.c toc_parse.c toc_parse.h
  27. rm -f cue_scan.c cue_parse.c cue_parse.h
  28. # dependancies
  29. # generated with `gcc -MM *.c'
  30. # after building lex and yacc .c files
  31. cd.o: cd.c cd.h cdtext.h
  32. cdtext.o: cdtext.c cdtext.h
  33. cuefile.o: cuefile.c cuefile.h cd.h cdtext.h cue.h toc.h
  34. cue_parse.o: cue_parse.c cd.h cdtext.h time.h
  35. cue_print.o: cue_print.c cd.h cdtext.h time.h
  36. cue_scan.o: cue_scan.c cd.h cdtext.h cue_parse.h
  37. time.o: time.c
  38. toc_parse.o: toc_parse.c cd.h cdtext.h time.h
  39. toc_print.o: toc_print.c cd.h cdtext.h time.h
  40. toc_scan.o: toc_scan.c cd.h cdtext.h toc_parse.h