Skip to content

Commit

Permalink
Merge pull request #29 from yochem/make-use-target
Browse files Browse the repository at this point in the history
Make: do not overwrite existing shared objects
  • Loading branch information
romgrk authored Oct 21, 2024
2 parents 820f745 + 8344044 commit dacc9db
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,14 @@ ifeq ($(ARCH), aarch64)
ARCH='arm64'
endif

all:
echo $(ARCH)
$(CC) $(CFLAGS) -Ofast -c -Wall -static -fpic -o ./src/match.o ./src/match.c
$(CC) $(CFLAGS) -shared -o ./static/libfzy-$(OS)-$(ARCH).so ./src/match.o
all: ./static/libfzy-$(OS)-$(ARCH).so

./static/libfzy-$(OS)-$(ARCH).so: ./src/match.c
$(CC) $(CFLAGS) -Ofast -c -Wall -static -fpic -o ./src/match.o $<
$(CC) $(CFLAGS) -shared -o $@ ./src/match.o

clean:
rm -f **/*.o


# vim:ft=make
Expand Down

0 comments on commit dacc9db

Please sign in to comment.