-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.build
executable file
·31 lines (22 loc) · 1.03 KB
/
Makefile.build
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
OBJS = $(SOURCES:.cpp=.o)
EXE = $(BINDIR)$(MODULE)
all: $(EXE)
$(EXE): $(addprefix $(SRCDIR),$(OBJS))
@echo ===============================================================================
@mkdir $(BINDIR) > /dev/null 2>&1 && \
echo "Criando diretorio $(BINDIR) ... $(OK)" || echo -n ""
@echo -n Compilando arquivo $(MODULE) estatico ...
@$(CXX) $(addprefix $(SRCDIR),$(OBJS)) $(CFLAGS) $(LDFLAGS) -lrt -lm -lpthread -o $(EXE) && \
echo " $(OK)" || (echo " $(FAILED)"; exit 1;)
@echo Descompactando arquivos de testes e diretórios padões ...
unzip test.zip
@mkdir backup > /dev/null 2>&1 && \
echo "Criando diretorio de backup ... $(OK)" || echo -n ""
%.o: %.cpp
@echo -n Compilando arquivo $(notdir $<) para $(notdir $@) ...
@$(CXX) $(CFLAGS) -c $< -o $@ && \
echo " $(OK)" || (echo " $(FAILED)"; exit 1;)
clean:
@echo -n Limpando ...
@rm -rf $(addprefix $(SRCDIR),$(OBJS)) $(BINDIR) *.bin test backup *.out src/*.o *.txt *.yuv *.bin 2> /dev/null && \
echo " $(OK)" || (echo " $(FAILED)"; exit 1;)