-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit does - Initialise makefile and uses targets to be made - Separate variables for source files, directories and common compiler
- Loading branch information
1 parent
98e5f6b
commit 3b7803b
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
CC := gcc | ||
|
||
LIBS := -lstdc++ -lavcodec -lavformat -lavutil -lswresample -lswscale -lglfw -lGL | ||
TARGET_DIR := bin/ | ||
|
||
SRC_FILES_PLAYER := main_window.cpp decoder.cpp | ||
SRC_FILES_TCP_PLAYER := tcp_main_window.cpp decoder.cpp tcp_client.c | ||
SRC_FILES_TCP_SERVER := tcp_server.c | ||
SRC_FILES_TRANSCODER := transcoder.c debug.c | ||
|
||
.PHONY: all | ||
|
||
all: dir player tcp_player tcp_server transcoder | ||
|
||
dir: | ||
if [ ! -d "$(TARGET_DIR)" ]; then \ | ||
mkdir -p $(TARGET_DIR); \ | ||
fi | ||
|
||
player: | ||
$(CC) $(SRC_FILES_PLAYER) $(LIBS) -o $(TARGET_DIR)$@ | ||
|
||
tcp_server: | ||
$(CC) $(SRC_FILES_TCP_SERVER) -o $(TARGET_DIR)$@ | ||
|
||
tcp_player: | ||
$(CC) $(SRC_FILES_TCP_PLAYER) $(LIBS) -o $(TARGET_DIR)$@ | ||
|
||
transcoder: | ||
$(CC) $(SRC_FILES_TRANSCODER) $(LIBS) -o $(TARGET_DIR)$@ |