Fixed broken linking
ci/woodpecker/push/woodpecker Pipeline was successful
Details
ci/woodpecker/push/woodpecker Pipeline was successful
Details
parent
49e7b9de5d
commit
cfcca90dfc
|
@ -1,6 +1,7 @@
|
|||
*.c
|
||||
data/
|
||||
vieter/vieter
|
||||
vieter.exe
|
||||
vieter-prod.exe
|
||||
|
||||
# Ignore testing files
|
||||
*.pkg*
|
||||
|
|
18
Makefile
18
Makefile
|
@ -4,8 +4,20 @@ LARCHIVE_DIR := libarchive-$(LARCHIVE_VER)
|
|||
LARCHIVE_LIB := $(LARCHIVE_DIR)/.libs/libarchive.a
|
||||
|
||||
# Custom V command for linking libarchive
|
||||
V := LD_FLAGS=$(PWD)/$(LARCHIVE_LIB) v -cflags -I$(PWD)/$(LARCHIVE_DIR)
|
||||
V := LDFLAGS=$(PWD)/$(LARCHIVE_LIB) v -cflags -I$(PWD)/$(LARCHIVE_DIR)
|
||||
|
||||
|
||||
# =====COMPILATION=====
|
||||
.PHONY: vieter
|
||||
vieter:
|
||||
$(V) -cg -o vieter.exe vieter
|
||||
|
||||
.PHONY: prod
|
||||
prod:
|
||||
$(V) -o vieter-prod.exe -prod vieter
|
||||
|
||||
|
||||
# =====EXECUTION=====
|
||||
# Run the server in the default 'data' directory
|
||||
.PHONY: run
|
||||
run: libarchive
|
||||
|
@ -16,6 +28,8 @@ run: libarchive
|
|||
watch: libarchive
|
||||
API_KEY=test REPO_DIR=data LOG_LEVEL=DEBUG $(V) watch run vieter
|
||||
|
||||
|
||||
# =====OTHER=====
|
||||
# Format the V codebase
|
||||
.PHONY: fmt
|
||||
fmt:
|
||||
|
@ -31,6 +45,8 @@ customv:
|
|||
https://github.com/ChewingBever/v jjr-v
|
||||
'$(MAKE)' -C jjr-v
|
||||
|
||||
|
||||
# =====LIBARCHIVE=====
|
||||
.PHONY: libarchive
|
||||
libarchive: $(LARCHIVE_LIB)
|
||||
$(LARCHIVE_LIB):
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
module archive
|
||||
|
||||
#include "libarchive/archive.h"
|
||||
#include "libarchive/archive_entry.h"
|
||||
|
||||
struct C.archive {}
|
||||
struct C.archive_entry {}
|
||||
|
||||
fn C.archive_read_new() &C.archive
|
||||
|
||||
pub fn list_filenames() {
|
||||
a := C.archive_read_new()
|
||||
}
|
|
@ -2,10 +2,6 @@ module repo
|
|||
|
||||
import os
|
||||
|
||||
#include "libarchive/archive.h"
|
||||
|
||||
struct C.archive {}
|
||||
|
||||
const pkgs_subpath = 'pkgs'
|
||||
|
||||
// Dummy struct to work around the fact that you can only share structs, maps &
|
||||
|
|
Loading…
Reference in New Issue