Skip to content

Commit

Permalink
DaisySP makefile autobuilds/cleans the lgpl module if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
beserge committed Jan 2, 2024
1 parent b88f60b commit 1458c32
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ OPT = -O3

# Build path
BUILD_DIR = build
DAISYSP_LGPL_DIR = DaisySP-LGPL

#######################################
# binaries
Expand Down Expand Up @@ -191,7 +192,7 @@ CPPFLAGS += \
-finline-functions

# default action: build all
all: $(BUILD_DIR)/$(TARGET).a
all: $(BUILD_DIR)/$(TARGET).a lgpl

#######################################
# build the library
Expand Down Expand Up @@ -219,13 +220,21 @@ $(BUILD_DIR)/$(TARGET).a: $(OBJECTS) Makefile
$(AR) rcs $@ $(OBJECTS)

$(BUILD_DIR):
mkdir $@
mkdir $@

# build the lgpl submodule if it exists
lgpl:
@if [ -f $(DAISYSP_LGPL_DIR)/Makefile ]; then\
make -C $(DAISYSP_LGPL_DIR); \
echo "Building DaisySP-LGPL";\
fi

#######################################
# clean up
#######################################
clean:
-rm -fR $(BUILD_DIR)
-rm -fR $(DAISYSP_LGPL_DIR)/build
#######################################

# dependencies
Expand Down

0 comments on commit 1458c32

Please sign in to comment.