Last change
on this file since ad70969 was
2629906,
checked in by OpenGnSys Support Team <soporte-og@…>, 5 years ago
|
#941 add basic database-independent abstraction (dbi)
Add basic infrastructure to support for the independent database layer.
|
-
Property mode set to
100644
|
File size:
853 bytes
|
Rev | Line | |
---|
[b9eb98b] | 1 | # makefile |
---|
| 2 | |
---|
| 3 | # Nombre del proyecto |
---|
| 4 | PROYECTO := ogAdmServer |
---|
| 5 | |
---|
| 6 | # Directorio de instalación |
---|
| 7 | INSTALL_DIR := /opt/opengnsys |
---|
| 8 | |
---|
| 9 | # Opciones de compilacion |
---|
[ca73ddf] | 10 | CFLAGS := $(shell mysql_config --cflags) |
---|
[8d6d833] | 11 | CFLAGS += -g -Wall -I../../Includes |
---|
[b9eb98b] | 12 | CPPFLAGS := $(CFLAGS) |
---|
| 13 | |
---|
| 14 | # Opciones de linkado |
---|
[2629906] | 15 | LDFLAGS := -Wl,--no-as-needed $(shell mysql_config --libs) -lev -ljansson -ldbi |
---|
[b9eb98b] | 16 | |
---|
| 17 | # Ficheros objetos |
---|
[2629906] | 18 | OBJS := ../../Includes/Database.o sources/ogAdmServer.o sources/dbi.o |
---|
[b9eb98b] | 19 | |
---|
| 20 | |
---|
| 21 | all: $(PROYECTO) |
---|
| 22 | |
---|
| 23 | $(PROYECTO): $(OBJS) |
---|
| 24 | g++ $(LDFLAGS) $(OBJS) -o $(PROYECTO) |
---|
| 25 | |
---|
| 26 | install: $(PROYECTO) |
---|
| 27 | cp $(PROYECTO) $(INSTALL_DIR)/sbin |
---|
| 28 | cp $(PROYECTO).cfg $(INSTALL_DIR)/etc |
---|
| 29 | |
---|
| 30 | clean: |
---|
| 31 | rm -f $(PROYECTO) $(OBJS) |
---|
| 32 | |
---|
| 33 | uninstall: clean |
---|
| 34 | rm -f /usr/local/sbin/$(PROYECTO) /usr/local/etc/$(PROYECTO).cfg |
---|
| 35 | |
---|
| 36 | sources/%.o: sources/%.cpp |
---|
| 37 | g++ $(CPPFLAGS) -c -o"$@" "$<" |
---|
| 38 | |
---|
| 39 | sources/%.o: sources/%.c |
---|
| 40 | gcc $(CFLAGS) -c -o"$@" "$<" |
---|
| 41 | |
---|
| 42 | |
---|
Note: See
TracBrowser
for help on using the repository browser.