Skip to content

Commit

Permalink
fix: improve Makefile to change ddstest directory and nif name easily
Browse files Browse the repository at this point in the history
  • Loading branch information
pojiro committed Feb 27, 2022
1 parent ca812a4 commit b92effa
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ DDS_CMAKE = cyclonedds.cmake

# DDS APP

DDS_APP_HEADERS = $(wildcard src/ddstest/*.h)
DDS_APP_SRC = $(wildcard src/ddstest/*.c)
DDS_APP_OBJ = $(DDS_APP_SRC:src/ddstest/%.c=$(MIX_APP_OBJ_DIR)/%.o)
DDS_APP_NIF = $(MIX_APP_PRIV_DIR)/ddstest_nif.so
DDS_APP_DIR = src/ddstest
DDS_APP_HEADERS = $(wildcard $(DDS_APP_DIR)/*.h)
DDS_APP_SRC = $(wildcard $(DDS_APP_DIR)/*.c)
DDS_APP_OBJ = $(DDS_APP_SRC:$(DDS_APP_DIR)/%.c=$(MIX_APP_OBJ_DIR)/%.o)

# Compile settings

Expand Down Expand Up @@ -64,7 +65,7 @@ build-dds:

$(DDS_APP_OBJ): $(DDS_APP_HEADERS) Makefile

$(MIX_APP_OBJ_DIR)/%.o: src/ddstest/%.c
$(MIX_APP_OBJ_DIR)/%.o: $(DDS_APP_DIR)/%.c
$(CC) -o $@ $< -c $(ERL_CFLAGS) $(CFLAGS)

$(DDS_APP_NIF): $(DDS_APP_OBJ)
Expand Down

0 comments on commit b92effa

Please sign in to comment.