makefile

Qt project include subprojects build in qmake

微笑、不失礼 提交于 2021-02-19 08:18:13
问题 I have a cross-platform project written in Qt/C++, this project uses a static library that is written in Go as a dependency. Go project generates two files ( .a and .h as expected) using GNU Make. I am trying to automate builds for which I am using qmake to generate Makefile and then calling default target of this Makefile as simple $ make . Right now my build first explicitly does git clone go-subproject && cd go-subproject && make , then it copies over resulting library and headers file and

Makefile Dependencies, What Should Be a Dependency?

冷暖自知 提交于 2021-02-19 06:57:08
问题 I have a conceptual question regarding makefile dependencies and this is because I see inconsistency online about this. Let's say I have the following files: main.cpp uses-> my_math.cpp and my_strings.cpp my_math.cpp uses-> my_math.h my_strings.cpp uses-> my_strings.h If I have a makefile, with the general outlay of: program: $(all_objs) g++ $(all_objs) -o program main.o: ... ....... my_math.o: ... ....... my_strings.o: ... ....... I don't know what should go into each dependency. Like, math

Adding prebuilt set of files structured in folders to android out folder

杀马特。学长 韩版系。学妹 提交于 2021-02-19 03:23:08
问题 I have glibc compiled for arm which is different from Android glibc or the bionic C as the glibc environment I have complied will help in providing more api's. Now I can copy the glibc environment on /system/ folder while Android is running, and on doing chroot I can run my programs on glibc environment. Currently I am compiling glibc and Android separately and then tarring the glibc and copying it on Android emulator sdcard and then untarring it on /system folder and then doing chroot on

how can I use annotationProcessor in android.mk

纵饮孤独 提交于 2021-02-18 22:38:40
问题 I just want to use bufferknife and drag2 in my system app, I have built my app with the command mm . I have tried every possible method I could find, but failed! I've only found the below Android.mk by Googling: # Copyright (C) 2015 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a c opy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #

how can I use annotationProcessor in android.mk

房东的猫 提交于 2021-02-18 22:37:55
问题 I just want to use bufferknife and drag2 in my system app, I have built my app with the command mm . I have tried every possible method I could find, but failed! I've only found the below Android.mk by Googling: # Copyright (C) 2015 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a c opy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #

how can I use annotationProcessor in android.mk

北城以北 提交于 2021-02-18 22:37:51
问题 I just want to use bufferknife and drag2 in my system app, I have built my app with the command mm . I have tried every possible method I could find, but failed! I've only found the below Android.mk by Googling: # Copyright (C) 2015 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a c opy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #

How can I tell if a makefile is being run from an interactive shell?

两盒软妹~` 提交于 2021-02-18 10:41:08
问题 I have a makefile which runs commands that can take a while. I'd like those commands to be chatty if the build is initiated from an interactive shell but quieter if not (specifically, by cron). Something along the lines of (pseudocode): foo_opts = -a -b -c if (make was invoked from an interactive shell): foo_opts += --verbose all: bar baz foo $(foo_opts) This is GNU make. If the specifics of what I'm doing matter, I can edit the question. 回答1: It isn't strictly determining whether it is

make remove .cc after building .so without control

本小妞迷上赌 提交于 2021-02-17 06:51:06
问题 Recently I encountered an extremly strange behavior of Makefile : In current dir, I have hello.pyx : #cython: language_level=3 print("Hello, world!") and in .. I have Makefile : includes=$(shell python3 -c "import sysconfig; print(sysconfig.get_path('include'))") CFLAGS=-shared -pthread -fPIC -fwrapv -Oz -flto -Wall -fno-strict-aliasing -I$(includes) LDFLAGS=-Wl,-plugin-opt=O2 %.cc: %.pyx cython --cplus $< -o $@ %.so: %.cc clang++ ${CFLAGS} ${LDFLAGS} $< -o $@ clean: rm -f *.cc *.so .PHONY:

Makefile output folder

≡放荡痞女 提交于 2021-02-17 05:45:09
问题 I have a makefile and all I want to do is to make my executable go to the folder created in the one I have all the files in. So let's say I have a folder in which there are some .cpp files, I create a folder in this folder called OUTPUT (during compilation) and I want my exec made out of those cpp files to go into this folder. How do i do that? Thanks in advance! 回答1: OUTPUT/exec: foo.cpp bar.cpp baz.cpp g++ $^ -o $@ Refinements are possible, but this will get you started. 来源: https:/

Executing [ FILE1 -ot FILE2 ] yields different results in make and shell

眉间皱痕 提交于 2021-02-17 05:17:05
问题 From Table 7-1 of Bash Guide for Beginners, we can say that [ FILE1 -ot FILE2 ] will yield True if FILE1 is older than FILE2 , or if FILE2 exists and FILE1 does not. Executing this command on shell returns True if FILE1 is absent and FILE2 is present. However, when I made use of this in my make script, it yielded False whenever FILE1 was absent and FILE2 was present. To be precise, I made use of the following command in my make and shell scripts: [ FILE1 -ot FILE2 ] && echo 1 || echo 0