Created
May 4, 2016 20:40
-
-
Save rjzak/01c3ab7073fb524288effa5e6b53e217 to your computer and use it in GitHub Desktop.
Makefile template
This file contains hidden or 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
CFLAGS+=-std=c99 -DMYDEFINE -g -O0 | |
LDFLAGS+=-lm | |
DEPS = Makefile | |
all: myproj | |
%.o: %.c %.h $(DEPS) | |
$(CC) -fPIC -c -o $@ $< $(CFLAGS) | |
myproj: file.o main.o | |
$(CC) $(CFLAGS) -o injector file.o main.o $(LDFLAGS) | |
%.bin: %.asm $(DEPS) | |
fasm $< | |
debug: CFLAGS+=-DDEBUG | |
debug: all | |
clean: | |
rm -f myproj *.o | |
.PHONY: all clean debug |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment