Skip to content

Commit

Permalink
scipts,build: add support for static library (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
poemonsense authored Sep 6, 2023
1 parent 7a80278 commit ccb8da5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,11 @@ $(BINARY): $(OBJS) $(LIBS)
@echo + LD $@
@$(LD) -o $@ $(OBJS) $(LDFLAGS) $(LIBS)

staticlib: $(BUILD_DIR)/lib$(NAME).a

$(BUILD_DIR)/lib$(NAME).a: $(OBJS) $(LIBS)
@echo + AR $@
@ar rcs $(BUILD_DIR)/lib$(NAME).a $(OBJS) $(LIBS)

clean:
-rm -rf $(BUILD_DIR)

0 comments on commit ccb8da5

Please sign in to comment.