Skip to content

Commit

Permalink
Makefiles: improve header dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
nolta committed Jun 10, 2012
1 parent 4cdb14a commit d1e4fe7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
14 changes: 8 additions & 6 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ FLAGS = \
-Wall -Wno-strict-aliasing -fno-omit-frame-pointer \
-Iflisp -Isupport -fvisibility=hidden -fno-common \
-I$(shell $(LLVM_CONFIG) --includedir) \
-I$(JULIAHOME)/deps/libuv -I$(USR)/include
-I$(JULIAHOME)/deps/libuv/include

ifneq ($(MAKECMDGOALS),debug)
TARGET =
Expand All @@ -38,16 +38,18 @@ default: release

release debug: %: libjulia-%

%.o: %.c julia.h
HEADERS = julia.h $(wildcard support/*.h) $(JULIAHOME)/deps/libuv/include/uv.h

%.o: %.c $(HEADERS)
$(QUIET_CC) $(CC) $(CFLAGS) $(SHIPFLAGS) -c $< -o $@
%.do: %.c julia.h
%.do: %.c $(HEADERS)
$(QUIET_CC) $(CC) $(CFLAGS) $(DEBUGFLAGS) -c $< -o $@
%.o: %.cpp julia.h
%.o: %.cpp $(HEADERS)
$(QUIET_CC) $(CXX) $(CXXFLAGS) $(SHIPFLAGS) $(shell $(LLVM_CONFIG) --cppflags) -c $< -o $@
%.do: %.cpp julia.h
%.do: %.cpp $(HEADERS)
$(QUIET_CC) $(CXX) $(CXXFLAGS) $(DEBUGFLAGS) $(shell $(LLVM_CONFIG) --cppflags) -c $< -o $@

ast.o ast.do: julia_flisp.boot.inc
ast.o ast.do: julia_flisp.boot.inc flisp/*.h

julia_flisp.boot.inc: julia_flisp.boot flisp/libflisp.a
$(QUIET_FLISP) flisp/flisp ./bin2hex.scm < $< > $@
Expand Down
6 changes: 4 additions & 2 deletions src/support/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ SHIPFLAGS += $(FLAGS)

default: release

%.o: %.c
HEADERS = $(wildcard *.h) $(JULIAHOME)/deps/libuv/include/uv.h

%.o: %.c $(HEADERS)
$(QUIET_CC) $(CC) $(SHIPFLAGS) -c $< -o $@
%.do: %.c
%.do: %.c $(HEADERS)
$(QUIET_CC) $(CC) $(DEBUGFLAGS) -c $< -o $@

release debug: libsupport.a
Expand Down

0 comments on commit d1e4fe7

Please sign in to comment.