Last active
March 8, 2023 14:00
-
-
Save LAK132/e77fb562dc6cf08ebfb39be17cec919f to your computer and use it in GitHub Desktop.
C++ embedded in a Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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