Skip to content

Commit

Permalink
change: build with os-version
Browse files Browse the repository at this point in the history
  • Loading branch information
ireader committed Apr 8, 2023
1 parent 771f1fa commit 16626b1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gcc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ ifdef PLATFORM
CROSS:=$(PLATFORM)-
else
CROSS:=
PLATFORM:=linux$(ARCHBITS)
OSID := $(shell awk -F'=' '/^ID=/ {print $$2}' /etc/os-release | tr -d '"')
OSVERSIONID := $(shell awk -F'=' '/^VERSION_ID=/ {print $$2}' /etc/os-release | tr -d '"')
PLATFORM:=${OSID}$(OSVERSIONID)-linux$(ARCHBITS)
endif

ifeq ($(RELEASE),1)
Expand All @@ -43,7 +45,7 @@ CFLAGS += -Wall -fPIC
CXXFLAGS += -Wall

ifeq ($(RELEASE),1)
CFLAGS += -Wall -O2
CFLAGS += -Wall -O2 -s
CXXFLAGS += $(CFLAGS)
DEFINES += NDEBUG
else
Expand Down

0 comments on commit 16626b1

Please sign in to comment.