2 # Makefile for carla-interposer #
3 # ----------------------------- #
8 include $(CWD
)/Makefile.mk
10 # ---------------------------------------------------------------------------------------------------------------------
12 BINDIR
:= $(CWD
)/..
/bin
15 OBJDIR
:= $(CWD
)/..
/build
/interposer
/Debug
16 MODULEDIR
:= $(CWD
)/..
/build
/modules
/Debug
18 OBJDIR
:= $(CWD
)/..
/build
/interposer
/Release
19 MODULEDIR
:= $(CWD
)/..
/build
/modules
/Release
22 # ---------------------------------------------------------------------------------------------------------------------
24 BUILD_CXX_FLAGS
+= -I
$(CWD
) -I
$(CWD
)/backend
-I
$(CWD
)/includes
-I
$(CWD
)/modules
-I
$(CWD
)/utils
26 INTERPOSER_SAFE_LIBS
= $(LIBDL_LIBS
)
27 INTERPOSER_X11_LIBS
= $(X11_LIBS
) $(LIBDL_LIBS
)
29 # ---------------------------------------------------------------------------------------------------------------------
34 ifeq ($(LINUX
)$(MACOS
),true
)
35 OBJS
+= $(OBJDIR
)/interposer-safe.
cpp.o
36 OBJS
+= $(OBJDIR
)/interposer-jack-x11.
cpp.o
37 TARGETS
+= $(BINDIR
)/libcarla_interposer-safe
$(LIB_EXT
)
38 TARGETS
+= $(BINDIR
)/libcarla_interposer-jack-x11
$(LIB_EXT
)
40 ifeq ($(HAVE_X11
),true
)
41 OBJS
+= $(OBJDIR
)/interposer-x11.
cpp.o
42 TARGETS
+= $(BINDIR
)/libcarla_interposer-x11
$(LIB_EXT
)
46 # ---------------------------------------------------------------------------------------------------------------------
50 # ---------------------------------------------------------------------------------------------------------------------
53 rm -f
$(OBJDIR
)/*.o
$(TARGETS
)
58 # ---------------------------------------------------------------------------------------------------------------------
60 $(BINDIR
)/libcarla_interposer-safe
$(LIB_EXT
): $(OBJDIR
)/interposer-safe.
cpp.o
62 @echo
"Linking libcarla_interposer-safe$(LIB_EXT)"
63 $(SILENT
)$(CXX
) $< $(SHARED
) $(LINK_FLAGS
) $(INTERPOSER_SAFE_LIBS
) -o
$@
65 $(BINDIR
)/libcarla_interposer-x11
$(LIB_EXT
): $(OBJDIR
)/interposer-x11.
cpp.o
67 @echo
"Linking libcarla_interposer-x11$(LIB_EXT)"
68 $(SILENT
)$(CXX
) $< $(SHARED
) $(LINK_FLAGS
) $(INTERPOSER_X11_LIBS
) -o
$@
70 $(BINDIR
)/libcarla_interposer-jack-x11
$(LIB_EXT
): $(OBJDIR
)/interposer-jack-x11.
cpp.o
72 @echo
"Linking libcarla_interposer-jack-x11$(LIB_EXT)"
73 $(SILENT
)$(CXX
) $< $(SHARED
) $(LINK_FLAGS
) $(INTERPOSER_X11_LIBS
) -o
$@
75 # ---------------------------------------------------------------------------------------------------------------------
77 $(OBJDIR
)/interposer-safe.
cpp.o
: interposer-safe.
cpp
80 $(SILENT
)$(CXX
) $< $(BUILD_CXX_FLAGS
) -c
-o
$@
82 $(OBJDIR
)/interposer-x11.
cpp.o
: interposer-x11.
cpp
85 $(SILENT
)$(CXX
) $< $(BUILD_CXX_FLAGS
) $(X11_FLAGS
) -c
-o
$@
87 $(OBJDIR
)/interposer-jack-x11.
cpp.o
: interposer-jack-x11.
cpp
90 $(SILENT
)$(CXX
) $< $(BUILD_CXX_FLAGS
) $(X11_FLAGS
) -c
-o
$@
92 # ---------------------------------------------------------------------------------------------------------------------
94 -include $(OBJS
:%.o
=%.d
)
96 # ---------------------------------------------------------------------------------------------------------------------