diff --git a/jpeg/Makefile b/jpeg/Makefile
index 02279d44984cdd8653c8bb6e892a6c9421a5dceb..f25541940ce2906c280c632ebc9cb4543a13a6de 100644
--- a/jpeg/Makefile
+++ b/jpeg/Makefile
@@ -23,9 +23,10 @@ manext = 1
 # The name of your C compiler:
 #CC= gcc
 CC= g++
+C_FLAGS= -O
 
 # You may need to adjust these cc options:
-CFLAGS= -O -I$(srcdir)
+CFLAGS= $(C_FLAGS) -I$(srcdir)
 # Generally, we recommend defining any configuration symbols in jconfig.h,
 # NOT via -D switches here.
 # However, any special defines for ansi2knr.c may be included here: