Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile weirdness #6

Closed
pmeerw opened this issue Sep 25, 2015 · 0 comments
Closed

Makefile weirdness #6

pmeerw opened this issue Sep 25, 2015 · 0 comments

Comments

@pmeerw
Copy link

pmeerw commented Sep 25, 2015

CC = g++
is a bit weird, generally CXX refers to the default C++ compiler
to make it more cross-build frieldly, I'd suggest CXX ?= g++

AdsLibTest.bin: $(LIB_NAME)
$(CC) AdsLibTest/main.cpp $< -I AdsLib/ -I ../ -std=c++11 $(LIBS) -o $@
is a bit weird, why not
AdsLibTest.bin: $(LIB_NAME) main.o
$(CC) main.o $< -I AdsLib/ -I ../ -std=c++11 $(LIBS) -o $@
so all .o are build by the .cpp.o rule
is -I ../ needed?
I think -I and std=c++11 can be dropped when purely linking

use $(AR) instead of plain ar (cross-build)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant