source: admin/Sources/Services/ogAdmRepo/Makefile @ ee003d6

Last change on this file since ee003d6 was f55088b, checked in by ramon <ramongomez@…>, 14 years ago

Compilazión con optimización de código en rama principal (compilación con depuración solo para ramas de desarrollo).

git-svn-id: https://opengnsys.es/svn/trunk@1922 a21b9725-9963-47de-94b9-378ad31fedc9

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