Skip to content

Commit

Permalink
Merge pull request #24 from giordano/mg/cc
Browse files Browse the repository at this point in the history
Do not hard-code GCC as compiler
  • Loading branch information
joente committed Oct 26, 2023
2 parents 8f6cbbc + 352169c commit bb3c0ad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions Release/makefile
@@ -1,6 +1,7 @@
-include ../makefile.init

RM := rm -rf
CC ?= gcc

-include sources.mk
-include src/subdir.mk
Expand Down Expand Up @@ -32,8 +33,8 @@ all: libcleri
# Tool invocations
libcleri: $(OBJS) $(USER_OBJS)
@echo 'Building target: $@'
@echo 'Invoking: Cross GCC Linker'
gcc -shared -Wl,-$(SO_NAME),$(FN).$(MAJOR) -o $(FN) $(OBJS) $(USER_OBJS) $(LIBS) $(LDFLAGS)
@echo "Invoking: Cross $(CC) Linker"
$(CC) -shared -Wl,-$(SO_NAME),$(FN).$(MAJOR) -o $(FN) $(OBJS) $(USER_OBJS) $(LIBS) $(LDFLAGS)
@chmod -x $(FN)
@echo 'Finished building target: $@'
@echo ' '
Expand All @@ -49,4 +50,4 @@ clean:
-include ../makefile.targets

test:
@cd ../test && ./test.sh
@cd ../test && ./test.sh
4 changes: 2 additions & 2 deletions Release/src/subdir.mk
Expand Up @@ -73,7 +73,7 @@ C_DEPS += \

src/%.o: ../src/%.c
@echo 'Building file: $<'
@echo 'Invoking: Cross GCC Compiler'
gcc -DNDEBUG -I../inc -O3 -Winline -Wall $(CPPFLAGS) $(CFLAGS) -c -fmessage-length=0 -fPIC -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
@echo "Invoking: Cross $(CC) Compiler"
$(CC) -DNDEBUG -I../inc -O3 -Winline -Wall $(CPPFLAGS) $(CFLAGS) -c -fmessage-length=0 -fPIC -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '

0 comments on commit bb3c0ad

Please sign in to comment.