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: 2021/05/06 21:08 by rlunaro