$(MAKE) -C cunit check
# Command to build each of the .o files
-$(SA_OBJS): %.o: %.c
- $(CC) $(CFLAGS) -c -o $@ $<
+$(SA_OBJS): %.o: %.c
+ $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
$(SA_OBJS): ../postgis_config.h
$(MAKE) -C ../liblwgeom
shp2pgsql-core.o: shp2pgsql-core.c shp2pgsql-core.h shpcommon.h
- $(CC) $(CFLAGS) -c $<
+ $(CC) $(CPPFLAGS) $(CFLAGS) -c $<
pgsql2shp-core.o: pgsql2shp-core.c pgsql2shp-core.h shpcommon.h
- $(CC) $(CFLAGS) $(PGSQL_FE_CPPFLAGS) -c $<
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(PGSQL_FE_CPPFLAGS) -c $<
pgsql2shp-cli.o: pgsql2shp-cli.c pgsql2shp-core.h shpcommon.h
- $(CC) $(CFLAGS) $(PGSQL_FE_CPPFLAGS) -c $<
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(PGSQL_FE_CPPFLAGS) -c $<
$(PGSQL2SHP-CLI): $(SHPLIB_OBJS) pgsql2shp-core.o pgsql2shp-cli.o $(LIBLWGEOM)
$(LIBTOOL) --mode=link \
$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) $(GETTEXT_LDFLAGS) $(ICONV_LDFLAGS)
shp2pgsql-gui.o: shp2pgsql-gui.c shp2pgsql-core.h shpcommon.h
- $(CC) $(CFLAGS) $(GTK_CFLAGS) $(PGSQL_FE_CPPFLAGS) -o $@ -c shp2pgsql-gui.c
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(GTK_CFLAGS) $(PGSQL_FE_CPPFLAGS) -o $@ -c shp2pgsql-gui.c
$(SHP2PGSQL-GUI): $(SHPLIB_OBJS) shp2pgsql-core.o shp2pgsql-gui.o pgsql2shp-core.o $(LIBLWGEOM) $(GTK_WIN32_RES)
$(LIBTOOL) --mode=link \
all: $(RASTER2PGSQL)
raster2pgsql.o: raster2pgsql.c
- $(CC) $(CFLAGS) -c $<
+ $(CC) $(CPPFLAGS) $(CFLAGS) -c $<
$(RASTER2PGSQL): $(RT_CORE)/librtcore.a raster2pgsql.o
$(LIBTOOL) --mode=link $(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@