Moved guac -> libguac, moving towards pluggable protocols.

This commit is contained in:
Michael Jumper
2010-09-13 01:14:08 -07:00
parent 279266a67d
commit 5b66e05f8d
13 changed files with 63 additions and 50 deletions

View File

@@ -1,15 +1,23 @@
.PHONY: client proxy clean .PHONY: client proxy clean libguac vnc
all: client proxy all: client proxy vnc
client: client:
$(MAKE) -C client all $(MAKE) -C client all
proxy: proxy: libguac
$(MAKE) -C proxy all $(MAKE) -C proxy all
libguac:
$(MAKE) -C libguac all
vnc: libguac
$(MAKE) -C vnc all
clean: clean:
$(MAKE) -C client clean $(MAKE) -C client clean
$(MAKE) -C proxy clean $(MAKE) -C proxy clean
$(MAKE) -C libguac clean
$(MAKE) -C vnc clean

View File

@@ -0,0 +1,26 @@
CFLAGS=-O2 -fPIC -pedantic -Wall -Werror -Iinclude
LDFLAGS=-lpng
.PHONY: clean
all: libguac.so
libguac.so: client.o guacio.o protocol.o
$(CC) $(CFLAGS) -shared $(LDFLAGS) -Wl,-soname,libguac.so.0 -o libguac.so client.o protocol.o guacio.o
client.o: client.c include/client.h include/guacio.h
$(CC) $(CFLAGS) -c client.c
protocol.o: protocol.c include/protocol.h include/guacio.h
$(CC) $(CFLAGS) -c protocol.c
guacio.o: guacio.c include/guacio.h
$(CC) $(CFLAGS) -c guacio.c
clean:
$(RM) *.o *.so
distclean: clean
$(RM) *~

View File

@@ -1,27 +1,15 @@
CFLAGS=-O2 -pedantic -Wall -Werror CFLAGS=-O2 -pedantic -Wall -Werror -I../libguac/include
LDFLAGS=-lpng -lvncclient LDFLAGS=-L../libguac -lpng -lguac
.PHONY: clean .PHONY: clean
all: guacd all: guacd
guacd: daemon.o client.o guacio.o protocol.o vnc_client.o guacd: daemon.o
$(CC) $(CFLAGS) $(LDFLAGS) daemon.o client.o protocol.o guacio.o vnc_client.o -o guacd $(CC) $(CFLAGS) $(LDFLAGS) daemon.o -o guacd
client.o: client.c client.h guacio.h daemon.o: daemon.c
$(CC) $(CFLAGS) -c client.c
vnc_client.o: vnc_client.c vnc_client.h guacio.h
$(CC) $(CFLAGS) -c vnc_client.c
protocol.o: protocol.c protocol.h guacio.h
$(CC) $(CFLAGS) -c protocol.c
guacio.o: guacio.c guacio.h
$(CC) $(CFLAGS) -c guacio.c
daemon.o: daemon.c client.h vnc_client.h
$(CC) $(CFLAGS) -c daemon.c $(CC) $(CFLAGS) -c daemon.c
clean: clean:

View File

@@ -26,7 +26,6 @@
#include <netinet/in.h> #include <netinet/in.h>
#include "client.h" #include "client.h"
#include "vnc_client.h"
int main(int argc, char* argv[]) { int main(int argc, char* argv[]) {
@@ -107,7 +106,7 @@ int main(int argc, char* argv[]) {
fprintf(stderr, "[guacamole] spawning client\n"); fprintf(stderr, "[guacamole] spawning client\n");
client = guac_get_client(connected_socket_fd, vnc_guac_client_init, connect_host, connect_port); client = NULL; /*guac_get_client(connected_socket_fd, vnc_guac_client_init, connect_host, connect_port); */ /* STUB! */
guac_start_client(client); guac_start_client(client);
guac_free_client(client); guac_free_client(client);

View File

@@ -1,28 +0,0 @@
/*
* Guacamole - Clientless Remote Desktop
* Copyright (C) 2010 Michael Jumper
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _VNC_CLIENT_H
#define _VNC_CLIENT_H
#include "client.h"
void vnc_guac_client_init(guac_client* client, const char* hostname, int port);
#endif

20
guacamole/vnc/Makefile Normal file
View File

@@ -0,0 +1,20 @@
CFLAGS=-O2 -fPIC -pedantic -Wall -Werror -I../libguac/include
LDFLAGS=-L../libguac -lpng -lguac
.PHONY: clean
all: libguac_client_vnc.so
libguac_client_vnc.so: vnc_client.o
$(CC) $(CFLAGS) -shared $(LDFLAGS) -Wl,-soname,libguac_client_vnc.so.0 -o libguac_client_vnc.so vnc_client.o
vnc_client.o: vnc_client.c
$(CC) $(CFLAGS) -c vnc_client.c
clean:
$(RM) *.o *.so
distclean: clean
$(RM) *~