source: ogServer-Git/Makefile @ 08783c9

Last change on this file since 08783c9 was a8d0344, checked in by ramon <ramongomez@…>, 13 years ago

Versión 1.0.2a, #479: corregir errata de inclusión en ficheros Makefile.

git-svn-id: https://opengnsys.es/svn/branches/version1.0@2443 a21b9725-9963-47de-94b9-378ad31fedc9

  • Property mode set to 100644
File size: 930 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 += -O0 -g -Wall -I../../Includes # Depuracion
12#CFLAGS += -O3 -I../../Includes         # Optimizacion
13CPPFLAGS := $(CFLAGS)
14
15# Opciones de linkado
16LDFLAGS := -Wl,--no-as-needed $(shell mysql_config --libs) -lpthread
17
18# Ficheros objetos
19OBJS := ../../Includes/Database.o sources/ogAdmServer.o
20
21
22all: $(PROYECTO)
23
24$(PROYECTO): $(OBJS)
25        g++ $(LDFLAGS) $(OBJS) -o $(PROYECTO)
26#       strip $(PROYECTO)               # Optimizacion
27
28install: $(PROYECTO)
29        cp $(PROYECTO) $(INSTALL_DIR)/sbin
30        cp $(PROYECTO).cfg $(INSTALL_DIR)/etc
31 
32clean:
33        rm -f $(PROYECTO) $(OBJS)
34
35uninstall: clean
36        rm -f /usr/local/sbin/$(PROYECTO) /usr/local/etc/$(PROYECTO).cfg
37
38sources/%.o: sources/%.cpp
39        g++ $(CPPFLAGS) -c -o"$@" "$<"
40       
41sources/%.o: sources/%.c
42        gcc $(CFLAGS) -c -o"$@" "$<"
43
44
Note: See TracBrowser for help on using the repository browser.