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