[pytango] 59/483: make use of precompiled header
Sandor Bodo-Merle
sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:14:24 UTC 2017
This is an automated email from the git hooks/post-receive script.
sbodomerle-guest pushed a commit to annotated tag bliss_8.10
in repository pytango.
commit 2dfaa23e3e3524c93deb3b137a62abfcef284c69
Author: tiagocoutinho <tiagocoutinho at 4e9c00fd-8f2e-0410-aa12-93ce3db5e235>
Date: Tue Nov 15 13:50:30 2011 +0000
make use of precompiled header
git-svn-id: http://svn.code.sf.net/p/tango-cs/code/bindings/PyTango/trunk@18385 4e9c00fd-8f2e-0410-aa12-93ce3db5e235
---
Makefile | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 701f92a..0ec36c9 100644
--- a/Makefile
+++ b/Makefile
@@ -54,6 +54,9 @@ endif
SRC_DIR = src
+PRE_C_H = $(SRC_DIR)/precompiled_header.hpp
+PRE_C_H_O = $(PRE_C_H).gch
+
ifndef OBJS_DIR
OBJS_DIR = objs
endif
@@ -70,6 +73,7 @@ LN_DIRS = -L$(TANGO_ROOT)/lib
PY_INC = $(shell python-config --includes)
NUMPY_INC = -I$(NUMPY_ROOT)/include
TANGO_INC = -I$(TANGO_ROOT)/include
+PRE_C = -include$(PRE_C_H)
INCLUDE_DIRS = \
-Isrc \
@@ -164,27 +168,30 @@ device_impl.h
all: build
-build: init $(LIB_NAME)
+build: init $(PRE_C_H_O) $(LIB_NAME)
init:
mkdir -p $(OBJS_DIR)
+$(PRE_C_H_O): $(PRE_C_H)
+ $(CC) $(CCFLAGS) -c $< -o $(PRE_C_H_O)
+
#
# Rule for shared library
#
.SUFFIXES: .o .cpp
-.cpp.o:
+.cpp.o: $(PRE_C_H_O)
$(CC) $(CCFLAGS) -c $< -o $*.o
#
# Rule for API files
#
$(OBJS_DIR)/%.o: $(SRC_DIR)/%.cpp
- $(CC) $(CCFLAGS) -c $< -o $(OBJS_DIR)/$*.o
+ $(CC) $(CCFLAGS) -c $< -o $(OBJS_DIR)/$*.o $(PRE_C)
$(OBJS_DIR)/%.o: $(SRC_DIR)/server/%.cpp
- $(CC) $(CCFLAGS) -c $< -o $(OBJS_DIR)/$*.o
+ $(CC) $(CCFLAGS) -c $< -o $(OBJS_DIR)/$*.o $(PRE_C)
#
# The shared libs
@@ -200,7 +207,7 @@ $(LIB_NAME): $(OBJS)
clean:
rm -f *.o core
- rm -f $(PREP).gch
+ rm -f $(SRC_DIR)/*.gch
rm -rf $(OBJS_DIR)
install-py:
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pytango.git
More information about the debian-science-commits
mailing list