Skip to content

Commit

Permalink
removed old source
Browse files Browse the repository at this point in the history
  • Loading branch information
alba4k committed Apr 7, 2023
1 parent 6b6b553 commit c19d27b
Show file tree
Hide file tree
Showing 15 changed files with 7 additions and 2,571 deletions.
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,22 @@ ifeq ($(OS),GNU/Linux)
OBJ := info.o main.o queue.o utils.o
SRC := src/main.c src/info.c src/queue.c src/utils.c
INSTALLPATH := /usr/bin
INSTALL_FLAGS := -Dm 755
INCLUDE := -l curl -l pci
endif

ifeq ($(OS),Android)
OBJ := info.o main.o queue.o utils.o
SRC := src/main.c src/info.c src/queue.c src/utils.c
INSTALLPATH := $(PREFIX)/bin
INSTALL_FLAGS := -Dm 755
INCLUDE := -l curl
endif

ifeq ($(KERNEL),Darwin)
INSTALLPATH := /usr/local/bin
SRC := src/main.c src/info.c src/queue.c src/macos_infos.c src/bsdwrap.c src/macos_gpu_string.m src/utils.c
OBJ := info.o main.o macos_infos.o bsdwrap.o macos_gpu_string.o utils.o
SRC := src/main.c src/info.c src/queue.c src/macos_infos.c src/bsdwrap.c src/macos_gpu_string.m src/utils.c
INSTALLPATH := /usr/local/bin
INCLUDE := -framework Foundation -framework IOKit -l curl
endif

Expand Down Expand Up @@ -67,7 +69,7 @@ debug: build/debug
build/debug

install: build/$(TARGET)
install -Dm 755 build/$(TARGET) $(DESTDIR)$(INSTALLPATH)/$(TARGET) || \
install $(INSTALL_FLAGS) build/$(TARGET) $(DESTDIR)$(INSTALLPATH)/$(TARGET) || \
bash -c 'echo -e "\e[31m\e[1mERROR\e[0m: Running without root proviliges?"'

uninstall:
Expand Down
2 changes: 1 addition & 1 deletion src/info.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ int packages(char *dest) {
}
}
#endif
if(config.pkg_brew && (access("/usr/local/bin/brew", F_OK) || !access("/opt/homebrew/bin/brew", F_OK) || !access("/bin/brew", F_OK))) {
if(config.pkg_brew && (!access("/usr/local/bin/brew", F_OK) || !access("/opt/homebrew/bin/brew", F_OK) || !access("/bin/brew", F_OK))) {
pipe(pipes);

if(!fork()) {
Expand Down
4 changes: 1 addition & 3 deletions src/macos_gpu_string.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
CFMutableDictionaryRef dict = IOServiceMatching("IOPCIDevice");
io_iterator_t iter;
int success;
const char *result;
const char *result = NULL;

#if __OSX_AVAILABLE_STARTING(__MAC_12_0,__IPHONE_NA)

Expand Down Expand Up @@ -47,8 +47,6 @@
result = [modelName cStringUsingEncoding:NSUTF8StringEncoding];
}
}
else
return NULL;

CFRelease(services);
IOObjectRelease(entry);
Expand Down
11 changes: 0 additions & 11 deletions src_old/bsdwrap.c

This file was deleted.

36 changes: 0 additions & 36 deletions src_old/bsdwrap.h

This file was deleted.

Loading

0 comments on commit c19d27b

Please sign in to comment.