Search notes:

make: multiple targets

Here's the c source code of a simple program that prints the value of the macro EXECUTABLE_NAME.
Because the program does not define this macro, it must be defined with the -D option when gcc is invoked.
#include <stdio.h>

int main() {
  printf("EXECUTABLE_NAME is defined as %s\n", EXECUTABLE_NAME);
}
Github repository about-Makefile, path: /target/multiple/example-1/prog.c
Here's a simple Makefile that uses the concept of multiple targets to create an arbitrary number of executables where the value of the macro EXECUTABLE_NAME is assigned dynamically depending on the name of the executable built:
executables = foo bar baz

all: $(executables)

foo bar baz: prog.c
	gcc -DEXECUTABLE_NAME=\"$@\" $< -o $@
Github repository about-Makefile, path: /target/multiple/example-1/Makefile

See also

make

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1759406389, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/make/target/multiple/index(61): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78