Practice_2/makefile

29 lines
452 B
Makefile

TARGET = $(basename $(notdir $(PWD)))
TARGET = app
OBJECTS = main.o
VPATH = src
CFLAGS += -g
#CFLAGS += -fdiagnostics-color=always
#LDLIBS=-lstdc++
#OBJECTS := $(addprefix obj/, $(OBJECTS))
.SUFFIXES:
.SUFFIXES: .out .a .ln .o .c .cc .C .cpp .m .s .S .sym .def .h
.PHONY: all clean test
all: $(TARGET)
$(TARGET): $(OBJECTS)
$(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@
clean:
$(RM) $(OBJECTS) $(TARGET)
test:
@echo $(TARGET)
@echo $(OBJECTS)