I am working on a cross-platform 2D engine for mobile devices (Windows Mobile 6 and Android). My version of Windows is pretty much ready, but I still need to make sure that the same features are available on Android.
What I want is one Makefileat the root of the project and several Makefilefor the project and test applications.
Makefile
I base my attempts on the following Makefile:
include ../makeinclude
PROGS = test1
SOURCES = $(wildcard *.cpp)
OBJECTS = main.o start.o $(SOURCES:.cpp=.o)
all: $(PROGS)
clean:
rm -f *.o src
test1: $(OBJECTS)
$(LD) --entry=_start --dynamic-linker system/bin/linker -nostdlib -rpath system/lib -rpath $(LIBS) -L $(LIBS) -lm -lc -lui -lGLESv1_CM $^ -o ../$@
acpy ../$(PROGS)
.cpp.o:
$(CC) $(CFLAGS) -I $(GLES_INCLUDES) -c $*.cpp $(CLIBS)
However, I am not very good at these things. I want him to take the .cpps that are in the folder src, compile them .o and put them in the folder intermediateand finally compile .o in the compiled exe and put it in the folder bin.
:
cd intermediate && rm -f *.o
, .cpp, intermediate.
Makefiles, , .
.