Skip to content

Commit

Permalink
Merge pull request #40 from PDXostc/cleanup-makefile
Browse files Browse the repository at this point in the history
Cleanup makefile, adds args to CFLAGSLIST
  • Loading branch information
magnusfeuer authored Apr 18, 2019
2 parents 3f353ba + 628e3a8 commit fb141a5
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,13 @@ SRC=dstc.c
HDR=dstc.h
OBJ=dstc.o

RMC_VERSION=1.3
RMC_DIR=reliable_multicast-${RMC_VERSION}

LIB_TARGET=libdstc.a
LIB_SO_TARGET=libdstc.so

INCLUDES=-I${CURDIR}/${RMC_DIR} -I/usr/local/include
CFLAGS=-fPIC -g $(INCLUDES) -Wall
INCLUDES=-I/usr/local/include
CFLAGSLIST=-fPIC -g $(INCLUDES) -Wall $(CFLAGS) $(CPPFLAGS)
DESTDIR ?= /usr/local
export CFLAGS
export CFLAGSLIST
export DESTDIR

#
Expand All @@ -29,7 +26,7 @@ all: $(LIB_TARGET) $(LIB_SO_TARGET) $(OBJ)
# Make sure all of the object files are current.
#
$(OBJ): $(SRC) $(HDR)
$(CC) $(CFLAGS) -c $(SRC)
$(CC) $(CFLAGSLIST) -c $(SRC)

#
# Rebuild the static target library.
Expand All @@ -41,7 +38,7 @@ $(LIB_TARGET): $(OBJ)
# Rebuild the shared object target library.
#
$(LIB_SO_TARGET): $(OBJ)
$(CC) -shared $(CFLAGS) $(OBJ) -o $(LIB_SO_TARGET)
$(CC) -shared $(CFLAGSLIST) $(OBJ) -o $(LIB_SO_TARGET)

#
# Remove all the generated files in this project. Note that this does NOT
Expand All @@ -56,7 +53,7 @@ clean:
# Remove all of the generated files including any in the submodules.
#
distclean: clean
@$(MAKE) -C ${RMC_DIR} clean
@$(MAKE) clean

#
# Install the generated files.
Expand Down

0 comments on commit fb141a5

Please sign in to comment.