forked from elizagamedev/gmod-enhanced-camera
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
30 lines (22 loc) · 800 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
GMOD_PATH = $(HOME)/.steam/steam/steamapps/common/GarrysMod
GMAD = $(GMOD_PATH)/bin/gmad_linux
GMPUBLISH = env LD_LIBRARY_PATH=$(GMOD_PATH)/bin $(GMOD_PATH)/bin/gmpublish_linux
GMA_SRC = $(shell find lua -type f -name '*.lua')
ICON_SRC = icon.xcf
TXT_SRC = README.md
TARGET = enhanced_camera
WORKSHOP_ID = 678037029
all: $(TARGET).gma $(TARGET).jpg
$(TARGET).gma: $(GMA_SRC)
$(GMAD) create -folder . -out $@
$(TARGET).jpg: $(ICON_SRC)
convert $< -layers flatten $@
publish: $(TARGET).gma $(TARGET).jpg
ifeq ($(WORKSHOP_ID),)
$(GMPUBLISH) create -addon $(TARGET).gma -icon $(TARGET).jpg
else
$(GMPUBLISH) update -id $(WORKSHOP_ID) -addon $(TARGET).gma -icon $(TARGET).jpg -changes "$(shell git log -1 --pretty=%B)"
endif
clean:
rm -f $(TARGET).gma $(TARGET).jpg
.PHONY: all publish clean