Skip to content

Commit

Permalink
clean up build files
Browse files Browse the repository at this point in the history
  • Loading branch information
cjpais committed May 18, 2024
1 parent 861849e commit ec2594f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 55 deletions.
18 changes: 0 additions & 18 deletions llamafile/BUILD.mk
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,6 @@ o/$(MODE)/llamafile/zipcheck: \
o/$(MODE)/llamafile/zipcheck.o \
o/$(MODE)/llamafile/zip.o

o/$(MODE)/llamafile/simple: \
o/$(MODE)/llamafile/simple.o \
o/$(MODE)/llama.cpp/llava/llava.a \
o/$(MODE)/llama.cpp/llama.cpp.a

o/$(MODE)/llamafile/tokenize: \
o/$(MODE)/llamafile/tokenize.o \
o/$(MODE)/llama.cpp/llama.cpp.a

.PHONY: o/$(MODE)/llamafile
o/$(MODE)/llamafile: \
$(LLAMAFILE_OBJS) \
o/$(MODE)/llamafile/simple \
o/$(MODE)/llamafile/zipalign \
o/$(MODE)/llamafile/zipcheck \
o/$(MODE)/llamafile/tokenize \
o/$(MODE)/llamafile/addnl

################################################################################
# microarchitectures
#
Expand Down
14 changes: 4 additions & 10 deletions llamafile/llamafile.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,17 +295,11 @@ struct llamafile *llamafile_open_gguf(const char *fname, const char *mode) {
errno = EIO;
return 0;
}
fprintf(stderr, "fp open gguf: %p\n", file->fp);
// if (ZIP_READ32(buf) == ZIP_READ32("GGUF")) {
// fprintf(stderr, "THIS IS A gguf file\n");
errno = EINVAL;
return file;
// }


// otherwise assume user opened a .zip or .llamafile
llamafile_close(file);
return llamafile_open_zip(fname, 0, mode);
// TODO check for gguf magic without ZIP READ
// TODO move this to it's own function to not mess with the orignal llamafile code
errno = EINVAL;
return file;
}

FILE *llamafile_fp(struct llamafile *file) {
Expand Down
13 changes: 1 addition & 12 deletions whisper.cpp/BUILD.mk
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,4 @@ $(WHISPER_CPP_OBJS): whisper.cpp/BUILD.mk

.PHONY: o/$(MODE)/whisper.cpp
o/$(MODE)/whisper.cpp: \
o/$(MODE)/whisper.cpp/server

# o/$(MODE)/whisper.cpp/server/whisper_server: $(WHISPER_CPP_OBJS)
# $(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@

# o/$(MODE)/whisper.cpp/server/whisper_server: $(WHISPER_CPP_SERVER_OBJS) $(WHISPER_CPP_OBJS)
# $(LINK.o) $^ -o $@

# o/$(MODE)/whisper.cpp/server: o/$(MODE)/whisper.cpp/server/whisper_server
# @true

# .PHONY: o/$(MODE)/whisper.cpp/server
o/$(MODE)/whisper.cpp/server
15 changes: 0 additions & 15 deletions whisper.cpp/server/BUILD.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,10 @@ WHISPER_CPP_SERVER_HDRS = $(filter %.h,$(WHISPER_CPP_SERVER_FILES))
WHISPER_CPP_SERVER_SRCS = $(filter %.cpp,$(WHISPER_CPP_SERVER_FILES))
WHISPER_CPP_SERVER_OBJS = $(WHISPER_CPP_SERVER_SRCS:%.cpp=o/$(MODE)/%.o)

# o/$(MODE)/whisper.cpp/server/quantize.1.asc.zip.o
o/$(MODE)/whisper.cpp/server/server: \
o/$(MODE)/whisper.cpp/server/server.o \
o/$(MODE)/whisper.cpp/whisper.cpp.a

.PHONY: o/$(MODE)/whisper.cpp/server
o/$(MODE)/whisper.cpp/server: \
o/$(MODE)/whisper.cpp/server/server

# o/$(MODE)/whisper.cpp/server/impl.o: private CXXFLAGS += -O1

# o/$(MODE)/whisper.cpp/server/server.a: \
# $(WHISPER_CPP_SERVER_OBJS)

# o/$(MODE)/whisper.cpp/server/server.o: private \
# CCFLAGS += -Os

# $(WHISPER_CPP_SERVER_OBJS): whisper.cpp/server/BUILD.mk

# .PHONY: o/$(MODE)/whisper.cpp/server
# o/$(MODE)/whisper.cpp/server: \
# o/$(MODE)/whisper.cpp/server/server.a

0 comments on commit ec2594f

Please sign in to comment.