johnsonjh/duma

View on GitHub
examples/makefiles/ex3/Makefile

Summary

Maintainability
Test Coverage

DUMADIR=../../..
CPPFLAGS=-g -O0 -I$(DUMADIR)
LFLAGS=$(DUMADIR)/libduma.a
ifeq ($(OS), Windows_NT)
  LIBS=
else
  LIBS=-lpthread
endif

CC=gcc
CXX=g++

BIN=example3
OBJ=../../$(BIN).o

all: $(BIN)
    ./$(BIN)

clean:
    - rm -f $(OBJ) $(BIN)

$(BIN): $(OBJ)
    $(CXX) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)