source: ogServer-Git/Makefile @ 1c0eaf2

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

#967 rename .cpp to .c

This actually is C code, use the gcc compiler instead.

  • Property mode set to 100644
File size: 754 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
12
13# Opciones de linkado
14LDFLAGS := -Wl,--no-as-needed $(shell mysql_config --libs) -lev -ljansson -ldbi
15
16# Ficheros objetos
17OBJS := sources/ogAdmServer.o sources/dbi.o
18
19
20all: $(PROYECTO)
21
22$(PROYECTO): $(OBJS)
23        gcc $(LDFLAGS) $(CFLAGS) $(OBJS) -o $(PROYECTO)
24
25install: $(PROYECTO)
26        cp $(PROYECTO) $(INSTALL_DIR)/sbin
27        cp $(PROYECTO).cfg $(INSTALL_DIR)/etc
28 
29clean:
30        rm -f $(PROYECTO) $(OBJS)
31
32uninstall: clean
33        rm -f /usr/local/sbin/$(PROYECTO) /usr/local/etc/$(PROYECTO).cfg
34
35sources/%.o: sources/%.c
36        gcc $(CFLAGS) -c -o"$@" "$<"
37
38
Note: See TracBrowser for help on using the repository browser.