본문 바로가기

프로그램언어/C++

Makefile 만들기

INC = -I.
SRCS = myfirst.cpp myfirstinst.cpp myfirstmain.cpp
OBJSS = myfirst.o myfirstinst.o myfirstmain.o 

TARGET = myfirst

all : $(TARGET)

$(TARGET) :
	g++ -o $(TARGET) $(SRCS) $(INC)

clean :
	rm -f $(OBJS) $(TARGET)


new :
	$(MAKE) clean
	$(MAKE)