Skip to content

Instantly share code, notes, and snippets.

@toroidal-code
Last active August 25, 2016 08:26
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 toroidal-code/7ae9299b255a738b4146 to your computer and use it in GitHub Desktop.
Save toroidal-code/7ae9299b255a738b4146 to your computer and use it in GitHub Desktop.
### Makefile ---
##
## Filename: Makefile
## Description: A generic C Makefile
## Author: Katherine Whitlock - toroidalcode
## Created: Tue Jun 24 17:45:43 2014 (-0400)
## Version: 0.1
######################################################################
##
### Code:
TARGETS += jarvis
TARGETS += quickhull
all: $(TARGETS)
CFLAGS += \
-std=c99 \
-W \
-Wall \
%.o : %.c
$(CC) $(CFLAGS) -c -o $@ $<
# For every 'O' in TARGETS, generate a build target
$(foreach O, $(TARGETS), $(eval $O: $O.o points.o))
clean:
rm -f *.o
######################################################################
### Makefile ends here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment