User Tools

Site Tools


cpp:index

C++

Automatic Makefile

This three line makefile allows to automatically compile single file cpp files. Ideal for having a test directory where you can create a single cpp file and compile it by issuing a make with no additional configuration.

CPPFLAGS := $(CPPFLAGS) -g
 
cpp_files := $(patsubst %.cpp,%,$(wildcard *.cpp))
 
 
all: $(cpp_files)
cpp/index.txt · Last modified: 2022/12/02 22:02 by 127.0.0.1