Skip to content

Commit

Permalink
Initial commit #35
Browse files Browse the repository at this point in the history
  • Loading branch information
Xtr126 committed Aug 22, 2023
0 parents commit 306ef8c
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
client
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
LIBS=\
./libwayland-client.a -lm -pthread -lrt ./libffi.a \
./libxkbcommon.a

all: client.c
$(CC) $(CFLAGS) \
-g -std=c11 \
-o client client.c \
$(LIBS) -static

.DEFAULT_GOAL=all
14 changes: 14 additions & 0 deletions client.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include <stdio.h>
#include <wayland-client.h>

int main(int argc, char *argv[]) {
struct wl_display *display = wl_display_connect(NULL);
if (!display) {
fprintf(stderr, "Failed to connect to Wayland display.\n");
return 1;
}
fprintf(stderr, "Connection established!\n");

wl_display_disconnect(display);
return 0;
}
Binary file added libffi.a
Binary file not shown.
Binary file added libwayland-client.a
Binary file not shown.
Binary file added libxkbcommon.a
Binary file not shown.

0 comments on commit 306ef8c

Please sign in to comment.