Skip to content

Commit

Permalink
rearranged project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Judro committed Nov 21, 2022
1 parent 5b49297 commit 8958818
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
OBJS = mines.o game.o display.o controls.o menu.o
SOURCE = mines.c game.c display.c controls.c menu.c
HEADER =
OUT = mines
SRCS =$(wildcard src/*.c)
OBJS = $(patsubst src/%.c, obj/%.o, $(SRCS))
CC = gcc
FLAGS = -g -c -Wall
LFLAGS = -lbsd -lncurses
FLAGS = -Wall -O2
LFLAGS = -lncurses
BIN = bin/mines

all: $(OBJS)
$(CC) -g $(OBJS) -o $(OUT) $(LFLAGS)

mines.o: mines.c
$(CC) $(FLAGS) mines.c
all:$(BIN)

$(BIN): $(OBJS)
$(CC) $(FLAGS) $(OBJS) -o $@ $(LFLAGS)
obj/%.o: src/%.c
$(CC) $(FLAGS) -c $< -o $@

clean:
rm -f $(OBJS) $(OUT)
$(RM) -r bin/* obj/*

install:
cp mines /usr/local/bin
cp bin/mines /usr/local/bin
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 8958818

Please sign in to comment.