forked from Himmele/Mindroid.ecpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.posix
44 lines (36 loc) · 1.01 KB
/
Makefile.posix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# GCC, the GNU Compiler Collection
CC := gcc
CXX := g++
LD := g++
AS := gas
AR := ar
RM := rm
INCLUDES := -Isrc -Isrc/platforms/posix
CFLAGS := -c -g -O0
LDFLAGS :=
LIB_DIR := libs/posix
SRCS = src/mindroid/os/Handler.cpp \
src/mindroid/os/Message.cpp \
src/mindroid/os/MessageQueue.cpp \
src/mindroid/os/RunnableQueue.cpp \
src/mindroid/os/Process.cpp \
src/mindroid/util/Assert.cpp \
src/mindroid/util/Log.cpp \
src/mindroid/util/Logger.cpp \
src/platforms/posix/mindroid/os/Looper.cpp \
src/platforms/posix/mindroid/os/SystemClock.cpp \
src/platforms/posix/mindroid/os/Thread.cpp \
src/platforms/posix/mindroid/util/concurrent/locks/Condition.cpp \
src/platforms/posix/mindroid/util/concurrent/locks/Lock.cpp
OBJS = $(SRCS:.cpp=.o)
LIB_OBJS = $(addprefix $(LIB_DIR)/,$(OBJS))
Mindroid.ecpp = $(LIB_DIR)/libmindroid.a
.PHONY: clean
all: $(Mindroid.ecpp)
$(Mindroid.ecpp): $(LIB_OBJS)
$(AR) -r $@ $^
$(LIB_DIR)/%.o: %.cpp
@mkdir -p $(@D)
$(CXX) $(CFLAGS) $(INCLUDES) -c $< -o $@
clean:
$(RM) -rf $(LIB_DIR)