Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cumulative merge of this weekend progresses, but it's not complete yet #8

Merged
merged 2 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions src/MakefileGCC
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,33 @@
# (c) 2024 by Paolo Fabio Zaino, all rights reserved
# Licensed under the CDDL v1.1 License

CC = g++
CXX = g++
PTHREAD = -pthread
EXT_SYM = .
CFLAGS_BASE = -Wall -Wextra -pedantic -std=gnu++11 -O2
CFLAGS_BASE = -Wall -Wextra -pedantic -std=c++11 -O2
LDFLAGS_EXTRA =
extras =
server =
client =

LIB_NAME = MicroFB
LIB_SOURCES = fb.cpp layer.cpp render_strategy.cpp
LIB_SOURCES = fb.cpp layer.cpp render_strategy.cpp screen_info.cpp asf_handler.cpp
LIB_OBJECTS = $(LIB_SOURCES:.cpp=.o)
LIB_OUT = lib$(LIB_NAME)$(EXT_SYM)a
LIB_LINK = -L./ -l$(LIB_NAME)
LIB_LINK = -L. -l$(LIB_NAME)

ifeq ($(OS), RISC_OS)
CC = g++
CXX = g++
# PTHREAD = -lpthread
PTHREAD =
EXT_SYM =.
CFLAGS_BASE = -Wall -Wextra -pedantic -std=gnu++11
CFLAGS_BASE = -Wall -Wextra -pedantic -std=c++11
LDFLAGS_EXTRA = -lgcc -lstdlib_extras
#extras = stdlib_extras
LIB_LINK = -l$(LIB_NAME)
endif
ifeq ($(OS), Darwin)
CC = /opt/homebrew/bin/g++-13
#CXX = /opt/homebrew/bin/g++-13
PTHREAD = -pthread
LIB_LINK = $(LIB_OUT)
endif
Expand All @@ -48,15 +48,15 @@ $(LIB_OUT): $(LIB_OBJECTS)
ar rcs $(LIB_OUT) $(LIB_OBJECTS)

$(LIB_OBJECTS): $(LIB_SOURCES)
$(CC) $(CFLAGS) -c $(LIB_SOURCES)
$(CXX) $(CFLAGS) -c $(LIB_SOURCES)

# Server executable
#$(server): Server.cpp $(LIB_OUT) $(extras)
# $(CC) $(CFLAGS) -o $(server) Server.cpp $(LIB_LINK) $(LDFLAGS_EXTRA)
# $(CXX) $(CFLAGS) -o $(server) Server.cpp $(LIB_LINK) $(LDFLAGS_EXTRA)

# Client executable
#$(client): Client.cpp $(LIB_OUT) $(extras)
# $(CC) $(CFLAGS) -o $(client) Client.cpp $(LIB_LINK) $(LDFLAGS_EXTRA)
# $(CXX) $(CFLAGS) -o $(client) Client.cpp $(LIB_LINK) $(LDFLAGS_EXTRA)

.PHONY: clean

Expand Down
4 changes: 4 additions & 0 deletions src/MkGCC.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,9 @@ cd ${current_dir}
# Display MakefielGCC
cat ${current_dir}/MakeFileGCC

# Clean up the artifacts
rm -rf ./*.o
rm -rf ./*.a

# Make the artifacts
make all OS=`uname -s` -f ${current_dir}/MakefileGCC
Loading
Loading