source: ogServer-Git/Makefile @ 8d6d833

Last change on this file since 8d6d833 was 8d6d833, checked in by OpenGnSys Support Team <soporte-og@…>, 6 years ago

#884 do not strip off symbols

Nor use -O3 since this generates code that is harder to debug.
Compile binary that can be run inside valgrind for better debugging.

  • 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) -lpthread -lev
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.