summaryrefslogtreecommitdiffstats
path: root/Makefile_opgui
diff options
context:
space:
mode:
authorAttila Veghelyi <aveghelyi@dension.com>2023-06-29 16:24:54 +0200
committerAttila Veghelyi <aveghelyi@dension.com>2023-06-29 16:24:54 +0200
commit925d0670c45e1100e412070fa0ce2405604f219a (patch)
tree9bb4412d148bc80751b7a02023cd3e0167f588e7 /Makefile_opgui
downloadOpenProgrammer-925d0670c45e1100e412070fa0ce2405604f219a.tar.gz
OpenProgrammer-925d0670c45e1100e412070fa0ce2405604f219a.zip
Init repo
Diffstat (limited to 'Makefile_opgui')
-rw-r--r--Makefile_opgui67
1 files changed, 67 insertions, 0 deletions
diff --git a/Makefile_opgui b/Makefile_opgui
new file mode 100644
index 0000000..9a15ef7
--- /dev/null
+++ b/Makefile_opgui
@@ -0,0 +1,67 @@
+# equivalent to #define in c code
+VERSION = 0.12.1
+CC = gcc
+PREFIX = /usr/local
+
+CFLAGS = '-DVERSION="$(VERSION)"' `pkg-config --libs --cflags gtk+-3.0`
+CFLAGS += -DOPGUI
+CFLAGS += -Os -s #size
+#CFLAGS += -O3 -s #speed
+#CFLAGS += -g #debug
+
+OBJECTS = opgui.o \
+ deviceRW.o \
+ progP12.o \
+ progP16.o \
+ progP18.o \
+ progP24.o \
+ progEEPROM.o \
+ progAVR.o \
+ fileIO.o \
+ I2CSPI.o \
+ coff.o \
+ icd.o \
+ strings.o \
+ resources.o
+# progP32.o \
+
+# Check if we are running on windows
+UNAME := $(shell uname)
+ifneq (, $(findstring _NT-, $(UNAME)))
+ CFLAGS += -mwindows
+else
+ CFLAGS += -lrt
+endif
+
+
+# Targets
+all: opgui
+
+opgui : $(OBJECTS)
+ $(CC) -o $@ $(OBJECTS) $(CFLAGS)
+ rm $(OBJECTS) resources.c
+
+%.o : %.c
+ $(CC) $(CFLAGS) -c $<
+
+resources.c: resources.xml opgui.glade
+ glib-compile-resources resources.xml --target=resources.c --generate-source
+
+clean:
+ rm -f opgui $(OBJECTS) resources.c
+
+install: all
+ #test -d $(prefix) || mkdir $(prefix)
+ #test -d $(prefix)/bin || mkdir $(prefix)/bin
+ @echo "Installing opgui"
+ mkdir -p $(PREFIX)/bin
+ install -m 0755 opgui $(PREFIX)/bin;
+
+package:
+ @echo "Creating opgui_$(VERSION).tar.gz"
+ @mkdir opgui-$(VERSION)
+ @cp *.c *.h *.png gpl-2.0.txt Makefile readme resources.xml opgui.glade style.css opgui-$(VERSION)
+ @tar -czf opgui_$(VERSION).tar.gz opgui-$(VERSION)
+ @rm -rf opgui-$(VERSION)
+
+.PHONY: all clean install package