source: ogServer-Git/Makefile @ 1cdbc5f

Last change on this file since 1cdbc5f was 95e6520, checked in by OpenGnSys Support Team <soporte-og@…>, 5 years ago

#915 add initial REST API for ogAdmServer

Add REST API for ogAdmServer, this API is exposed through port 8888 on
the system that runs the ogAdmServer. The body of the HTTP message is
expressed in JSON format.

This patch implements the command "clients" that maps to the existing
legacy "Sondeo" command, that is used by the web interface to poll
refresh the client state.

This patch also includes an initial test infrastructure using 'curl' to
send commands to the new REST API.

Request:

POST /clients
{"clients" : [ "192.168.2.1", "192.168.2.2" ]}

Reply:

200 OK

This allows to refresh the status of the list of clients.

  • Property mode set to 100644
File size: 834 bytes
Line 
1# makefile
2
3# Nombre del proyecto
4PROYECTO := ogAdmServer
5
6# Directorio de instalación
7INSTALL_DIR := /opt/opengnsys
8
9# Opciones de compilacion
10CFLAGS := $(shell mysql_config --cflags)
11CFLAGS += -g -Wall -I../../Includes
12CPPFLAGS := $(CFLAGS)
13
14# Opciones de linkado
15LDFLAGS := -Wl,--no-as-needed $(shell mysql_config --libs) -lev -ljansson
16
17# Ficheros objetos
18OBJS := ../../Includes/Database.o sources/ogAdmServer.o
19
20
21all: $(PROYECTO)
22
23$(PROYECTO): $(OBJS)
24        g++ $(LDFLAGS) $(OBJS) -o $(PROYECTO)
25
26install: $(PROYECTO)
27        cp $(PROYECTO) $(INSTALL_DIR)/sbin
28        cp $(PROYECTO).cfg $(INSTALL_DIR)/etc
29 
30clean:
31        rm -f $(PROYECTO) $(OBJS)
32
33uninstall: clean
34        rm -f /usr/local/sbin/$(PROYECTO) /usr/local/etc/$(PROYECTO).cfg
35
36sources/%.o: sources/%.cpp
37        g++ $(CPPFLAGS) -c -o"$@" "$<"
38       
39sources/%.o: sources/%.c
40        gcc $(CFLAGS) -c -o"$@" "$<"
41
42
Note: See TracBrowser for help on using the repository browser.