Skip to content

Instantly share code, notes, and snippets.

@mido3ds
Created April 7, 2017 22:00
Show Gist options
  • Save mido3ds/70fd32f41b512f70ed3e3065f9338c2a to your computer and use it in GitHub Desktop.
Save mido3ds/70fd32f41b512f70ed3e3065f9338c2a to your computer and use it in GitHub Desktop.
old makefile, i want to keep
# compiler to use
CC = g++
# flags to pass compiler
CFLAGS = -ggdb3 -O0 -Qunused-arguments -std=c++11 -Wall -Werror
# name for executable
EXE =
# space-separated list of header files
HDRS =
# space-separated list of libraries, if any,
# each of which should be prefixed with -l
LIBS =
# space-separated list of source files
SRCS =
# automatically generated list of object files
OBJS = $(SRCS:.cpp=.o)
# default target
$(EXE): $(OBJS) $(HDRS) Makefile
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
# dependencies
$(OBJS): $(HDRS) Makefile
# housekeeping
clean:
rm -f core $(EXE) *.o
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment