Created
June 12, 2020 10:10
-
-
Save Mathias-Fuchs/909be18fb5bf6acaae7e004910afcde5 to your computer and use it in GitHub Desktop.
simple makefile for mmg test and example programs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CC = gcc | |
CPP = g++ | |
INCL = -I$(HOME)/mmg/buildLinuxDebug/include/ | |
CFLAGS += -g -Wall -Wextra -pedantic -fPIC `pkg-config --cflags cairo` -DWITHCAIRO -D_DEBUG -DEXTRADEBUG | |
CPPFLAGS += -g -Wall -Wextra -pedantic -fPIC `pkg-config --cflags cairo` -DWITHCAIRO -D_DEBUG -DEXTRADEBUG --std=c++17 | |
LDFLAGS += -L$(HOME)/mmg/buildLinuxDebug/lib/ -Wl,-rpath=$(HOME)/mmg/buildLinuxDebug/lib -lmmg -lcairo -lm | |
main.o: main.c | |
$(CC) $(CFLAGS) $(INCL) -c -o $@ $< | |
mainpp.o: main.cpp | |
$(CPP) $(CPPFLAGS) $(INCL) -c -o $@ $< | |
main: main.o | |
$(CC) $^ -o $@ $(LDFLAGS) | |
mainpp: mainpp.o | |
$(CPP) $^ -o $@ $(LDFLAGS) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment