Skip to content

Commit

Permalink
Use wildcards in Makefile (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
zzril authored Oct 10, 2024
1 parent 4c8ba66 commit b4841e0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ BLD_DIR=./build
BIN_DIR=./bin
EX_DIR=./examples

HEADERS=$(SRC_DIR)/instrument.h $(SRC_DIR)/interpreter.h $(SRC_DIR)/lexer.h $(SRC_DIR)/mixer.h $(SRC_DIR)/note.h $(SRC_DIR)/note_compiler.h $(SRC_DIR)/note_conversion.h $(SRC_DIR)/player.h $(SRC_DIR)/token.h $(SRC_DIR)/wave.h $(SRC_DIR)/config.h
OBJECTS=$(BLD_DIR)/instrument.o $(BLD_DIR)/interpreter.o $(BLD_DIR)/lexer.o $(BLD_DIR)/mixer.o $(BLD_DIR)/note.o $(BLD_DIR)/note_compiler.o $(BLD_DIR)/note_conversion.o $(BLD_DIR)/player.o $(BLD_DIR)/token.o $(BLD_DIR)/wave.o $(BLD_DIR)/cli.o
SOURCES=$(wildcard $(SRC_DIR)/*.c)
HEADERS=$(wildcard $(SRC_DIR)/*.h)

OBJECTS=$(patsubst $(SRC_DIR)/%.c,$(BLD_DIR)/%.o,$(SOURCES))

BIN=$(BIN_DIR)/$(NAME)

EXAMPLES=$(EX_DIR)/canon-in-d.aula $(EX_DIR)/old-mc-donald.aula $(EX_DIR)/smoke-on-the-water.aula
EXAMPLES=$(wildcard $(EX_DIR)/*.aula)
TESTS=$(patsubst $(EX_DIR)/%.aula,test-%,$(EXAMPLES))

# --------
Expand Down

0 comments on commit b4841e0

Please sign in to comment.