X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=mk%2Fjam%2Fcompiler.jam;h=f541e4253d27ef3fcdfccd615c0f0367ab38bc04;hb=4f736a17fd34b1d1f08f660cc4f277d6fe2efaf0;hp=99cad1a8c07c5dc264217a282bc9fb697206c7bc;hpb=6fe1f3519eecbbb75eca97c45a6697eee36b2442;p=supertux.git diff --git a/mk/jam/compiler.jam b/mk/jam/compiler.jam index 99cad1a8c..f541e4253 100644 --- a/mk/jam/compiler.jam +++ b/mk/jam/compiler.jam @@ -2,11 +2,6 @@ # Rules for C and C++ files #============================================================================ -# convert autoconf style variablenames to jam style ones -CCFLAGS += $(CFLAGS) ; -C++FLAGS += $(CXXFLAGS) ; -LFLAGS += $(LIBS) ; - if $(CC) { @@ -16,23 +11,22 @@ rule CcRule if [ IsElem shared : $(2) ] { - object = [ DoObjectGrist $(<:S=.lo) ] ; + object = [ LocateTarget $(<:S=.lo) ] ; CC on $(object) = "$(LIBTOOL) --mode=compile $(CC)" ; } else { - object = [ DoObjectGrist $(<:S=.o) ] ; + object = [ LocateTarget $(<:S=.o) ] ; } + CFLAGS on $(object) = $(CFLAGS) ; + CPPFLAGS on $(object) = $(CPPFLAGS) ; Cc $(object) : $(<) ; + Depends $(object) : $(<) ; + return $(object) ; } RegisterFileType CcRule : .c ; RegisterHeaderRule HeaderRule : $(HDRPATTERN) : .c ; -rule Cc -{ - Depends $(<) : $(>) ; -} - actions Cc { $(CC) -c -o $(<) $(CPPFLAGS) $(CFLAGS) $(>) @@ -47,26 +41,24 @@ rule C++Rule local object ; if [ IsElem shared : $(2) ] { - object = [ DoObjectGrist $(<:S=.lo) ] ; + object = [ LocateTarget $(<:S=.lo) ] ; CXX on $(object) = "$(LIBTOOL) --mode=compile $(CXX)" ; } else { - object = [ DoObjectGrist $(<:S=.o) ] ; + object = [ LocateTarget $(<:S=.o) ] ; } + CXXFLAGS on $(object) = $(CXXFLAGS) ; + CPPFLAGS on $(object) = $(CPPFLAGS) ; C++ $(object) : $(<) ; + Depends $(object) : $(<) ; return $(object) ; } RegisterFileType C++Rule : .cpp .cc .c++ ; # we can't register .C here because # of windows being case-insensitive. RegisterHeaderRule HeaderRule : $(HDRPATTERN) : .cpp .cc .c++ ; -rule C++ -{ - Depends $(<) : $(>) ; -} - actions C++ { - $(CXX) -c -o $(<) $(CPPFLAGS) $(C++FLAGS) $(>) + $(CXX) -c -o $(<) $(CPPFLAGS) $(CXXFLAGS) $(>) } } # end if $(CXX)