Skip to content

Commit

Permalink
Update Makefiles to detect linux
Browse files Browse the repository at this point in the history
  • Loading branch information
dhadka committed Nov 30, 2023
1 parent 14ada9c commit 4027092
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
10 changes: 8 additions & 2 deletions native/HBV/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,14 @@ SRC_DIR = src
CC_SERIAL = g++

#If profiling, add the -pg flag in the last line of these as well
C_FLAGS = -O3 -DLINUX -DOUT_TO_SCREEN -DHBVMOD -DRANGER_MEMORY_TRICK -DSERIAL -lm
C_FLAGS_DEBUG = -g -O0 -DLINUX -DOUT_TO_SCREEN -DHBVMOD -DRANGER_MEMORY_TRICK -DSERIAL -lm
C_FLAGS = -O3 -DOUT_TO_SCREEN -DHBVMOD -DRANGER_MEMORY_TRICK -DSERIAL -lm
C_FLAGS_DEBUG = -g -O0 -DOUT_TO_SCREEN -DHBVMOD -DRANGER_MEMORY_TRICK -DSERIAL -lm

PLATFORM := $(shell uname)
ifeq ($(PLATFORM),Linux)
C_FLAGS += -DLINUX
C_FLAGS_DEBUG += -DLINUX
endif

HBV_SOURCE = $(SRC_DIR)/HBVMain.cpp \
$(SRC_DIR)/HBV.cpp \
Expand Down
8 changes: 7 additions & 1 deletion native/LRGV/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ CC=g++
TARGET=lrgv
SRC_DIR = src
SHARED_DIR = ../shared
C_FLAGS=-O3 -I$(SRC_DIR) -I$(SHARED_DIR) -DLINUX
C_FLAGS=-O3 -I$(SRC_DIR) -I$(SHARED_DIR)

PLATFORM := $(shell uname)
ifeq ($(PLATFORM),Linux)
C_FLAGS += -DLINUX
endif

SOURCE = $(SRC_DIR)/lrgv_main.cpp \
$(SHARED_DIR)/moeaframework.c \
$(SRC_DIR)/lrgv_functions.cpp \
Expand Down
4 changes: 2 additions & 2 deletions native/Radar/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ C_FLAGS = -Wall -O3 -fPIC

PLATFORM := $(shell uname)
ifeq ($(PLATFORM),Linux)
EXT = so
EXT = so
else
EXT = dll
EXT = dll
endif

all:
Expand Down

0 comments on commit 4027092

Please sign in to comment.