Skip to content

Instantly share code, notes, and snippets.

@LAK132
Last active March 8, 2023 14:00
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LAK132/e77fb562dc6cf08ebfb39be17cec919f to your computer and use it in GitHub Desktop.
Save LAK132/e77fb562dc6cf08ebfb39be17cec919f to your computer and use it in GitHub Desktop.
C++ embedded in a Makefile
#if 0
.PHONY: run
run: out.elf
./out.elf
out.elf: Makefile
g++ -o $@ -x c++ $^
ifeq (0, 1)
#endif
#include <stdio.h>
int main()
{
printf("Hello, World!\n");
}
#define endif
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment