26 lines
349 B
Makefile
Executable File
26 lines
349 B
Makefile
Executable File
# Makefile
|
|
|
|
# Compiler
|
|
CXX = g++
|
|
|
|
# Compiler flags
|
|
CXXFLAGS = -lmagic
|
|
|
|
# Output file
|
|
OUTPUT = fileinfo
|
|
|
|
# Source file
|
|
SRC = main.cpp
|
|
|
|
# Rule to compile the program
|
|
$(OUTPUT): $(SRC)
|
|
$(CXX) $(SRC) $(CXXFLAGS) -o $(OUTPUT)
|
|
|
|
check: $(OUTPUT)
|
|
$(CXX) $(SRC) $(CXXFLAGS) -o $(OUTPUT)
|
|
rm -f $(OUTPUT)
|
|
|
|
# Clean up generated files
|
|
clean:
|
|
rm -f $(OUTPUT)
|