Skip to content

Commit

Permalink
Add some latest minor changes to Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
petabyt committed Oct 31, 2023
1 parent d643a7e commit d1d30c8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
CFLAGS=-Isrc/ -DVERBOSE -g -fpic -Wall -Wshadow -Wcast-qual -Wpedantic -Werror=incompatible-pointer-types

# All platforms need these object files
FILES=$(addprefix src/,operations.o packet.o enums.o data.o enum_dump.o util.o canon.o liveview.o bind.o ip.o fuji.o ml.o log.o conv.o generic.o)
CAMLIB_CORE=operations.o packet.o enums.o data.o enum_dump.o util.o canon.o liveview.o bind.o ip.o fuji.o ml.o log.o conv.o generic.o
FILES=$(addprefix src/,$(CAMLIB_CORE))

# Unix-specific
CFLAGS+=$(shell pkg-config --cflags libusb-1.0)
Expand All @@ -22,7 +23,7 @@ libcamlib.so: $(FILES)
$(CC) -c $(CFLAGS) $< -o $@

# PTP decoder
DEC_FILES=src/dec/main.o src/enums.o src/enum_dump.o
DEC_FILES=src/dec/main.o src/enums.o src/enum_dump.o src/data.o src/packet.o src/conv.o src/log.o
dec: $(DEC_FILES)
$(CC) $(DEC_FILES) $(CFLAGS) -o $@

Expand All @@ -33,6 +34,7 @@ stringify:
clean:
rm -rf *.o src/*.o src/dec/*.o *.out test-ci test/*.o examples/*.o *.exe dec *.dll *.so libusb-fake-ptp DUMP
rm -rf lua/*.o lua/lua-cjson/*.o
cd examples && make clean

install: libcamlib.so
cp libcamlib.so /usr/lib/
Expand All @@ -42,4 +44,4 @@ install: libcamlib.so
test-ci: test/test.o $(FILES)
$(CC) test/test.o $(FILES) $(LDFLAGS) $(CFLAGS) -o test-ci

.PHONY: all clean
.PHONY: all clean install stringify

0 comments on commit d1d30c8

Please sign in to comment.