Skip to content

Instantly share code, notes, and snippets.

@BraedonWooding
Last active March 21, 2018 09:32
Show Gist options
  • Save BraedonWooding/936bc95e619db7ee2a5208e75dcd49e4 to your computer and use it in GitHub Desktop.
Save BraedonWooding/936bc95e619db7ee2a5208e75dcd49e4 to your computer and use it in GitHub Desktop.
# Built by Braedon Wooding
# MIT Licensed
LICENSE_HEADER = license
HEADERS = typedefs.h typedefs.h
SOURCE_FILES = main.c
OUTPUT_NAME = outputname.c
run: combine
gcc $(OUTPUT_NAME) -o temp.out
./temp.out
rm temp.out
compile: combine
gcc $(OUTPUT_NAME) -o ~/bin/$(OUTPUT_NAME:.c=.out)
combine:
cat $(LICENSE_HEADER) > $(OUTPUT_NAME)
cat $(HEADERS) >> $(OUTPUT_NAME)
cat $(SOURCE_FILES) >> $(OUTPUT_NAME)
clean:
rm -f $(OUTPUT_NAME)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment