Contents:
- 1 °³¿ä
- 2 °ü·Ã¼Àû
- 3 Áֿ丵ũ
- 4 º»¹® 1
- 4.1 º»¹®
- 4.2 º»¹®
- 5 makefile ¿¹Á¦
- 5.1 ¿¹Á¦ 1 - C
- 5.2 ¿¹Á¦ 2 - C++
- 6 ´Ù¿î·Îµå
- 7 °ü·Ã¸µÅ©
#
# C++ Makefile Example
#
# CXX = g++
CXXFLAGS = -Wno-deprecated
TARGET = ab
OBJS = main.o ConfigData.o ErrorObject.o
SRCS = $(OBJS:.o=.cpp)
INC =
ifneq (.depend,$(wildcard .depend))
all: dep $(TARGET)
endif
$(TARGET): $(OBJS)
$(CXX) -o $(TARGET) $(OBJS)
@echo -e ">>> Finished build $(TARGET)...\n"
dep:
@$(CXX) -M $(SRCS) $(CXXFLAGS) 2> error > .depend
@echo -e ">>> Make dependencies...\n"
clean:
@$(RM) $(TARGET) $(OBJS) error .depend
@echo -e ">>> Remove files...\n"
ifeq (.depend,$(wildcard .depend))
include .depend
endif