Last active
September 6, 2018 05:25
-
-
Save Sleepful/5edda603d9aa733704984e68a532e23b to your computer and use it in GitHub Desktop.
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
# change application name here (executable output name) | |
TARGET=knapsack | |
# compiler | |
CC=gcc | |
# debug | |
DEBUG=-g | |
# optimisation | |
OPT=-O0 | |
# warnings | |
WARN=-Wall | |
PTHREAD=-pthread | |
CCFLAGS=$(DEBUG) $(OPT) $(WARN) $(PTHREAD) -pipe | |
GTKLIB=`pkg-config --cflags --libs gtk+-3.0` | |
# linker | |
LD=gcc | |
LDFLAGS=$(PTHREAD) $(GTKLIB) -export-dynamic -lm | |
OBJS= main.o | |
all: $(OBJS) src/mochila.c src/mochila.h src/guardarycargar.h src/guardarycargar.c | |
$(LD) -o $(TARGET) $(OBJS) src/mochila.c src/guardarycargar.c $(LDFLAGS) | |
main.o: src/main.c | |
$(CC) -c $(CCFLAGS) src/main.c $(GTKLIB) -o main.o | |
clean: | |
rm -f *.o $(TARGET) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment