Skip to content

Commit

Permalink
Add static make targets
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasz-lisowski committed Jun 21, 2024
1 parent 07dfab8 commit 103f64c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
13 changes: 10 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ MAIN_CC_FLAGS:=\
-Wno-unused-parameter \
-Wconversion \
-Wshadow \
-fPIC \
-O2 \
-fPIC \
-I$(DIR_INCLUDE) \
-I$(DIR_LIB)/swicc/include \
-L$(DIR_LIB)/swicc/build \
Expand All @@ -41,6 +41,7 @@ TEST_CC_FLAGS:=\
-Wconversion \
-Wshadow \
-O2 \
-fPIC \
-I$(DIR_INCLUDE) \
-I. \
-I$(DIR_LIB)/swicc/include \
Expand All @@ -59,14 +60,20 @@ main-dbg: MAIN_SWICC_TARGET:=main-dbg
main-dbg: MAIN_SWICC_ARG+=-fsanitize=address
main-dbg: MAIN_CC_FLAGS+=-g -fsanitize=address -DDEBUG
main-dbg: main
.PHONY: main main-dbg
main-static: MAIN_SWICC_TARGET:=main-static
main-static: MAIN_CC_FLAGS+=-static
main-static: main
.PHONY: main main-dbg main-static

test: $(DIR_BUILD)/$(TEST_NAME).$(EXT_BIN)
test-dbg: MAIN_SWICC_TARGET:=main-dbg
test-dbg: MAIN_SWICC_ARG+=-fsanitize=address
test-dbg: TEST_CC_FLAGS+=-g -DDEBUG -fsanitize=address
test-dbg: test
.PHONY: test test-dbg
test-static: MAIN_SWICC_TARGET:=main-static
test-static: TEST_CC_FLAGS+=-static
test-static: test
.PHONY: test test-dbg test-static

# Build swSIM.
$(DIR_BUILD)/$(MAIN_NAME).$(EXT_BIN): $(DIR_BUILD) $(DIR_BUILD)/$(MAIN_NAME) $(DIR_LIB)/swicc/build/$(LIB_PREFIX)swicc.$(EXT_LIB_STATIC) $(MAIN_OBJ)
Expand Down
2 changes: 1 addition & 1 deletion lib/swicc
Submodule swicc updated 1 files
+8 −3 Makefile

0 comments on commit 103f64c

Please sign in to comment.