Skip to content

Instantly share code, notes, and snippets.

@WadsonGarbes
Last active March 5, 2018 20:08
Show Gist options
  • Save WadsonGarbes/147fa2964ea055f1d01ed357898b964e to your computer and use it in GitHub Desktop.
Save WadsonGarbes/147fa2964ea055f1d01ed357898b964e to your computer and use it in GitHub Desktop.
# Type terminal commands as follows: make EXE=yourFileName (don't add extensions)
# the compiler: gcc for C program
CC = gcc
# compiler flags:
# -g adds debugging information to the executable file
# -Wall turns on most, but not all, compiler warnings
CFLAGS = -g -Wall
# link THIS for the math functions (add others as needed):
LFLAGS = -lm
# the build target executable:
TARGET = $(EXE)
all: $(TARGET)
$(TARGET): $(TARGET).c ; $(CC) $(CFLAGS) -o $(TARGET) $(TARGET).c $(LFLAGS)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment