Skip to content

Instantly share code, notes, and snippets.

@flibitijibibo
Created April 27, 2013 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flibitijibibo/5473236 to your computer and use it in GitHub Desktop.
Save flibitijibibo/5473236 to your computer and use it in GitHub Desktop.
Why do I even have this
# Makefile for "int main;" C Program
# Written by Ethan "flibitijibibo" Lee
ifeq ($(shell uname), Darwin)
ASMPARAM = -mllvm --x86-asm-syntax=intel
else
ASMPARAM = -masm=intel
endif
all:
echo "int main;" | $(CC) -xc - # By the way, don't run this.
echo "int main;" | $(CC) -o a.s -S $(ASMPARAM) -xc -
clean:
rm a.out a.s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment