918-git-images-111dconfigfileconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacionwebconsole3
Rev | Line | |
---|
[3ec149c] | 1 | # makefile |
---|
| 2 | |
---|
| 3 | # Nombre del proyecto |
---|
| 4 | PROYECTO := ogAdmBoot |
---|
| 5 | |
---|
| 6 | # Directorio de instalación |
---|
| 7 | INSTALL_DIR := /opt/opengnsys |
---|
| 8 | |
---|
| 9 | # Opciones de compilacion |
---|
| 10 | CFLAGS := -O0 -g -Wall -I../includes # Depuracion |
---|
| 11 | #CFLAGS := -O3 -Wall # Optimizacion |
---|
| 12 | CPPFLAGS := $(CFLAGS) |
---|
| 13 | |
---|
| 14 | # Opciones de linkado |
---|
[89ff8ed] | 15 | LBIT=$(shell getconf LONG_BIT) |
---|
[b7b61bf] | 16 | ifeq ($(LBIT), 64) |
---|
[89ff8ed] | 17 | LDFLAGS := -L/usr/lib64 -L/usr/lib64/mysql -lpthread -lmysqlclient |
---|
| 18 | else |
---|
| 19 | LDFLAGS := -L/usr/lib -L/usr/lib/mysql -lpthread -lmysqlclient |
---|
| 20 | endif |
---|
[3ec149c] | 21 | |
---|
| 22 | # Ficheros objetos |
---|
| 23 | OBJS := ../includes/Database.o sources/ogAdmBoot.o |
---|
| 24 | |
---|
| 25 | |
---|
| 26 | all: $(PROYECTO) |
---|
| 27 | |
---|
| 28 | $(PROYECTO): $(OBJS) |
---|
| 29 | g++ $(LDFLAGS) $(OBJS) -o $(PROYECTO) |
---|
| 30 | # strip $(PROYECTO) # Optimizacion |
---|
| 31 | |
---|
| 32 | install: $(PROYECTO) |
---|
| 33 | cp $(PROYECTO) $(INSTALL_DIR)/sbin |
---|
| 34 | cp $(PROYECTO).cfg $(INSTALL_DIR)/etc |
---|
| 35 | |
---|
| 36 | clean: |
---|
| 37 | rm -f $(PROYECTO) $(OBJS) |
---|
| 38 | |
---|
| 39 | uninstall: clean |
---|
| 40 | rm -f /usr/local/sbin/$(PROYECTO) /usr/local/etc/$(PROYECTO).cfg |
---|
| 41 | |
---|
| 42 | sources/%.o: sources/%.cpp |
---|
| 43 | g++ $(CPPFLAGS) -I ../includes -c -o"$@" "$<" |
---|
| 44 | |
---|
| 45 | sources/%.o: sources/%.c |
---|
| 46 | gcc $(CFLAGS) -I ../includes -c -o"$@" "$<" |
---|
| 47 | |
---|
| 48 | |
---|
Note: See
TracBrowser
for help on using the repository browser.