UniversalPizzoccheri/Makefile

29 lines
470 B
Makefile
Raw Normal View History

2018-01-02 11:48:41 +00:00
HEADERS = gamedata.h
ODIR = out
2018-01-05 20:44:22 +00:00
_OBJ_S = gamedata.o server.o
OBJ_S = $(patsubst %,$(ODIR)/%,$(_OBJ_S))
2018-01-02 11:48:41 +00:00
2018-01-05 20:44:22 +00:00
_OBJ_C = client.o
OBJ_C = $(patsubst %,$(ODIR)/%,$(_OBJ_C))
TARGET = out/server
TARGET_C = out/client
2018-01-02 11:48:41 +00:00
CC = gcc
CFLAGS = -g -Wall
2018-01-05 20:44:22 +00:00
default: client server
2018-01-02 11:48:41 +00:00
$(ODIR)/%.o: %.c $(HEADERS)
2018-01-05 20:44:22 +00:00
$(CC) $(CFLAGS) -c $< -o $@
server: $(OBJ_S)
$(CC) $(OBJ_S) -o $(TARGET)
2018-01-02 11:48:41 +00:00
2018-01-05 20:44:22 +00:00
client: $(OBJ_C)
$(CC) $(OBJ_C) -o $(TARGET_C)
2018-01-02 11:48:41 +00:00
clean:
2018-01-05 20:44:22 +00:00
-rm -f $(OBJ_S) $(OBJ_C) $(TARGET) $(TARGET_C)