Skip to content

Commit

Permalink
misc: updated makefile to support selective app building
Browse files Browse the repository at this point in the history
  • Loading branch information
inlife committed Sep 18, 2022
1 parent 9987e50 commit fa90cc9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ test: code/tests/unit
apps: $(APPS)
@echo '> Building apps'

app: code/apps/$(NAME)
@echo '> Building app $(NAME)'

web:
emcc $(LEVEL) -s WASM=1 -s EXTRA_EXPORTED_RUNTIME_METHODS='["cwrap"]' \
-DLIBRG_EMSCRIPTEN=1 -I code/ code/apps/library.c -o build/librg.js
Expand All @@ -56,12 +59,12 @@ endif

% : %.c
@mkdir -p build
@echo '=> Building $(@F)'
@echo '> Building $(@F)'
$(CC) $(CFLAGS) $^ $(LDFLAGS) -o build/$(@F)

% : %.cc
@mkdir -p build
@echo '=> Building $(@F)'
@echo '> Building $(@F)'
$(CXX) $(CXXFLAGS) $^ $(LDFLAGS) -o build/$(@F)

.SILENT:
Expand Down

0 comments on commit fa90cc9

Please sign in to comment.