Skip to content

Commit

Permalink
1.6d: pnmpack
Browse files Browse the repository at this point in the history
  • Loading branch information
zvezdochiot committed Jul 11, 2022
1 parent 2df6a68 commit f720db0
Show file tree
Hide file tree
Showing 14 changed files with 10 additions and 11 deletions.
18 changes: 9 additions & 9 deletions source/Makefile → Makefile
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# packXXX Makefile, based on UniMake: Universal Makefile
# Created by Matthias Stirner, 01/2016

TARGET = packPNM
TARGET = pnmpack
CC = gcc
CPP = g++
RC = windres -O coff
CPPFLAGS = -I. -O3 -Wall -pedantic -funroll-loops -ffast-math -fsched-spec-load -fomit-frame-pointer
LDFLAGS = -static -static-libgcc -static-libstdc++
CSRC = $(wildcard *.c)
CPPSRC = $(wildcard *.cpp)
DEPS = $(wildcard *.h) Makefile
CPPFLAGS = -I./src -O3 -Wall -pedantic -funroll-loops -ffast-math -fsched-spec-load -fomit-frame-pointer
LDFLAGS = -s #-static -static-libgcc -static-libstdc++
CSRC = $(wildcard src/*.c)
CPPSRC = $(wildcard src/*.cpp)
DEPS = $(wildcard src/*.h) Makefile
OBJ = $(patsubst %.c,%.o,$(CSRC)) $(patsubst %.cpp,%.o,$(CPPSRC))

# conditional stuff
ifeq ($(OS),Windows_NT)
LDFLAGS += -lpthread -L libwinpthread-1.dll
RES = icons.res
RES = src/icons.res
UPX := -upx --best --lzma $(TARGET).exe
else
CPPFLAGS += -DUNIX
Expand All @@ -25,7 +25,7 @@ UPX =
endif

%.o: %.cpp $(DEPS)
$(CPP) -c -o $@ $< $(CPPFLAGS)
$(CPP) $(CPPFLAGS) -c -o $@ $<

%.res: %.rc
@-$(RC) $< $@
Expand Down Expand Up @@ -53,4 +53,4 @@ dll: $(OBJ)

clean:
@echo clean...
@-rm *.o *.a $(TARGET) $(TARGET).exe $(TARGET).dll
@-rm src/*.o src/*.a $(TARGET) $(TARGET).exe $(TARGET).dll
Binary file removed source/icons.res
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 1 addition & 2 deletions source/packpnm.cpp → src/packpnm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2805,8 +2805,7 @@ INTERN inline void set_extension( const char* filename, const char* extension )
char* extstr;

// find position of extension in filename
extstr = ( strrchr( filename, '.' ) == NULL ) ?
strrchr( filename, '\0' ) : strrchr( filename, '.' );
extstr = ( strrchr( filename, '.' ) == NULL ) ? (char*)strrchr( filename, '\0' ) : (char*)strrchr( filename, '.' );

// set new extension
if ( extension != NULL ) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit f720db0

Please sign in to comment.