Advertisement
Guest User

Untitled

a guest
Apr 26th, 2015
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 0.67 KB | None | 0 0
  1. CFLAGS = -Wall -Wextra -Werror -std=gnu11
  2. LDFLAGS =
  3. CDEBUG = -g -DDEBUG -O0
  4. CRELEASE = -DNDEBUG -O2
  5. CC = gcc
  6.  
  7. .c.o:
  8.         $(CC) $(CFLAGS) -c -o $@ $<
  9.  
  10. parse.o: parse.c parse.h
  11.  
  12. trie.o: trie.c trie.h
  13.  
  14. dictionary.o: dictionary.c trie.h parse.h
  15.  
  16. dictionary: dictionary.o trie.o parse.o
  17.         $(CC) $(CLFAGS) -o dictionary dictionary.o trie.o parse.o
  18.  
  19. dictionary.dbg: dictionary.o trie.o parse.o
  20.         $(CC) $(CLFAGS) -o dictionary.dbg dictionary.o trie.o parse.o
  21.  
  22. .PHONY: all clean debug
  23.  
  24. all: CFLAGS += $(CRELEASE)
  25. all: dictionary
  26.  
  27. debug: CFLAGS += $(CDEBUG)
  28. debug: dictionary.dbg
  29.  
  30. clean:
  31.         rm trie.o parse.o dictionary.o dictionary dictionary.dbg
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement