I'm trying to make a basic GTK program that just makes a button that says "Hello, World!" It compiles when I type "cc -L../lib/ window.o -o test `pkg-config --cflags --libs gtk+-2.0`" but when I attempted to make a Makefile, it began to do something funky. I know the makefile works, it's a copy of another working program of mine, just changed the sources.
When I type make, I get
SRC = window.c
OBJ = $(SRC:.c=.o)
RM = rm -f
TESTC = $(SRC)
TESTO = $(TESTC:.c=.o)
TESTE = test
LPATH = ../lib/
LIBS = -lmy
GTK = `pkg-config --cflags --libs gtk+-2.0`
cc -L$(LPATH) $(TESTO) $(LIBS) -o $(TESTE) $(GTK)
I know that the "lol" part of the Makefile (make lol) attempts to execute "wellwtfaasdasdasd." I have no idea where the makefile is getting -c or window.c, I never coded that.
cc (tab space) -c -o window.o window.c
Any help is much appreciated.