Skip to content
Browse files

Now it compiles in a reasonable way

  • Loading branch information...
1 parent 850836f commit 6ed13aa56fd8e30bc9b4848316d6272cc338d320 @Golevka committed Jun 22, 2012
Showing with 4 additions and 15 deletions.
  1. +2 −11 Makefile
  2. +2 −4 makefile.mk
View
13 Makefile
@@ -5,17 +5,8 @@ OBJECT_PATH := ./src/obj
PROGRAM_NAME := clang-complete
-EXTERNAL_LIBS := $(wildcard /usr/lib/llvm/*.a)
-LDLIBS := `llvm-config --ldflags --libs all` -lstdc++
+LDLIBS := $(shell llvm-config --ldflags) $(shell llvm-config --libs all) -lstdc++ -lclang
+CFLAGS += $(shell llvm-config --cflags) -Wall -Wextra -pedantic -O3
-CFLAGS += `llvm-config --cflags` -Wall -Wextra -pedantic -O3
-#CC = g++
include makefile.mk
-
-
-# default:
-# g++ syntax.c -fno-rtti \
-# `llvm-config --cflags --ldflags --libs all` \
-# /usr/lib/llvm/libLLVM*.a /usr/lib/llvm/libclang*.a \
-# -o syntax
View
6 makefile.mk
@@ -41,7 +41,8 @@ $(PROGRAM_NAME): $(object-list)
$(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@
-$(OBJECT_PATH)/%.o: %.c $(OBJECT_PATH)
+$(OBJECT_PATH)/%.o: %.c
+ @mkdir -p $(OBJECT_PATH)
$(COMPILE.c) $(OUTPUT_OPTION) $<
@@ -54,9 +55,6 @@ $(DEPENDENCY_PATH)/%.d: %.c
sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
rm -f $@.$$$$
-$(OBJECT_PATH):
- @mkdir -p $@
-
.PHONY: clean build
clean:

0 comments on commit 6ed13aa

Please sign in to comment.
Something went wrong with that request. Please try again.