--- a/build/npm/postinstall.ts
+++ b/build/npm/postinstall.ts
@@ -113,6 +114,8 @@
 		}
 		if (process.env['CC']) { opts.env!['CC'] = 'gcc'; }
 		if (process.env['CXX']) { opts.env!['CXX'] = 'g++'; }
+		if (process.env['CPPFLAGS']) { opts.env!['CPPFLAGS'] = ''; }
+		if (process.env['CFLAGS']) { opts.env!['CFLAGS'] = ''; }
 		if (process.env['CXXFLAGS']) { opts.env!['CXXFLAGS'] = ''; }
 		if (process.env['LDFLAGS']) { opts.env!['LDFLAGS'] = ''; }
 
