Advertisement
Guest User

make file error

a guest
Mar 30th, 2015
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.97 KB | None | 0 0
  1. $ make
  2. find: `{test,src}/*.c': No such file or directory
  3. make: clang: Command not found
  4. make: *** [src/ast.o] Error 127
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12. # Following is the MakeFile
  13. SRC = $(wildcard src/*.c)
  14. OBJ = ${SRC:.c=.o}
  15.  
  16. CC = clang
  17. PREFIX = /usr/local
  18. CFLAGS = -std=c99 -g -O0 -Wno-parentheses -Wno-switch-enum -Wno-unused-value
  19. CFLAGS += -Wno-switch
  20. CFLAGS += -I deps
  21.  
  22. # linenoise
  23.  
  24. CFLAGS += -I deps/linenoise
  25. OBJ += deps/linenoise/linenoise.o
  26.  
  27. TEST_SRC = $(shell find {test,src}/*.c | sed '/luna/d')
  28. TEST_OBJ = ${TEST_SRC:.c=.o}
  29. CFLAGS += -I src
  30.  
  31. luna: $(OBJ)
  32.     $(CC) $^ $(LDFLAGS) -o $@
  33.  
  34. %.o: %.c
  35.     @$(CC) -c $(CFLAGS) $< -o $@
  36.     @printf "\e[36mCC\e[90m %s\e[0m\n" $@
  37.  
  38. test: test_runner test-parser
  39.     @./$<
  40.  
  41. test-parser:
  42.     @sh test/parser.sh
  43.  
  44. test_runner: $(TEST_OBJ)
  45.     $(CC) $^ -o $@
  46.  
  47. install: luna
  48.     install luna $(PREFIX)/bin
  49.  
  50. uninstall:
  51.     rm $(PREFIX)/bin/luna
  52.  
  53. clean:
  54.     rm -f luna test_runner $(OBJ) $(TEST_OBJ)
  55.  
  56. .PHONY: clean test test-parser install uninstall
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement