mirror of
git://projects.qi-hardware.com/cae-tools.git
synced 2025-01-09 01:20:15 +02:00
poly2h/: auto-generate dependencies also for C++ code
This commit is contained in:
parent
a950c5b13c
commit
7f813b5254
@ -34,22 +34,26 @@ CC_normal := $(CC)
|
|||||||
CXX_normal := $(CXX)
|
CXX_normal := $(CXX)
|
||||||
AR_normal := $(AR)
|
AR_normal := $(AR)
|
||||||
DEPEND_normal := $(CPP) $(CFLAGS) -MM -MG
|
DEPEND_normal := $(CPP) $(CFLAGS) -MM -MG
|
||||||
|
DEPENDXX_normal := $(CPP) $(CXXFLAGS) -MM -MG
|
||||||
|
|
||||||
CC_quiet = @echo " CC " $@ && $(CC_normal)
|
CC_quiet = @echo " CC " $@ && $(CC_normal)
|
||||||
CXX_quiet = @echo " CXX " $@ && $(CXX_normal)
|
CXX_quiet = @echo " CXX " $@ && $(CXX_normal)
|
||||||
AR_quiet = @echo " AR " $@ && $(AR_normal)
|
AR_quiet = @echo " AR " $@ && $(AR_normal)
|
||||||
DEPEND_quiet = @$(DEPEND_normal)
|
DEPEND_quiet = @$(DEPEND_normal)
|
||||||
|
DEPENDXX_quiet = @$(DEPENDXX_normal)
|
||||||
|
|
||||||
ifeq ($(V),1)
|
ifeq ($(V),1)
|
||||||
CC = $(CC_normal)
|
CC = $(CC_normal)
|
||||||
CXX = $(CXX_normal)
|
CXX = $(CXX_normal)
|
||||||
AR = $(AR_normal)
|
AR = $(AR_normal)
|
||||||
DEPEND = $(DEPEND_normal)
|
DEPEND = $(DEPEND_normal)
|
||||||
|
DEPENDXX = $(DEPENDXX_normal)
|
||||||
else
|
else
|
||||||
CC = $(CC_quiet)
|
CC = $(CC_quiet)
|
||||||
CXX = $(CXX_quiet)
|
CXX = $(CXX_quiet)
|
||||||
AR = $(AR_quiet)
|
AR = $(AR_quiet)
|
||||||
DEPEND = $(DEPEND_quiet)
|
DEPEND = $(DEPEND_quiet)
|
||||||
|
DEPENDXX = $(DEPENDXX_quiet)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# ----- Rules -----------------------------------------------------------------
|
# ----- Rules -----------------------------------------------------------------
|
||||||
@ -90,6 +94,14 @@ uninstall:
|
|||||||
-e '$${g;p;}' -e d >$*.d; \
|
-e '$${g;p;}' -e d >$*.d; \
|
||||||
[ "$${PIPESTATUS[*]}" = "0 0" ] || { rm -f $*.d; exit 1; }
|
[ "$${PIPESTATUS[*]}" = "0 0" ] || { rm -f $*.d; exit 1; }
|
||||||
|
|
||||||
|
%.o: %.cpp
|
||||||
|
$(CXX) -c $(CXXFLAGS) $*.cpp -o $*.o
|
||||||
|
$(DEPENDXX) $*.cpp | \
|
||||||
|
sed -e \
|
||||||
|
'/^\(.*:\)\? */{p;s///;s/ *\\\?$$/ /;s/ */:\n/g;H;}' \
|
||||||
|
-e '$${g;p;}' -e d >$*.d; \
|
||||||
|
[ "$${PIPESTATUS[*]}" = "0 0" ] || { rm -f $*.d; exit 1; }
|
||||||
|
|
||||||
-include $(OBJS:.o=.d)
|
-include $(OBJS:.o=.d)
|
||||||
|
|
||||||
# ----- Tests -----------------------------------------------------------------
|
# ----- Tests -----------------------------------------------------------------
|
||||||
|
@ -44,7 +44,6 @@ Other:
|
|||||||
- change the license from GPL to LGPL
|
- change the license from GPL to LGPL
|
||||||
- transform CGAL's idea of outer polygons into something we can use
|
- transform CGAL's idea of outer polygons into something we can use
|
||||||
- check for memory leaks
|
- check for memory leaks
|
||||||
- try to generate dependencies also for *.cpp
|
|
||||||
|
|
||||||
Prerequisite:
|
Prerequisite:
|
||||||
libcgal-dev
|
libcgal-dev
|
||||||
|
Loading…
Reference in New Issue
Block a user