I am trying to compile my program with this makefile but the linker is giving me some fuss saying that there are duplicate symbols. I tried playing with this makefile but I haven't had much luck. My program only has three files, pdp429.c, instructions.c, and global.h. Any help is appreciated thanks!
Here are the errors, (there are 46 of the "duplicate symbol" errors) "duplicate symbol _MASK_IN in: pdp429.o instructions.o ld: 46 duplicate symbols for architecture x86_64 collect2: ld returned 1 exit status make: *** [pdp429] Error 1"
CFLAGS = -O0 -pg -ggdb3 -Wall
all: pdp429
pdp429: pdp429.o instructions.o
gcc $(CFLAGS) pdp429.o instructions.o -o pdp429
pdp429.o: pdp429.c global.h
gcc $(CFLAGS) pdp429.c -c
instructions.o: instructions.c global.h
gcc $(CFLAGS) instructions.c -c
clean:
rm -f *.o pdp429