Cleanup
[carla.git] / source / modules / water / Makefile
blob78c39c3c28f5d43e8523b919013876216e401bf1
1 #!/usr/bin/make -f
2 # Makefile for water #
3 # ----------------------------- #
4 # Created by falkTX
7 CWD=../..
8 MODULENAME=water
9 include ../Makefile.mk
11 # ---------------------------------------------------------------------------------------------------------------------
13 BUILD_CXX_FLAGS += -I..
15 ifneq ($(HAIKU),true)
16 ifneq ($(WASM),true)
17 BUILD_CXX_FLAGS += -pthread
18 endif
19 endif
21 # ---------------------------------------------------------------------------------------------------------------------
23 OBJS = $(OBJDIR)/$(MODULENAME).cpp.o
24 OBJS_files = $(OBJDIR)/$(MODULENAME).cpp.files.o
25 OBJS_arm32 = $(OBJDIR)/$(MODULENAME).cpp.arm32.o
26 OBJS_posix32 = $(OBJDIR)/$(MODULENAME).cpp.posix32.o
27 OBJS_posix64 = $(OBJDIR)/$(MODULENAME).cpp.posix64.o
28 OBJS_win32 = $(OBJDIR)/$(MODULENAME).cpp.win32.o
29 OBJS_win64 = $(OBJDIR)/$(MODULENAME).cpp.win64.o
31 # ---------------------------------------------------------------------------------------------------------------------
33 all: $(MODULEDIR)/$(MODULENAME).a $(MODULEDIR)/$(MODULENAME).files.a
34 files: $(MODULEDIR)/$(MODULENAME).files.a
35 arm32: $(MODULEDIR)/$(MODULENAME).arm32.a
36 posix32: $(MODULEDIR)/$(MODULENAME).posix32.a
37 posix64: $(MODULEDIR)/$(MODULENAME).posix64.a
38 win32: $(MODULEDIR)/$(MODULENAME).win32.a
39 win64: $(MODULEDIR)/$(MODULENAME).win64.a
41 # ---------------------------------------------------------------------------------------------------------------------
43 clean:
44 rm -f $(OBJDIR)/*.o $(MODULEDIR)/$(MODULENAME)*.a
46 debug:
47 $(MAKE) DEBUG=true
49 # ---------------------------------------------------------------------------------------------------------------------
51 $(MODULEDIR)/$(MODULENAME).a: $(OBJS)
52 -@mkdir -p $(MODULEDIR)
53 @echo "Creating $(MODULENAME).a"
54 $(SILENT)rm -f $@
55 $(SILENT)$(AR) crs $@ $^
57 $(MODULEDIR)/$(MODULENAME).files.a: $(OBJS_files)
58 -@mkdir -p $(MODULEDIR)
59 @echo "Creating $(MODULENAME).files.a"
60 $(SILENT)rm -f $@
61 $(SILENT)$(AR) crs $@ $^
63 $(MODULEDIR)/$(MODULENAME).arm32.a: $(OBJS_arm32)
64 -@mkdir -p $(MODULEDIR)
65 @echo "Creating $(MODULENAME).arm32.a"
66 $(SILENT)rm -f $@
67 $(SILENT)$(AR) crs $@ $^
69 $(MODULEDIR)/$(MODULENAME).posix32.a: $(OBJS_posix32)
70 -@mkdir -p $(MODULEDIR)
71 @echo "Creating $(MODULENAME).posix32.a"
72 $(SILENT)rm -f $@
73 $(SILENT)$(AR) crs $@ $^
75 $(MODULEDIR)/$(MODULENAME).posix64.a: $(OBJS_posix64)
76 -@mkdir -p $(MODULEDIR)
77 @echo "Creating $(MODULENAME).posix64.a"
78 $(SILENT)rm -f $@
79 $(SILENT)$(AR) crs $@ $^
81 $(MODULEDIR)/$(MODULENAME).win32.a: $(OBJS_win32)
82 -@mkdir -p $(MODULEDIR)
83 @echo "Creating $(MODULENAME).win32.a"
84 $(SILENT)rm -f $@
85 $(SILENT)$(AR) crs $@ $^
87 $(MODULEDIR)/$(MODULENAME).win64.a: $(OBJS_win64)
88 -@mkdir -p $(MODULEDIR)
89 @echo "Creating $(MODULENAME).win64.a"
90 $(SILENT)rm -f $@
91 $(SILENT)$(AR) crs $@ $^
93 # ---------------------------------------------------------------------------------------------------------------------
95 $(OBJDIR)/$(MODULENAME).cpp.o: $(MODULENAME).cpp
96 -@mkdir -p $(OBJDIR)
97 @echo "Compiling $<"
98 $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
100 $(OBJDIR)/$(MODULENAME).cpp.files.o: $(MODULENAME).files.cpp
101 -@mkdir -p $(OBJDIR)
102 @echo "Compiling $<"
103 $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
105 $(OBJDIR)/$(MODULENAME).cpp.%32.o: $(MODULENAME).cpp
106 -@mkdir -p $(OBJDIR)
107 @echo "Compiling $< (32bit)"
108 $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -c -o $@
110 $(OBJDIR)/$(MODULENAME).cpp.%64.o: $(MODULENAME).cpp
111 -@mkdir -p $(OBJDIR)
112 @echo "Compiling $< (64bit)"
113 $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -c -o $@
115 $(OBJDIR)/$(MODULENAME).cpp.arm32.o: $(MODULENAME).cpp
116 -@mkdir -p $(OBJDIR)
117 @echo "Compiling $< (ARM32)"
118 $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(ARM32_FLAGS) -c -o $@
120 ifeq ($(MACOS),true)
121 $(OBJDIR)/$(MODULENAME).cpp.o: BUILD_CXX_FLAGS += -ObjC++
122 $(OBJDIR)/$(MODULENAME).cpp.files.o: BUILD_CXX_FLAGS += -ObjC++
123 $(OBJDIR)/$(MODULENAME).cpp.%32.o: BUILD_CXX_FLAGS += -ObjC++
124 $(OBJDIR)/$(MODULENAME).cpp.%64.o: BUILD_CXX_FLAGS += -ObjC++
125 endif
127 # ---------------------------------------------------------------------------------------------------------------------
129 -include $(OBJS:%.o=%.d)
130 -include $(OBJS_files:%.o=%.d)
131 -include $(OBJS_arm32:%.o=%.d)
132 -include $(OBJS_posix32:%.o=%.d)
133 -include $(OBJS_posix64:%.o=%.d)
134 -include $(OBJS_win32:%.o=%.d)
135 -include $(OBJS_win64:%.o=%.d)
137 # ---------------------------------------------------------------------------------------------------------------------