Cleanup
[carla.git] / source / modules / dgl / Makefile
blob50eab4b88a130acabe8903a60b0fdc4ef27fdc1e
1 #!/usr/bin/make -f
2 # Makefile for dgl #
3 # ---------------- #
4 # Created by falkTX
7 CWD=../..
8 MODULENAME=dgl
9 include ../Makefile.mk
11 # ---------------------------------------------------------------------------------------------------------------------
13 BUILD_CXX_FLAGS += $(DGL_FLAGS) -Isrc
14 BUILD_CXX_FLAGS += -Isrc/pugl-upstream/include
16 ifneq ($(MACOS),true)
17 WINE_FLAGS = -I/usr/include/wine/wine/windows
18 WINE_FLAGS += -I/usr/include/wine-development/windows
19 WINE_FLAGS += -I/opt/wine-devel/include/wine/windows
20 endif
22 # ---------------------------------------------------------------------------------------------------------------------
24 OBJS = \
25 $(OBJDIR)/pugl.cpp.o \
26 $(OBJDIR)/Application.cpp.o \
27 $(OBJDIR)/ApplicationPrivateData.cpp.o \
28 $(OBJDIR)/Color.cpp.o \
29 $(OBJDIR)/EventHandlers.cpp.o \
30 $(OBJDIR)/Geometry.cpp.o \
31 $(OBJDIR)/ImageBase.cpp.o \
32 $(OBJDIR)/ImageBaseWidgets.cpp.o \
33 $(OBJDIR)/NanoVG.cpp.o \
34 $(OBJDIR)/OpenGL.cpp.o \
35 $(OBJDIR)/SubWidget.cpp.o \
36 $(OBJDIR)/SubWidgetPrivateData.cpp.o \
37 $(OBJDIR)/TopLevelWidget.cpp.o \
38 $(OBJDIR)/TopLevelWidgetPrivateData.cpp.o \
39 $(OBJDIR)/Widget.cpp.o \
40 $(OBJDIR)/WidgetPrivateData.cpp.o \
41 $(OBJDIR)/Window.cpp.o \
42 $(OBJDIR)/WindowPrivateData.cpp.o
44 OBJS_wine = \
45 $(OBJDIR)/pugl.cpp-wine.o \
46 $(OBJDIR)/Application.cpp-wine.o \
47 $(OBJDIR)/ApplicationPrivateData.cpp-wine.o \
48 $(OBJDIR)/Color.cpp-wine.o \
49 $(OBJDIR)/EventHandlers.cpp-wine.o \
50 $(OBJDIR)/Geometry.cpp-wine.o \
51 $(OBJDIR)/ImageBase.cpp-wine.o \
52 $(OBJDIR)/ImageBaseWidgets.cpp-wine.o \
53 $(OBJDIR)/OpenGL.cpp-wine.o \
54 $(OBJDIR)/SubWidget.cpp-wine.o \
55 $(OBJDIR)/SubWidgetPrivateData.cpp-wine.o \
56 $(OBJDIR)/TopLevelWidget.cpp-wine.o \
57 $(OBJDIR)/TopLevelWidgetPrivateData.cpp-wine.o \
58 $(OBJDIR)/Widget.cpp-wine.o \
59 $(OBJDIR)/WidgetPrivateData.cpp-wine.o \
60 $(OBJDIR)/Window.cpp-wine.o \
61 $(OBJDIR)/WindowPrivateData.cpp-wine.o
63 # ---------------------------------------------------------------------------------------------------------------------
65 all: $(MODULEDIR)/$(MODULENAME).a
66 wine: $(MODULEDIR)/$(MODULENAME).wine.a
68 # ---------------------------------------------------------------------------------------------------------------------
70 clean:
71 rm -f $(OBJDIR)/*.o $(MODULEDIR)/$(MODULENAME)*.a $(MODULEDIR)/$(MODULENAME).wine.a
73 debug:
74 $(MAKE) DEBUG=true
76 # ---------------------------------------------------------------------------------------------------------------------
78 $(MODULEDIR)/$(MODULENAME).a: $(OBJS)
79 -@mkdir -p $(MODULEDIR)
80 @echo "Creating $(MODULENAME).a"
81 $(SILENT)rm -f $@
82 $(SILENT)$(AR) crs $@ $^
84 $(MODULEDIR)/$(MODULENAME).wine.a: $(OBJS_wine)
85 -@mkdir -p $(MODULEDIR)
86 @echo "Creating $(MODULENAME).wine.a"
87 $(SILENT)rm -f $@
88 $(SILENT)$(AR) crs $@ $^
90 # ---------------------------------------------------------------------------------------------------------------------
92 ifeq ($(MACOS),true)
93 $(OBJDIR)/pugl.cpp.o: src/pugl.cpp
94 -@mkdir -p $(OBJDIR)
95 @echo "Compiling $<"
96 $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -ObjC++ -c -o $@
97 endif
99 $(OBJDIR)/%.cpp.o: src/%.cpp
100 -@mkdir -p $(OBJDIR)
101 @echo "Compiling $<"
102 $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
104 $(OBJDIR)/%.cpp-wine.o: src/%.cpp
105 -@mkdir -p $(OBJDIR)
106 @echo "Compiling $< (Wine)"
107 $(SILENT)$(WINECC) $< $(BUILD_CXX_FLAGS) $(WINE_FLAGS) -c -o $@
109 -include $(OBJS:%.o=%.d)
110 -include $(OBJS_wine:%.o=%.d)
112 # ---------------------------------------------------------------------------------------------------------------------