adding simple makefile to build door challenge
This commit is contained in:
parent
6128aef57a
commit
e5931c0a41
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1 +1,2 @@
|
||||||
*.out
|
/challenge/*.o
|
||||||
|
/doorchallenge
|
||||||
|
|
27
Makefile
Normal file
27
Makefile
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
TARGET=doorchallenge
|
||||||
|
|
||||||
|
CC:=gcc
|
||||||
|
LD:=$(CC)
|
||||||
|
|
||||||
|
LDLIBS=
|
||||||
|
LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro
|
||||||
|
CFLAGS=-Wall \
|
||||||
|
-Wextra \
|
||||||
|
-Winit-self \
|
||||||
|
-Wuninitialized \
|
||||||
|
-Wfloat-equal \
|
||||||
|
-Wint-to-pointer-cast \
|
||||||
|
-pedantic \
|
||||||
|
-O2 \
|
||||||
|
-fstack-protector-strong
|
||||||
|
|
||||||
|
all: $(TARGET)
|
||||||
|
|
||||||
|
$(TARGET): challenge/challenge.o
|
||||||
|
$(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS)
|
||||||
|
|
||||||
|
challenge/%.o: challenge/%.c
|
||||||
|
$(CC) $(CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
$(RM) -rf challenge/*.o $(TARGET)
|
Loading…
Reference in a new issue