IGCC is a small python wrapper around GCC. https://git.cafkafk.com/cafkafk/igcc
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

64 lines
1.8 KiB

# APP_NAME=igcc
# VERSION=0.1
# TMP_DIR=/tmp/$(APP_NAME)
#
# pkg-src:
# mkdir -p pkg
# rm -f pkg/$(APP_NAME)-*.tar.bz2
# - rm -r $(TMP_DIR)
# mkdir $(TMP_DIR)
# git archive --format=tar --prefix=$(APP_NAME)-$(VERSION)/ master > pkg/$(APP_NAME)-$(VERSION).tar
# bzip2 pkg/$(APP_NAME)-$(VERSION).tar
#
# Makefile: makefile for generic program
# Copyright (C) 2022 Christina (cafkafk)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
TARGET=igcc
SRC=igcc.py
PREFIX ?= ~/.local/
VERSION=0.3
.PHONY: all release install uninstall clean
all: $(TARGET)
release: $(TARGET)-release
debug: $(TARGET)-debug
$(TARGET): $(SRC)
echo -e "#!/usr/bin/env bash\ncd $(shell pwd)\n./$(SRC)" > $(TARGET)
chmod +x $(TARGET)
$(TARGET)-release: $(SRC)
$(CC) $(CFLAGS) $(CPPFLAGSREL) $(LDFLAGS) $(SRC) -o $(TARGET)
tar -czvf $(TARGET)-$(VERSION).tar.gz $(TARGET)
install: $(TARGET)
mkdir -p $(DESTDIR)$(PREFIX)/bin
install -m755 $(TARGET) $(DESTDIR)$(PREFIX)/bin/$(TARGET)
uninstall:
$(RM) $(DESTDIR)$(PREFIX)/bin/$(TARGET)
$(TARGET)-debug: $(SRC)
$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(SRC) -Og -o $@
clean:
$(RM) $(TARGET)
$(RM) $(TARGET)-$(VERSION).tar.gz