Created
March 23, 2020 15:41
-
-
Save aviks/7c1951c92fe16ec9e86d12b93b38d8e6 to your computer and use it in GitHub Desktop.
Snowball-Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include mkinc.mak | |
CFLAGS=-O2 | |
CPPFLAGS=-Iinclude | |
all: libstemmer.$(dlext) libstemmer.o stemwords$(exeext) | |
$(bindir): | |
mkdir -p $(bindir) | |
$(libdir): | |
mkdir -p $(libdir) | |
libstemmer.o: $(snowball_sources:.c=.o) | |
$(AR) -cru $@ $^ | |
libstemmer.$(dlext): libstemmer.o | |
$(CC) -shared $(CFLAGS) -o $@ $(LDFLAGS) $^ | |
stemwords$(exeext): examples/stemwords.o libstemmer.o | |
$(CC) $(CFLAGS) -o $@ $^ | |
install-libstemmer: $(libdir) libstemmer.$(dlext) | |
cp libstemmer.$(dlext) $(libdir)/ | |
install-stemwords: $(bindir) stemwords$(exeext) | |
cp stemwords$(exeext) $(bindir)/ | |
install: install-stemwords install-libstemmer | |
clean: | |
rm -rf libstemmer.so stemwords *.o src_c/*.o examples/*.o runtime/*.o libstemmer/*.o $(bindir) $(libdir) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment