Skip to content

Instantly share code, notes, and snippets.

@stvhwrd
Last active May 23, 2016 20:15
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 stvhwrd/470a18dd1b5b3582124d2b13ded231b1 to your computer and use it in GitHub Desktop.
Save stvhwrd/470a18dd1b5b3582124d2b13ded231b1 to your computer and use it in GitHub Desktop.
This is a sweet boilerplate makefile for cmake
# This is a sweet boilerplate makefile for cmake
CC= gcc
CFLAGS= -Wall -O -g -ansi
SRCS= main.c queue.c
OBJS= main.o queue.o
PROGRAM= queuetest
MKDEP= gccmakedep
${PROGRAM}: ${OBJS}
${CC} ${CFLAGS} ${OBJS} -o ${PROGRAM}
%.o : %.c
$(CC) $(CFLAGS) -c $<
clean:
rm -f ${OBJS} ${PROGRAM}
depend:
${MKDEP} ${CFLAGS} ${SRCS}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment