Skip to content

Commit

Permalink
updated Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
superzazu committed Apr 25, 2019
1 parent 1f13fa7 commit af7c3f9
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
BIN = i8080_tests
CC = cc
CFLAGS = -g -Wall -Wextra -O3 -std=c99 -pedantic -Wno-gnu-binary-literal
LDFLAGS =

SOURCES = $(shell find . -name '*.c')
OBJECTS = $(SOURCES:.c=.o)
bin = i8080_tests
src = $(wildcard *.c)
obj = $(src:.c=.o)

.PHONY: clean
CFLAGS = -g -Wall -Wextra -O2 -std=c99 -pedantic -Wno-gnu-binary-literal
LDFLAGS =

default: $(BIN)
.PHONY: all clean

$(BIN): $(OBJECTS)
$(CC) $(CFLAGS) -o $(BIN) $(OBJECTS) $(LDFLAGS)
all: $(bin)

.c.o:
$(CC) $(CFLAGS) -c $< -o $@
$(bin): $(obj)
$(CC) -o $@ $^ $(LDFLAGS)

clean:
rm -f $(BIN) *.o
-rm $(bin) $(obj)

0 comments on commit af7c3f9

Please sign in to comment.